spdk-spdk安装指南

基于 CentOS 7 x86_64 安装spdk环境, 需要支持rbd和rdma

环境 : gcc-4.8.5

  1. 下载源码文件(网络不稳定, git中途失败请重复多次运行)
1
2
3
4
5
#git clone https://github.com/spdk/spdk
#cd spdk
#git checkout v21.04
#git submodule update --init

  1. 安装必需环境
1
sudo scripts/pkgdep.sh --all
  1. 构建
1
2
./configure --with-rbd --with-rdma --with-ocf
make

启动vhost target

1
2
#HUGEMEM=4096 scripts/setup.sh
#build/bin/vhost -S /var/tmp -m 0x3

troubleshooting

  1. 已经安装librbd,spdk却不识别librbd
1
2
3
4
5
6
7
./configure --with-rbd --with-rdma
Notice: ISA-L, compression & crypto require NASM version 2.14 or newer. Turning off default ISA-L and crypto features.
Using default SPDK env in /root/spdk/lib/env_dpdk
Using default DPDK in /root/spdk/dpdk/build
Using 'verbs' RDMA provider
--with-rbd requires librados and librbd.
Please install then re-run this script.

安装 librbd1-devel