[systemd-devel] [PATCH] udevd: SAS: use SAS addr + PHY id in by-path whenever possible.
Zbigniew Jędrzejewski-Szmek
zbyszek at in.waw.pl
Tue Sep 23 05:03:47 PDT 2014
On Tue, Sep 23, 2014 at 12:33:54PM +0200, Maurizio Lombardi wrote:
>
> On Mon, 2014-09-22 at 16:58 +0200, Tom Gundersen wrote:
> > Hi Maurizio,
> >
> > On Mon, Sep 22, 2014 at 11:48 AM, Maurizio Lombardi <mlombard at redhat.com> wrote:
> > > This patch changes the naming scheme for sas disks. The original names used
> > > disk's sas address and lun, the new scheme uses sas address of the
> > > nearest expander (if available) and a phy id of the used connection.
> > > If no expander is used, the phy id of hba phy is used.
> > > Note that names that refer to RAID or other abstract devices are
> > > unchanged.
> >
> > What's the problem with the current scheme, what's the benefit of the
> > new one? Will this break backwards compatibility, if so, why is this
> > justifiable?
>
> Suppose you have the following configuration:
>
> pci card --> SAS expander --> hard drive
>
> you can think to an expander as a box with N slots, each slot can be connected to 1 hard drive.
>
> The problem with the current scheme is that it uses the SAS addr of the
> hard drives in by-path names and this is not sufficient to identify its physical
> position, which is what by-path is supposed to do.
>
> Example:
>
> If we add an hard disk to the SAS expander, what will we find in by-path?
>
> ------------
> Current scheme:
> pci-0000:1c:00.0-sas-0x5000c5001ac1031a-lun-0 -> ../../sdc
>
> New scheme:
> pci-0000:1c:00.0-sas-exp0x5003048000201dff-phy2-lun-0 -> ../../sdc
> ------------
>
> Now, what happens if we move the drive to a different slot?
>
> ------------
> Current scheme:
> pci-0000:1c:00.0-sas-0x5000c5001ac1031a-lun-0 -> ../../sdc
>
> New scheme:
> pci-0000:1c:00.0-sas-exp0x5003048000201dff-phy4-lun-0 -> ../../sdc
> ------------
>
> As you can see, with the current scheme by-path is not functioning as intended because
> it does not show the change of the physical position of the drive.
>
> So, it would be better to use the SAS addr of the nearest expander plus the
> PHY id the disk is connected to;
> this way, when you move the drive, the change will be reflected in the by-path
> link, as shown in the example before.
>
> Note: it is not always possible get the PHY id the drive is connected to (it happens when SAS wide ports are used);
> in this case, we'll keep the old by-path format.
Patch looks OK. I think we should apply it. It's unfortunate that it
breaks the naming with previous releases, but it seems better to break
it now than to continue with the existing insufficient mechanism.
Zbyszek
More information about the systemd-devel
mailing list