Dual controller sysfs Question

Jeffrey Lien Jeff.Lien at wdc.com
Fri Sep 11 10:40:05 EDT 2020


We need some information on how a dual controller drive should show up in the /sys/block directories with respect to latest 5.4 kernel.

Below is our observation :
When tried  a drive in a dual port mode with namespaces attached to it using Ubuntu - 5.4.0-45-generic kernel version, we could see all the block devices getting listed under 'sys/block'  path but when we check for the block device uevent path of the attached namespaces  ( i.e /sys/block/nvme0c0n1/uevent) we do not see the DEVNAME details in that path but we could see the DEVNAME details for other block devices under sys/block. 
There are 2 namespaces created on 2 different controller nvme0 and nvme1 and below is the output from sys/block path.

                  # nvme list
                   Node             SN                   Model                                    Namespace Usage                      Format           FW Rev
                   ---------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------
                   /dev/nvme0n1     SDM0000029DA         HUSMR7638BDP3Y1                          2         150.32  GB / 150.32  GB      4 KiB +  0 B   KNGND688
                   /dev/nvme0n2     SDM0000029DA         HUSMR7638BDP3Y1                          1         103.08  GB / 103.08  GB      4 KiB +  0 B   KNGND688
                  # ls
                  loop0  loop1  loop2  loop3  loop4  loop5  loop6  loop7  nvme0c0n1  nvme0c1n2  nvme0n1  nvme0n2  sda
                  # cat nvme0c0n1/uevent
                  DEVTYPE=disk
                  # cat loop6/uevent
                  MAJOR=7
                  MINOR=6
                  DEVNAME=loop6
                  DEVTYPE=disk

With respect to other kernel version which we tried (i.e SLES with 4.4.143-94.47 ) we do not see this kind of behavior and its working fine with dual port mode with namespaces attached to it on same drive device by getting all the DEVNAME details from uevent path.

# nvme list
               Node             SN                   Model                                    Namespace Usage                      Format           FW Rev
               ---------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------
              /dev/nvme0n1     SDM0000029DA         HUSMR7638BDP3Y1                          2         150.32  GB / 150.32  GB      4 KiB +  0 B   KNGND688
             /dev/nvme0n2     SDM0000029DA         HUSMR7638BDP3Y1                          1         103.08  GB / 103.08  GB      4 KiB +  0 B   KNGND688
# ls
nvme0n1  nvme1n1  sda
# cat nvme0n1/uevent
MAJOR=259
MINOR=1
DEVNAME=nvme0n1
DEVTYPE=disk
#

Could you please let us know your input on this.  Thanks


Jeff Lien





More information about the Linux-nvme mailing list