Hej,

Seems like nobody thinks using the scsi_id for NVMe drives is a good idea so the alternative must be to introduce a new nvme_id utility.
Please find a patch (relative 2.19) to add this.
It is using native nvme ioctl to get the model, serial and firmware revision info.

To apply:
patch -p0 < nvme_id.patch
aclocal
automake
./configure 

The resulting entries in /dev/disk/by-id will look like:

lrwxrwxrwx 1 root root 13 May 15 15:34 /dev/disk/by-id/nvme-INTEL_SSDPEDME400G4_CVMD43750011400AGN -> ../../nvme1n1
lrwxrwxrwx 1 root root 15 May 15 15:34 /dev/disk/by-id/nvme-INTEL_SSDPEDME400G4_CVMD43750011400AGN-part1 -> ../../nvme1n1p1
lrwxrwxrwx 1 root root 15 May 15 15:34 /dev/disk/by-id/nvme-INTEL_SSDPEDME400G4_CVMD43750011400AGN-part2 -> ../../nvme1n1p2
lrwxrwxrwx 1 root root 13 May 15 15:34 /dev/disk/by-id/nvme-INTEL_SSDPEDME400G4_CVMD43750013400AGN -> ../../nvme0n1
lrwxrwxrwx 1 root root 15 May 15 15:34 /dev/disk/by-id/nvme-INTEL_SSDPEDME400G4_CVMD43750013400AGN-part1 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 May 15 15:34 /dev/disk/by-id/nvme-INTEL_SSDPEDME400G4_CVMD43750013400AGN-part2 -> ../../nvme0n1p2

BR
Per

Attachment: nvme_id.patch
Description: Binary data

On 14 May 2015, at 18:12 , Lennart Poettering <lenn...@poettering.net> wrote:

On Thu, 14.05.15 09:10, Per Bergqvist (p...@bst.lu) wrote:

Hej,

There was a request for addition of NVMe disks Feb 10 2014 by Harald Hoyer which was
sort of rejected by Kay Sievers by referring to “we should find out what to do for nvme before
adding new users of scsi_id”.

Well, nothing changed really: we'd like to remove scsi_id from
systemd/udev upstream. Please ask sg_utils to pick it up
instead. We'll continue to support the status quo for a while longer,
but it can't stay this way, and we shouldn't add new features to
it while it's in limbo.

Lennart

--
Lennart Poettering, Red Hat






_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to