本文共 2730 字,大约阅读时间需要 9 分钟。
到官网上下载最新的spdk 代码。
yum install libaio.x86_64 libaio-devel.x86_64
特别注意的是dpdk:依赖 /lib/modules/uname -a
/build 下执行的内核已经存在,并且编译过,为此需要:
yum install numactl-devel.x86_64 numad.x86_64 numactl.x86_64
make menuconfig && make && make modules && make bzImage
注意用系统自带的gcc make menuconfig 才可以弹出界面;
参考下面命令:
./configure --with-fio=/home/xiaqichao/spdk/fio/fio --with-dpdk=/home/xiaqichao/latestspdk/spdk/dpdk/x86_64-native-linuxapp-gcc --without-virtio --without-vhostmake;echo "EXTRA_CFLAGS=-fPIC" >> config/defconfig_x86_64-native-linuxapp-gcc && echo && make install T=x86_64-native-linuxapp-gcc DESTDIR=. LINK examples/bdev/fio_plugin/fio_plugin/home/opt/gcc-4.8.2.bpkg-r4/gcc-4.8.2.bpkg-r4/sbin/../lib/gcc/x86_64-baidu-linux-gnu/4.8.2/../../../../x86_64-baidu-linux-gnu/bin/ld.bfd: cannot find -lnumacollect2: error: ld returned 1 exit statusmake[3]: *** [fio_plugin] Error 1make[2]: *** [fio_plugin] Error 2make[1]: *** [bdev] Error 2make: *** [examples] Error 2[root@s]# cd /[root@s]# find ./ -name "libnuma*.so"./usr/lib64/libnuma.so[root@s]# cp ./usr/lib64/libnuma.so //home/opt/gcc-4.8.2.bpkg-r4/gcc-4.8.2.bpkg-r4/usr/liblib/ lib64/ libexec/[root@s]# cp ./usr/lib64/libnuma.so //home/opt/gcc-4.8.2.bpkg-r4/gcc-4.8.2.bpkg-r4/usr/lib64/
可以通过下面的命令来解决上面的依赖:
yum install numactl-devel.x86_64 numad.x86_64 numactl.x86_64然后重新编译即可。
[ DPDK EAL parameters: hello_world -c 0x1 --file-prefix=spdk0 --base-virtaddr=0x1000000000 --proc-type=auto ]EAL: Detected 32 lcore(s)EAL: Auto-detected process type: PRIMARYInitializing NVMe ControllersEAL: PCI device 0000:86:00.0 on NUMA socket 0EAL: probe driver: 8086:a54 spdk_nvmeEAL: PCI device 0000:87:00.0 on NUMA socket 0EAL: probe driver: 8086:a54 spdk_nvmeEAL: PCI device 0000:88:00.0 on NUMA socket 0EAL: probe driver: 8086:a54 spdk_nvmeEAL: PCI device 0000:89:00.0 on NUMA socket 0EAL: probe driver: 8086:a54 spdk_nvmeEAL: PCI device 0000:af:00.0 on NUMA socket 0EAL: probe driver: 8086:a54 spdk_nvmeEAL: PCI device 0000:b0:00.0 on NUMA socket 0EAL: probe driver: 8086:a54 spdk_nvmeEAL: PCI device 0000:b1:00.0 on NUMA socket 0EAL: probe driver: 8086:a54 spdk_nvmeAttaching to 0000:b1:00.0EAL: PCI device 0000:b2:00.0 on NUMA socket 0EAL: probe driver: 8086:a54 spdk_nvmeAttached to 0000:b1:00.0Using controller INTEL SSDPE2KX040T7 (BTLF82140KK74P0IGN ) with 1 namespaces. Namespace ID: 1 size: 4000GBInitialization complete.Hello world!nvme_ctrlr.c: 473:nvme_ctrlr_shutdown: *ERROR*: did not shutdown within 5 seconds
转载于:https://blog.51cto.com/xiamachao/2386347