[systemd-devel] Proposal: Add Drive Enclosure/Slot mapping to systemd

2015-03-02 Thread Jordan Hargrave
It would be nice if systemd could discover and display enclosure/bay slot
mappings for drives in the system.  The /dev/disk/by-path method doesn't
quite work, for SAS drives the ID can change on hotplug.  The slot mapping
also doesn't handle PCIe SSD devices as they are bare block devices and
don't use SCSI midlayer.  Proposing to add support for something like
/dev/disk/by-enclosure/encl-XXX-slot-YYY symlink for block devices.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Proposal: Add Drive Enclosure/Slot mapping to systemd

2015-03-02 Thread Andrei Borzenkov
В Mon, 2 Mar 2015 09:48:51 -0600
Jordan Hargrave jhar...@gmail.com пишет:

 It would be nice if systemd could discover and display enclosure/bay slot
 mappings for drives in the system.  The /dev/disk/by-path method doesn't
 quite work, for SAS drives the ID can change on hotplug.  The slot mapping
 also doesn't handle PCIe SSD devices as they are bare block devices and
 don't use SCSI midlayer.  Proposing to add support for something like
 /dev/disk/by-enclosure/encl-XXX-slot-YYY symlink for block devices.

How it should be discovered? Is there universal method that can be used
on majority of systems?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Proposal: Add Drive Enclosure/Slot mapping to systemd

2015-03-02 Thread Jordan Hargrave
On Mon, Mar 2, 2015 at 10:24 AM, Andrei Borzenkov arvidj...@gmail.com
wrote:

 В Mon, 2 Mar 2015 09:48:51 -0600
 Jordan Hargrave jhar...@gmail.com пишет:

  It would be nice if systemd could discover and display enclosure/bay slot
  mappings for drives in the system.  The /dev/disk/by-path method doesn't
  quite work, for SAS drives the ID can change on hotplug.  The slot
 mapping
  also doesn't handle PCIe SSD devices as they are bare block devices and
  don't use SCSI midlayer.  Proposing to add support for something like
  /dev/disk/by-enclosure/encl-XXX-slot-YYY symlink for block devices.

 How it should be discovered? Is there universal method that can be used
 on majority of systems?


For Dell system PCIE SSD it requires using ipmitool OEM command to get the
correct Bus:Device:Function to Enclosure:Slot mapping.  For devices using
SAS controllers it's a bit more tricky.  There is a sysfs variable for
enclosure/slot in sysfs for SAS devices with 8 drives on our servers.  The
driver for some reason doesn't export this info for Dell systems with  8
drives.

Ideally there should be an enclosure.c device defined for every device
type.  Currently only ses.c seems to use this, but SCSI enclosure services
aren't available on SSDs.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Proposal: Add Drive Enclosure/Slot mapping to systemd

2015-03-02 Thread Cristian Rodríguez
On Mon, Mar 2, 2015 at 12:48 PM, Jordan Hargrave jhar...@gmail.com wrote:
 It would be nice if systemd could discover and display enclosure/bay slot
 mappings for drives in the system.  The /dev/disk/by-path method doesn't
 quite work, for SAS drives the ID can change on hotplug.  The slot mapping
 also doesn't handle PCIe SSD devices as they are bare block devices and
 don't use SCSI midlayer.  Proposing to add support for something like
 /dev/disk/by-enclosure/encl-XXX-slot-YYY symlink for block devices.

As far as I am aware, no new things dealing with storage naming rules
will be added to udev/systemd, it has to go to whatever other
project..(sg3_utils last time I checked)
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Proposal: Add Drive Enclosure/Slot mapping to systemd

2015-03-02 Thread Lennart Poettering
On Mon, 02.03.15 15:33, Cristian Rodríguez (crrodrig...@opensuse.org) wrote:

 On Mon, Mar 2, 2015 at 12:48 PM, Jordan Hargrave jhar...@gmail.com wrote:
  It would be nice if systemd could discover and display enclosure/bay slot
  mappings for drives in the system.  The /dev/disk/by-path method doesn't
  quite work, for SAS drives the ID can change on hotplug.  The slot mapping
  also doesn't handle PCIe SSD devices as they are bare block devices and
  don't use SCSI midlayer.  Proposing to add support for something like
  /dev/disk/by-enclosure/encl-XXX-slot-YYY symlink for block devices.
 
 As far as I am aware, no new things dealing with storage naming rules
 will be added to udev/systemd, it has to go to whatever other
 project..(sg3_utils last time I checked)

Well, that's not precisely true. Yes, more exotic stuff like SCSI/SAS
should be maintained elsewhere, like in sg3_utils, but if something is
common enough, so that it used on a large percentage of systems (like
SATA), then we of course will support this in systemd/udev natively.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Proposal: Add Drive Enclosure/Slot mapping to systemd

2015-03-02 Thread Tom Gundersen
On Mon, Mar 2, 2015 at 5:42 PM, Jordan Hargrave jhar...@gmail.com wrote:


 On Mon, Mar 2, 2015 at 10:24 AM, Andrei Borzenkov arvidj...@gmail.com
 wrote:

 В Mon, 2 Mar 2015 09:48:51 -0600
 Jordan Hargrave jhar...@gmail.com пишет:

  It would be nice if systemd could discover and display enclosure/bay
  slot
  mappings for drives in the system.  The /dev/disk/by-path method doesn't
  quite work, for SAS drives the ID can change on hotplug.  The slot
  mapping
  also doesn't handle PCIe SSD devices as they are bare block devices and
  don't use SCSI midlayer.  Proposing to add support for something like
  /dev/disk/by-enclosure/encl-XXX-slot-YYY symlink for block devices.

 How it should be discovered? Is there universal method that can be used
 on majority of systems?


 For Dell system PCIE SSD it requires using ipmitool OEM command to get the
 correct Bus:Device:Function to Enclosure:Slot mapping.  For devices using
 SAS controllers it's a bit more tricky.  There is a sysfs variable for
 enclosure/slot in sysfs for SAS devices with 8 drives on our servers.  The
 driver for some reason doesn't export this info for Dell systems with  8
 drives.

 Ideally there should be an enclosure.c device defined for every device type.
 Currently only ses.c seems to use this, but SCSI enclosure services aren't
 available on SSDs.

Sounds like something the kernel could/should expose in some uniform way, no?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel