Hey, On Thu, Aug 5, 2010 at 9:35 AM, Hannes Reinecke <hare@xxxxxxx> wrote: >> But how is the symlink >> >> /dev/disk/by-path/pci-0000:06:00.0-sas-0x500000e01b83f523-lun-0x0000000000000000 >> -> ../../sdn >> >> in any way actually useful? I mean, this link refers to the 2nd port >> of the first LUN of some SAS device that is connected to some HBA >> connected via PCI. I can't really see how it has anything to do with >> the actual _path_ to do the disk. E.g. if I move the disk to another >> PHY on the SAS expander then that link will point to that. So it's not >> really by path. If anything, it's by-id. >> > Yeah, I've discussed the same thing with Kay. > You are right, referencing the SAS WWN of the remote port is > pointless. We should rather reference the phy-number of the local > port this device is connected to; that we'll be getting a 'real' > path-id for SAS. > Guess I have to redo that thing. That sounds good - would be nice to include the word expander in the link name so it's easy to figure out what the link is really about. Also remember that SAS enclosures can be nested - in fact, in many setups people nest enclosures like this HBA1 <-> expander1 <-> expander2 <-> expander3 Now, for a disk connected to PHY 5 of expander 1, I'd expect the name to be like this /dev/disk/by-path/pci-0000:06:00.0-sas-expander-0x500000e1-phy05 but what about a disk connected to PHY 6 of expander 2 (with expander 2 being connected to PHYs 10-13 through a wide port)? Would it be /dev/disk/by-path/pci-0000:06:00.0-sas-expander-0x500000e2-phy06 or /dev/disk/by-path/pci-0000:06:00.0-sas-expander-0x500000e1-phy10,11,12,13-sas-expander-0x500000e2-phy06 My take is that the latter is the "correct" answer but I also think it's pretty useless (kinda like the sysfs hierarchy is super deep).... at the same time I think the former is what 99.9% of people expects and wants [1]. Thoughts? > And as SES is in general handled via a different device > we'd have a hard time getting information from there. Right, the enclosure services device is a separate SCSI device. But James actually already wrote a driver for such devices and it sets up symlinks in sysfs that can be used to easily name the devices here in user space. David -- To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html