Este conteúdo não está disponível no idioma selecionado.
Chapter 13. Enabling multipathing on NVMe devices
You can multipath Non-volatile Memory Express™ (NVMe™) devices that are connected to your system over a fabric transport, such as Fibre Channel (FC). You can select between multiple multipathing solutions.
13.1. Native NVMe multipathing and DM Multipath Copiar o linkLink copiado para a área de transferência!
Non-volatile Memory Express™ (NVMe™) devices support a native multipathing functionality. When configuring multipathing on NVMe, you can select between the standard DM Multipath framework and the native NVMe multipathing.
Both DM Multipath and native NVMe multipathing support the Asymmetric Namespace Access (ANA) multipathing scheme of NVMe devices. ANA identifies optimized paths between the controller and the host, and improves performance.
When native NVMe multipathing is enabled, it applies globally to all NVMe devices. It can provide higher performance, but does not contain all of the functionality that DM Multipath provides. For example, native NVMe multipathing supports only the numa and round-robin path selection methods.
By default, NVMe multipathing is enabled in Red Hat Enterprise Linux 9 and is the recommended multipathing solution.
13.2. Enabling DM Multipath on NVMe devices Copiar o linkLink copiado para a área de transferência!
The default kernel setting for the nvme_core.multipath option is set to Y, which means that the native Non-volatile Memory Express™ (NVMe™) multipathing is enabled. You can enable DM Multipath on connected NVMe devices by disabling native NVMe multipathing.
Prerequisites
- The NVMe devices are connected to your system. For more information, see Overview of NVMe over fabric devices.
Procedure
Check if the native NVMe multipathing is enabled:
cat /sys/module/nvme_core/parameters/multipath
# cat /sys/module/nvme_core/parameters/multipathCopy to Clipboard Copied! Toggle word wrap Toggle overflow The command displays one of the following:
N- Native NVMe multipathing is disabled.
Y- Native NVMe multipathing is enabled.
If the native NVMe multipathing is enabled, disable it by using one of the following methods:
Using a kernel option:
Add the
nvme_core.multipath=Noption to the command line:grubby --update-kernel=ALL --args="nvme_core.multipath=N"
# grubby --update-kernel=ALL --args="nvme_core.multipath=N"Copy to Clipboard Copied! Toggle word wrap Toggle overflow On the 64-bit IBM Z architecture, update the boot menu:
zipl
# ziplCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Reboot the system.
Using a kernel module configuration file:
Create the
/etc/modprobe.d/nvme_core.confconfiguration file with the following content:options nvme_core multipath=N
options nvme_core multipath=NCopy to Clipboard Copied! Toggle word wrap Toggle overflow Back up the
initramfsfile:cp /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).bak.$(date +%m%d-%H%M%S).img
# cp /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).bak.$(date +%m%d-%H%M%S).imgCopy to Clipboard Copied! Toggle word wrap Toggle overflow Rebuild the
initramfs:cp /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).bak.$(date +%m-%d-%H%M%S).img dracut --force --verbose
# cp /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).bak.$(date +%m-%d-%H%M%S).img # dracut --force --verboseCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Reboot the system.
Enable DM Multipath:
systemctl enable --now multipathd.service
# systemctl enable --now multipathd.serviceCopy to Clipboard Copied! Toggle word wrap Toggle overflow Distribute I/O on all available paths. Add the following content in the
/etc/multipath.conffile:Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteThe
/sys/class/nvme-subsystem/nvme-subsys0/iopolicyconfiguration file has no effect on the I/O distribution when DM Multipath manages the NVMe devices.Reload the
multipathdservice to apply the configuration changes:multipath -r
# multipath -rCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify if the native NVMe multipathing is disabled:
cat /sys/module/nvme_core/parameters/multipath N
# cat /sys/module/nvme_core/parameters/multipath NCopy to Clipboard Copied! Toggle word wrap Toggle overflow Verify if DM multipath recognizes the nvme devices:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
13.3. Enabling native NVMe multipathing Copiar o linkLink copiado para a área de transferência!
If native NVMe multipathing is disabled, you can enable it using the following solution.
Prerequisites
- The NVMe devices are connected to your system. For more information, see Overview of NVMe over fabric devices.
Procedure
Check if native NVMe multipathing is enabled in the kernel:
cat /sys/module/nvme_core/parameters/multipath
# cat /sys/module/nvme_core/parameters/multipathCopy to Clipboard Copied! Toggle word wrap Toggle overflow The command displays one of the following:
N- Native NVMe multipathing is disabled.
Y- Native NVMe multipathing is enabled.
If native NVMe multipathing is disabled, enable it by using one of the following methods:
Using a kernel option:
Remove the
nvme_core.multipath=Noption from the kernel command line:grubby --update-kernel=ALL --remove-args="nvme_core.multipath=N"
# grubby --update-kernel=ALL --remove-args="nvme_core.multipath=N"Copy to Clipboard Copied! Toggle word wrap Toggle overflow On the 64-bit IBM Z architecture, update the boot menu:
zipl
# ziplCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Reboot the system.
Using a kernel module configuration file:
Remove the
/etc/modprobe.d/nvme_core.confconfiguration file:rm /etc/modprobe.d/nvme_core.conf
# rm /etc/modprobe.d/nvme_core.confCopy to Clipboard Copied! Toggle word wrap Toggle overflow Back up the
initramfsfile:cp /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).bak.$(date +%m-%d-%H%M%S).img
# cp /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).bak.$(date +%m-%d-%H%M%S).imgCopy to Clipboard Copied! Toggle word wrap Toggle overflow Rebuild the
initramfs:dracut --force --verbose
# dracut --force --verboseCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Reboot the system.
Optional: On the running system, change the I/O policy on NVMe devices to distribute the I/O on all available paths:
echo "round-robin" > /sys/class/nvme-subsystem/nvme-subsys0/iopolicy
# echo "round-robin" > /sys/class/nvme-subsystem/nvme-subsys0/iopolicyCopy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: Set the I/O policy persistently using
udevrules. Create the/etc/udev/rules.d/71-nvme-io-policy.rulesfile with the following content:ACTION=="add|change", SUBSYSTEM=="nvme-subsystem", ATTR{iopolicy}="round-robin"ACTION=="add|change", SUBSYSTEM=="nvme-subsystem", ATTR{iopolicy}="round-robin"Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify if your system recognizes the NVMe devices. The following example assumes you have a connected NVMe over fabrics storage subsystem with two NVMe namespaces:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow List all connected NVMe subsystems:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Check the active transport type. For example,
nvme0 fcindicates that the device is connected over the Fibre Channel transport, andnvme tcpindicates that the device is connected over TCP.If you edited the kernel options, verify if native NVMe multipathing is enabled on the kernel command line:
cat /proc/cmdline BOOT_IMAGE=[...] nvme_core.multipath=Y
# cat /proc/cmdline BOOT_IMAGE=[...] nvme_core.multipath=YCopy to Clipboard Copied! Toggle word wrap Toggle overflow If you changed the I/O policy, verify if
round-robinis the active I/O policy on NVMe devices:cat /sys/class/nvme-subsystem/nvme-subsys0/iopolicy round-robin
# cat /sys/class/nvme-subsystem/nvme-subsys0/iopolicy round-robinCopy to Clipboard Copied! Toggle word wrap Toggle overflow