All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yi Zhang <yi.zhang@redhat.com>
To: linux-nvme@lists.infradead.org
Subject: incorrect sysfs reported by realpath for nvme disk when nvme-core:multipath enabled
Date: Fri, 13 Sep 2019 13:40:50 -0400 (EDT)	[thread overview]
Message-ID: <1137688987.11971676.1568396450210.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <1753358694.11967186.1568394608486.JavaMail.zimbra@redhat.com>

Hello

When I use 'realpath' to get the nvme sysfs on latest 5.3.0-rc8 for NVMe SSD, seems it reported incorrectly sysfs, could anyone help check it?


[1] nvme-core multipath=Y
# lspci | grep -i non
86:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller 172Xa/172Xb (rev 01)
af:00.0 Non-Volatile memory controller: Intel Corporation NVMe DC SSD [3DNAND, Beta Rock Controller]

# nvme list
Node             SN                   Model                                    Namespace Usage                      Format           FW Rev  
---------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------
/dev/nvme0n1     BTLE8190003X2P0IGN   Dell Express Flash NVMe P4600 2.0TB AIC  1           2.00  TB /   2.00  TB      4 KiB +  0 B   QDV1DP15
/dev/nvme1n1           S39WNA0K201139 Dell Express Flash PM1725a 1.6TB AIC     1           1.60  TB /   1.60  TB    512   B +  0 B   1.1.1 

# cat /sys/module/nvme_core/parameters/multipath 
Y

# lsblk 
NAME                         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                            8:0    0 222.5G  0 disk 
├─sda1                         8:1    0   600M  0 part /boot/efi
├─sda2                         8:2    0     1G  0 part /boot
└─sda3                         8:3    0 220.9G  0 part 
  ├─rhel_rdma--perf--07-root 253:0    0    50G  0 lvm  /
  ├─rhel_rdma--perf--07-swap 253:1    0     4G  0 lvm  [SWAP]
  └─rhel_rdma--perf--07-home 253:2    0 166.9G  0 lvm  /home
nvme0n1                      259:0    0   1.8T  0 disk 
nvme1n1                      259:2    0   1.5T  0 disk 

# realpath  /sys/dev/block/259:0
/sys/devices/pci0000:ae/0000:ae:00.0/0000:af:00.0/nvme/nvme1/nvme0n1   --------> should it be /sys/devices/pci0000:ae/0000:ae:00.0/0000:af:00.0/nvme/nvme0/nvme0n1 ?

# realpath  /sys/dev/block/259:2
/sys/devices/virtual/nvme-subsystem/nvme-subsys1/nvme1n1               --------> No pci address returned, bug?



[2] nvme-core multipath=N
# rmmod nvme
# rmmod nvme-core
# nvme list
# modprobe nvme-core multipath=N
# cat /sys/module/nvme_core/parameters/multipath
N
[root@rdma-perf-07 ~]$ modprobe nvme
NAME                         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                            8:0    0 222.5G  0 disk 
├─sda1                         8:1    0   600M  0 part /boot/efi
├─sda2                         8:2    0     1G  0 part /boot
└─sda3                         8:3    0 220.9G  0 part 
  ├─rhel_rdma--perf--07-root 253:0    0    50G  0 lvm  /
  ├─rhel_rdma--perf--07-swap 253:1    0     4G  0 lvm  [SWAP]
  └─rhel_rdma--perf--07-home 253:2    0 166.9G  0 lvm  /home
nvme1n1                      259:0    0   1.8T  0 disk 
nvme0n1                      259:2    0   1.5T  0 disk 

[root@rdma-perf-07 ~]$ realpath /sys/dev/block/259:0
/sys/devices/pci0000:ae/0000:ae:00.0/0000:af:00.0/nvme/nvme1/nvme1n1

[root@rdma-perf-07 ~]$ realpath /sys/dev/block/259:2
/sys/devices/pci0000:85/0000:85:02.0/0000:86:00.0/nvme/nvme0/nvme0n1


   
Best Regards,
  Yi Zhang



_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

       reply	other threads:[~2019-09-13 17:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1753358694.11967186.1568394608486.JavaMail.zimbra@redhat.com>
2019-09-13 17:40 ` Yi Zhang [this message]
2019-09-13 17:56   ` incorrect sysfs reported by realpath for nvme disk when nvme-core:multipath enabled Keith Busch
2019-09-13 18:43     ` Sagi Grimberg
2019-09-14 15:19       ` Keith Busch
2019-09-16  9:30         ` Yi Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1137688987.11971676.1568396450210.JavaMail.zimbra@redhat.com \
    --to=yi.zhang@redhat.com \
    --cc=linux-nvme@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.