[Bug 1283303] [NEW] ATA drive /dev/disk/by-path/ incorrect due to kernel change
Lucas Magasweran
external+ubuntu.com at magasweran.com
Sat Feb 22 00:35:57 UTC 2014
Public bug reported:
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.
** Affects: udev (Ubuntu)
Importance: Undecided
Status: New
--
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:
New
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