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

2015-05-14 Thread Keith Busch
Kay Sievers  vrfy.org> writes:
> On Thu, May 14, 2015 at 6:12 PM, Lennart Poettering
>  poettering.net> wrote:
> > 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.
> 
> Yeah, not sure how much NVMe has to do with SCSI. It might make more
> sense to export the primary values to identify these devices by the
> kernel driver in /sys, instead of excapsulating/emulating the SCSI
> behavior. The kernel does that for other block device types like mmc
> too.

I also like native nvme identification over scsi translation. Is the mmc
way your preferred method for consuming these? If so, can you provide a
pointer in that driver for what they're doing? I can probably get it in
the nvme driver for 4.2.

Thanks,
Keith

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


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

2015-05-14 Thread Keith Busch

On Thu, 14 May 2015, Dimitri John Ledkov wrote:

On 14 May 2015 at 08:10, Per Bergqvist  wrote:

+# 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 ^ ?


Hi,

It depends on the nvme controller revision. 1.1 compatible and higher
namespaces export a unique id in EUI64 format. 1.0 devices don't have
this; the serial is as unique as it gets but will create collisions
if the device exports multiple namespaces so we have to append the
namespace identifier.

In either case, the driver provides a scsi translation to obtain
persistent and consistent unique identifiers using inquiry vpd 83h
so I think you want to use ID_SERIAL instead, but it appears scsi_id
doesn't use our vpd 83 with the SCSI string designator type used for
1.0 devices. Do I need to change this?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel