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

Dimitri John Ledkov dimitri.j.ledkov at intel.com
Thu May 14 03:00:59 PDT 2015


On 14 May 2015 at 08: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”.
> More than a year later nothing has happened and recent commits actually
> branch out early
> for nvme drives.
> I have been using similar patches to Hal's albeit a little bit different.
> +# NVMe
> +KERNEL=="nvme*", ENV{ID_SCSI_SERIAL}!="?*", IMPORT{program}="scsi_id
> --export --whitelisted -d $devnode"
> +KERNEL=="nvme*", ENV{DEVTYPE}=="disk", ENV{ID_SCSI_SERIAL}=="?*",
> SYMLINK+="disk/by-id/nvme-$env{ID_SCSI_SERIAL}"
> +KERNEL=="nvme*", ENV{DEVTYPE}=="partition", ENV{ID_SCSI_SERIAL}=="?*",
> SYMLINK+="disk/by-id/nvme-$env{ID_SCSI_SERIAL}-part%n"
> +

This looks odd to me, from NVMe perspective. I would have thought the
stable names would be generated based on the NVMe Namespace UIDs
rather than anything else.

Keith - could you comment on above ^ ?

> I have found that the ID_SCSI_SERIAL is the most reliable since ID_SERIAL
> varies depending on systemd/driver/kernel versions.
> (My primary use for the NVMe drives is zfs log and cache devices. I test the
> zfs pool with different OS:es so I need
> the naming to be consistent over all targets OS:es).
> One may argue as Kay that it is not a scsi bus, but I think that the NVMe is
> related close enough to use the
> scsi_id, especially if considering the “NVM Express: SCSI Translation
> Reference”
> (http://www.nvmexpress.org/wp-content/uploads/NVM_Express_-_SCSI_Translation_Reference-1_4_20150116_Gold2.pdf).
> There is definitely a need for nvme support in udev and I think
> 60-persistent-storage.rules is the correct place.
> The only issue I can see is wether or not to use scsi_id or to introduce a
> new nvme_id utility.
> BR
> Per
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Pura Vida!

Open Source Technology Center
Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ.

More information about the systemd-devel mailing list