6.0 Configure and Test NVMe over Fabrics Host(s) to Connect to SPDK Target配置和測試 NVMe over Fabrics 主機以連接 SPDK 目標機
The SPDK NVMe-oF target system is spec compliant, which allows for the use of either an SPDK host or Linux Kernel host to connect to an NVMe-oF subsystem exported by the SPDK NVMe-oF target. SPDK NVMe-oF 目標機系統符合規范,允許使用 SPDK 主機或 Linux 內核主機連接 SPDK NVMe-oF 目標機導出的 NVMe-oF 子系統。
This section outlines both methods: 本節概述了這兩種方法
- Section 6.1, “Option 1: SPDK Host” 選項 1:SPDK 主機
- Section 6.2, “Option 2: Linux Kernel Host”
6.1 Option 1: SPDK Host選項 1:SPDK 主機
6.1.1 Install fio for SPDK Host System為 SPDK 主機系統安裝 fio
- Download fio from Releases · axboe/fio · GitHub 從 https://github.com/axboe/fio/releases 下載 fio
- Install fio on the host: 在主機上安裝 fio:
cd /<path_to_fio>/;./configure; make; make install
Note提示: For the latest instructions, refer to the fio documentation included in the version being used. 有關最新說明,請參閱所使用版本中的 fio 文檔。
6.1.2 Install SPDK on the Host在主機上安裝 SPDK
Install SPDK on the host using the steps outlined in Section 5.2. 使用第 5.2 節中概述的步驟在主機上安裝 SPDK。
When installing SPDK on the host as described in Section 5.2, use the following ./configure parameters to configure it with fio plugin: 按照第 5.2 節所述在主機上安裝 SPDK 時,使用以下 ./configure 參數將其與 fio 插件進行配置:
./configure --with-fio=/opt/<path-to-fio>/ --with-rdma --enable-lto
6.1.3 Discover NVMe Drives Available on Target發現目標主機上提供的 NVMe 硬盤
Discover the NVMe drives available for connection over a transport (-t), with a target IP Address (-a) on a port (-s): 通過傳輸類型 (-t)、端口 (-s) 上的目標 IP 地址 (-a) 發現可用于連接的 NVMe 硬盤:
nvme discover -t rdma -a <targetIP> -s 4420
6.1.4 Connect NVMe-oF Drives連接 NVMe-oF 驅動器
There are two different ways to connect NVMe over Fabrics drives to the SPDK host for testing. 將 NVMe over Fabrics 硬盤連接到 SPDK