[Bug 1283303] Re: ATA drive /dev/disk/by-path/ incorrect due to kernel change
Martin Pitt
martin.pitt at ubuntu.com
Wed Mar 5 08:29:58 UTC 2014
Which udev version did you do this patch against? Ubuntu 12.04 currently
has 175-0ubuntu9.4, and it does not have this code at all. In
particular, "This is true for Ubuntu 12.04.3 (quantal)" is wrong
(12.04.x is precise, not quantal), and 12.04's udev does not have the
/ata check at all. This was only introduced later on in saucy (13.10)
when we moved to systemd's udev version.
This does have this check, just at a different position:
/*
* We do not support the ATA transport class, it uses global counters
* to name the ata devices which numbers spread across multiple
* controllers.
*
* The real link numbers are not exported. Also, possible chains of ports
* behind port multipliers cannot be composed that way.
*
* Until all that is solved at the kernel level, there are no by-path/
* links for ATA devices.
*/
if (strstr(name, "/ata") != NULL) {
parent = NULL;
goto out;
}
** Changed in: udev (Ubuntu)
Status: New => Incomplete
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to udev in Ubuntu.
https://bugs.launchpad.net/bugs/1283303
Title:
ATA drive /dev/disk/by-path/ incorrect due to kernel change
Status in “udev” package in Ubuntu:
Incomplete
Bug description:
Starting in Ubuntu 12.04.3 the kernel commit
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9a6d6a2ddabbd32c07f6a38b659e5f3db319fa5a
changed the ATA host topology changed. This was done to match the
single host to target topology of SCSI/SAS instead of having a single
host with multiple ports.
As a result, when a drive is detected by udev the path ID is
determined and assumes a multi-port host that must be rebased. This
results in /dev/disk/by-path/ nodes that overlap. For example, the
following shows two different disks, sdb and sdc, that have the same
scsi-0:0:0:0 path.
# Before inserting second disk:
ubuntu at ubuntu:~$ ls -l /dev/disk/by-path/
total 0
lrwxrwxrwx 1 root root 9 Feb 21 15:57 pci-0000:00:1a.7-usb-0:5:1.0-scsi-0:0:0:0 -> ../../sda
lrwxrwxrwx 1 root root 10 Feb 21 15:57 pci-0000:00:1a.7-usb-0:5:1.0-scsi-0:0:0:0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 9 Feb 21 23:58 pci-0000:11:02.0-scsi-0:0:0:0 -> ../../sdb
lrwxrwxrwx 1 root root 10 Feb 21 23:58 pci-0000:11:02.0-scsi-0:0:0:0-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Feb 21 23:58 pci-0000:11:02.0-scsi-0:0:0:0-part2 -> ../../sdb2
lrwxrwxrwx 1 root root 10 Feb 21 23:58 pci-0000:11:02.0-scsi-0:0:0:0-part3 -> ../../sdb3
lrwxrwxrwx 1 root root 10 Feb 21 23:58 pci-0000:11:02.0-scsi-0:0:0:0-part5 -> ../../sdb5
lrwxrwxrwx 1 root root 10 Feb 21 23:58 pci-0000:11:02.0-scsi-0:0:0:0-part6 -> ../../sdb6
# After inserting second disk:
ubuntu at ubuntu:~$ ls -l /dev/disk/by-path/
total 0
lrwxrwxrwx 1 root root 9 Feb 21 15:57 pci-0000:00:1a.7-usb-0:5:1.0-scsi-0:0:0:0 -> ../../sda
lrwxrwxrwx 1 root root 10 Feb 21 15:57 pci-0000:00:1a.7-usb-0:5:1.0-scsi-0:0:0:0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 9 Feb 21 23:58 pci-0000:11:02.0-scsi-0:0:0:0 -> ../../sdc
lrwxrwxrwx 1 root root 10 Feb 21 23:58 pci-0000:11:02.0-scsi-0:0:0:0-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Feb 21 23:58 pci-0000:11:02.0-scsi-0:0:0:0-part2 -> ../../sdb2
lrwxrwxrwx 1 root root 10 Feb 21 23:58 pci-0000:11:02.0-scsi-0:0:0:0-part3 -> ../../sdb3
lrwxrwxrwx 1 root root 10 Feb 21 23:58 pci-0000:11:02.0-scsi-0:0:0:0-part5 -> ../../sdb5
lrwxrwxrwx 1 root root 10 Feb 21 23:58 pci-0000:11:02.0-scsi-0:0:0:0-part6 -> ../../sdb6
I have a fix proposed and will attach a patch. I have tested it on all 12.04 releases including 12.04.4.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/udev/+bug/1283303/+subscriptions
More information about the foundations-bugs
mailing list