NVMe Over Fabrics with iRDMA总结 - 2

本文档详细介绍了如何配置NVMe over Fabrics目标服务器(存储服务器)和客户端。内容包括安装NVMe over Fabrics工具、配置NVMe硬盘、设置NVMe目标系统、连接NVMe硬盘、验证连接以及测试NVMe over Fabrics性能。通过使用nvme-cli和nvmetcli工具,以及加载内核模块,实现了NVMe over Fabrics的部署和管理。
摘要由CSDN通过智能技术生成

5.0 Configure NVMe over Fabrics Target (Storage Server) 配置 NVMe over Fabrics 目标机(存储服务器)

5.1 Install NVMe over Fabrics Tools安装 NVMe over Fabrics 工具

5.1.1 Install nvme-cli安装 nvme-cli

  1. Download nvme-cli from: 从以下网址下载 nvme-cli:

https://github.com/linux-nvme/nvme-cli/releases

  1. Install with the following command: 使用以下命令进行安装:

cd /<path_to_nvme-cli>/; python setup.py install

5.1.2 Install nvmetcli安装 nvmetcli

  1. Download configshell_fb (required to setup nvmetcli) from: 从以下网址下载 configshell_fb(设置 nvmetcli 时需要):

https://github.com/open- iscsi/configshell-fb/releases

  1. Install with the following command: 使用以下命令进行安装:
    1. /<path_to_configshell-fb>/; python setup.py install
  2. Download nvmetcli from: 从以下网址下载 nvmetcli

ftp://ftp.infradead.org/pub/nvmetcli/

  1. Install with the following command: 使用以下命令进行安装:
    1. /<path_to_nvmetcli>/; python setup.py install

5.2 Configure NVMe Drives配置 NVMe 硬盘

5.2.1 Install Latest Drivers and Firmware for NVMe Drives为 NVMe 硬盘安装最新的驱动程序和Firmware

Follow NVMe drive manufacturer instructions. 按照 NVMe 硬盘制造商的说明进行操作。

5.2.2 Format NVMe Drives格式化 NVMe 硬盘

Reformatting NVMe drives can be done using nvme-cli. 使用 nvme-cli 可以重新格式化 NVMe 硬盘。

The following example code snippet formats all NVMe partitions on the server using nvme-cli: 以下示例代码片段使用 nvme-cli 格式化服务器上的所有 NVMe 分区:

for device in $(ls /dev/nvme*n*p*); do nvme format $device

done

5.2.3 Partition NVMe Drives分区 NVMe 硬盘

Partition the NVMe drives into as many partitions as needed using gdisk. Refer to the gdisk documentation for more details. 使用 gdisk 将 NVMe 硬盘划分为所需的多个分区。有关详细信息,请参阅 gdisk 文档。

The following example script partitions all NVMe drives on the server into a specified number of equal partitions. This removes all data on the drives. 以下示例脚本将服务器上的所有 NVMe 硬盘分区为指定数量的相等分区。这将删除驱动器上的所有数据。

add_partitions_gdisk.sh #!/bin/bash partitions=2

for device in $(ls /dev/nvme*n* | grep -v p); do inputString="" echo "$device"

max_sectorsize=$(echo -e "n\n"| gdisk $device |grep sector |grep -oP '(?<=34-).*?(?=,)') partNum=$((max_sectorsize/partitions)) for (( i=1; i<= $partitions; i++))do partSize=$((partNum*i)) echo $partSize

inputString+="n\n\n\n$partSize\n\n"

done

inputString+="

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

mounter625

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值