NVME Device Shows 0 Bytes

DescriptionNVME device shows 0 bytes
Symptoms

Command: nvme list

Result: Shows the two volumes, while only one has been created when one of the volumes is with 0 size.

Node SN Model Namespace Usage Format FW Rev

---------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------

/dev/nvme0n1 1f367ce060c61c43 Lightbits LightOS 1 10.74 GB / 10.74 GB 4 KiB + 0 B 2.3

/dev/nvme1n1 1f367ce060c61c43 Lightbits LightOS 1 0.00 B / 10.74 GB 4 KiB + 0 B 2.3

Command: lsblk

Result: Shows the two volumes when only one has been created.

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT

nvme0n1 259:0 0 10G 0 disk

nvme1n1 259:1 0 10G 0 disk

vda 252:0 0 128G 0 disk

|-vda2 252:2 0 127G 0 part

| |-Alma-swap 253:1 0 2G 0 lvm [SWAP]

| `-Alma-root 253:0 0 50G 0 lvm /

```-vda1 252:1 0 1G 0 part /boot``

Root Cause

NVME multipath is disabled:

Indication can be found using the command below:

Command: cat /sys/module/nvme_core/parameters/multipath

Result: N

Resolution

In order to enable the NVMe multipath, use one of the methods below:

Method 1:

For Red Hat, change the kernel bootup command-line arguments:

  1. Run the command:

grubby --update-kernel=ALL --args="nvme_core.multipath=Y"

  1. Reboot the server so that the change takes effect.

Method 2:

For any OS, create a configuration file that enables multipath on boot:

  1. Run the command: echo "options nvme_core multipath=Y" > /etc/modprobe.d/50-nvme_core.conf

  2. Update the initramfs image of the OS (this is a required step as modules are loaded at this stage of an OS bootup):

For Red Hat based systems, run: dracut -f

For Debian/Ubuntu based systems, run: update-initramfs -u

  1. Reboot the server so that the change takes effect.
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard