[systemd-devel] 60-persistent-storage.rules: add NVMe disks and partitions (again)

Per Bergqvist per at bst.lu
Fri May 15 06:56:46 PDT 2015


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


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

> On Thu, 14.05.15 09:10, Per Bergqvist (per at 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






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150515/874ef405/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nvme_id.patch
Type: application/octet-stream
Size: 6501 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150515/874ef405/attachment-0001.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150515/874ef405/attachment-0003.html>


More information about the systemd-devel mailing list