[Bug 1996958] Re: [Azure] 18.04 - non-unique PATH_ID for SCSI disks
Mauricio Faria de Oliveira
1996958 at bugs.launchpad.net
Fri Nov 18 21:01:09 UTC 2022
Scenario 2) LUN numbers 0, 1, and 5 (non-0/1 test).
$ dmesg | grep Hypervisor
[ 0.000000] Hypervisor detected: Microsoft Hyper-V
$ uname -r
5.4.0-1094-azure
$ lsscsi | grep sd
[0:0:0:0] disk Msft Virtual Disk 1.0 /dev/sda
[0:0:0:1] disk Msft Virtual Disk 1.0 /dev/sdb
[1:0:0:0] disk Msft Virtual Disk 1.0 /dev/sdc
[1:0:0:5] disk Msft Virtual Disk 1.0 /dev/sdd
$ ls -d /sys/bus/vmbus/devices/*/host*/target*/*/block/sd*
/sys/bus/vmbus/devices/f8b3781a-1e82-4818-a1c3-63d806ec15bb/host0/target0:0:0/0:0:0:0/block/sda
/sys/bus/vmbus/devices/f8b3781a-1e82-4818-a1c3-63d806ec15bb/host0/target0:0:0/0:0:0:1/block/sdb
/sys/bus/vmbus/devices/f8b3781b-1e82-4818-a1c3-63d806ec15bb/host1/target1:0:0/1:0:0:0/block/sdc
/sys/bus/vmbus/devices/f8b3781b-1e82-4818-a1c3-63d806ec15bb/host1/target1:0:0/1:0:0:5/block/sdd
Before: (non-unique ID_PATHs; some disks missing by-path symlinks)
------
$ dpkg -s udev | grep Version:
Version: 237-3ubuntu10.56
$ for sd in /sys/block/sd*; do udevadm test-builtin path_id $sd; done 2>/dev/null | grep ID_PATH= | sort | uniq -c
2 ID_PATH=acpi-VMBUS:00-scsi-0:0:0:0
1 ID_PATH=acpi-VMBUS:00-scsi-0:0:0:1
1 ID_PATH=acpi-VMBUS:00-scsi-0:0:0:5
$ ll /dev/disk/by-path
total 0
drwxr-xr-x 2 root root 200 Nov 18 20:18 ./
drwxr-xr-x 9 root root 180 Nov 18 20:18 ../
lrwxrwxrwx 1 root root 9 Nov 18 20:18 acpi-VMBUS:00-scsi-0:0:0:0 -> ../../sda
lrwxrwxrwx 1 root root 10 Nov 18 20:18 acpi-VMBUS:00-scsi-0:0:0:0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 11 Nov 18 20:18 acpi-VMBUS:00-scsi-0:0:0:0-part14 -> ../../sda14
lrwxrwxrwx 1 root root 11 Nov 18 20:18 acpi-VMBUS:00-scsi-0:0:0:0-part15 -> ../../sda15
lrwxrwxrwx 1 root root 9 Nov 18 20:18 acpi-VMBUS:00-scsi-0:0:0:1 -> ../../sdb
lrwxrwxrwx 1 root root 10 Nov 18 20:18 acpi-VMBUS:00-scsi-0:0:0:1-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 9 Nov 18 20:18 acpi-VMBUS:00-scsi-0:0:0:2 -> ../../sr0
lrwxrwxrwx 1 root root 9 Nov 18 20:18 acpi-VMBUS:00-scsi-0:0:0:5 -> ../../sdd
After: (non-unique ID_PATHs by default; unique ID_PATHs w/ opt-in)
-----
Install test packages:
$ sudo add-apt-repository ppa:mfo/lp1996958
$ sudo apt install $(dpkg -l | awk '$3 == "237-3ubuntu10.56" { print $2 }')
$ dpkg -s udev | grep Version:
Version: 237-3ubuntu10.56+lp1996958.1
$ sudo reboot
No change by default (opt-in disabled):
$ for sd in /sys/block/sd*; do udevadm test-builtin path_id $sd; done 2>/dev/null | grep ID_PATH= | sort | uniq -c
2 ID_PATH=acpi-VMBUS:00-scsi-0:0:0:0
1 ID_PATH=acpi-VMBUS:00-scsi-0:0:0:1
1 ID_PATH=acpi-VMBUS:00-scsi-0:0:0:5
$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-5.4.0-1094-azure root=UUID=898098a3-2c50-49fd-ac32-98a16d91c16b ro console=tty1 console=ttyS0 earlyprintk=ttyS0
Enable opt-in:
$ cat <<EOF | sudo tee /etc/default/grub.d/99-new-vmbus-path-id.cfg
GRUB_CMDLINE_LINUX="\$GRUB_CMDLINE_LINUX udev.new_vmbus_path_id"
EOF
$ sudo update-grub
$ sudo reboot
$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-5.4.0-1094-azure root=UUID=898098a3-2c50-49fd-ac32-98a16d91c16b ro console=tty1 console=ttyS0 earlyprintk=ttyS0 udev.new_vmbus_path_id
Fixed: (unique ID_PATHs; no disks missing by-path symlinks)
$ for sd in /sys/block/sd*; do udevadm test-builtin path_id $sd; done 2>/dev/null | grep ID_PATH= | sort | uniq -c
1 ID_PATH=acpi-VMBUS:00-vmbus-f8b3781a1e824818a1c363d806ec15bb-lun-0
1 ID_PATH=acpi-VMBUS:00-vmbus-f8b3781a1e824818a1c363d806ec15bb-lun-1
1 ID_PATH=acpi-VMBUS:00-vmbus-f8b3781b1e824818a1c363d806ec15bb-lun-0
1 ID_PATH=acpi-VMBUS:00-vmbus-f8b3781b1e824818a1c363d806ec15bb-lun-5
$ ll /dev/disk/by-path
total 0
drwxr-xr-x 2 root root 220 Nov 18 20:42 ./
drwxr-xr-x 9 root root 180 Nov 18 20:42 ../
lrwxrwxrwx 1 root root 9 Nov 18 20:42 acpi-VMBUS:00-vmbus-f8b3781a1e824818a1c363d806ec15bb-lun-0 -> ../../sda
lrwxrwxrwx 1 root root 10 Nov 18 20:42 acpi-VMBUS:00-vmbus-f8b3781a1e824818a1c363d806ec15bb-lun-0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 11 Nov 18 20:42 acpi-VMBUS:00-vmbus-f8b3781a1e824818a1c363d806ec15bb-lun-0-part14 -> ../../sda14
lrwxrwxrwx 1 root root 11 Nov 18 20:42 acpi-VMBUS:00-vmbus-f8b3781a1e824818a1c363d806ec15bb-lun-0-part15 -> ../../sda15
lrwxrwxrwx 1 root root 9 Nov 18 20:42 acpi-VMBUS:00-vmbus-f8b3781a1e824818a1c363d806ec15bb-lun-1 -> ../../sdb
lrwxrwxrwx 1 root root 10 Nov 18 20:42 acpi-VMBUS:00-vmbus-f8b3781a1e824818a1c363d806ec15bb-lun-1-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 9 Nov 18 20:42 acpi-VMBUS:00-vmbus-f8b3781a1e824818a1c363d806ec15bb-lun-2 -> ../../sr0
lrwxrwxrwx 1 root root 9 Nov 18 20:42 acpi-VMBUS:00-vmbus-f8b3781b1e824818a1c363d806ec15bb-lun-0 -> ../../sdc
lrwxrwxrwx 1 root root 9 Nov 18 20:42 acpi-VMBUS:00-vmbus-f8b3781b1e824818a1c363d806ec15bb-lun-5 -> ../../sdd
(Note the UUIDs/GUIDs match the sysfs paths.)
** Summary changed:
- [Azure] 18.04 - non-unique PATH_ID for SCSI disks
+ [Azure] 18.04 - non-unique ID_PATH for SCSI disks
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1996958
Title:
[Azure] 18.04 - non-unique ID_PATH for SCSI disks
Status in systemd package in Ubuntu:
Fix Released
Status in systemd source package in Bionic:
In Progress
Bug description:
[Impact]
* The PATH_ID for SCSI disks on Azure/Hyper-V might not be unique
with the systemd/udev version in Ubuntu 18.04 LTS (Bionic Beaver).
* This cause issues on applications that require unique PATH_IDs;
for example Veritas Dynamic Multi-Pathing (DMP).
* The fix introduces changes to PATH_ID format/values for VMBUS,
which would break stable names/links, so it must be an opt-in.
* The kernel command line option 'udev.new_vmbus_path_id' (boolean)
can be used to opt in to (different) unique PATH_IDs.
* It's not used by default (i.e., no behavior change by default).
[Test Plan]
1. Launch an Ubuntu 18.04 VM on Azure
2. Add extra disks to the VM
3. Check the disks PATH_ID for (non-)unique values
4. (Opt-in for the fix with kernel cmdline option; repeat 3.)
* Before:
$ lsscsi | grep /dev/sd
[0:0:0:0] disk Msft Virtual Disk 1.0 /dev/sdc
[0:0:0:1] disk Msft Virtual Disk 1.0 /dev/sdd
[1:0:0:0] disk Msft Virtual Disk 1.0 /dev/sda
[1:0:0:1] disk Msft Virtual Disk 1.0 /dev/sdb
$ for sd in /dev/sd?; do \
udevadm test-builtin path_id /block/${sd#/dev} \
2>/dev/null | grep ID_PATH=; \
done | sort | uniq -c
2 ID_PATH=acpi-VMBUS:00-scsi-0:0:0:0
2 ID_PATH=acpi-VMBUS:00-scsi-0:0:0:1
* After:
Opt-in mechanism:
$ cat <<EOF | sudo tee /etc/default/grub.d/99-new-vmbus-path-id.cfg
GRUB_CMDLINE_LINUX="\$GRUB_CMDLINE_LINUX udev.new_vmbus_path_id"
EOF
$ sudo update-grub
$ sudo reboot
$ for sd in /dev/sd?; do \
udevadm test-builtin path_id /block/${sd#/dev} \
2>/dev/null | grep ID_PATH=; \
done | sort | uniq -c
1 ID_PATH=acpi-VMBUS:00-vmbus-f8b3781a1e824818a1c363d806ec15bb-lun-0
1 ID_PATH=acpi-VMBUS:00-vmbus-f8b3781a1e824818a1c363d806ec15bb-lun-1
1 ID_PATH=acpi-VMBUS:00-vmbus-f8b3781b1e824818a1c363d806ec15bb-lun-0
1 ID_PATH=acpi-VMBUS:00-vmbus-f8b3781b1e824818a1c363d806ec15bb-lun-1
[Where problems might occur]
* The PATH_ID property of SCSI disks on Azure/Hyper-V
(ie, on VMBUS) might display problems, and impact
applications/userspace that use /dev/disk/by-path.
* There are no functional changes in the existing code path
(see patch for '37' and related math). The new code path
is guarded with an opt-in option (not used by default).
[Other Info]
* upstream patch:
https://github.com/systemd/systemd/commit/cf3fabacaa141a1224a2ad239806a1fa28b51687
* present in Focal and later:
systemd.git$ git describe --contains cf3fabacaa141a1224a2ad239806a1fa28b51687
v239~511
$ rmadison -a source systemd
systemd | 204-5ubuntu20 | trusty | source
systemd | 204-5ubuntu20.31 | trusty-security | source
systemd | 204-5ubuntu20.31 | trusty-updates | source
systemd | 229-4ubuntu4 | xenial | source
systemd | 229-4ubuntu21.27 | xenial-security | source
systemd | 229-4ubuntu21.31 | xenial-updates | source
systemd | 237-3ubuntu10 | bionic | source
systemd | 237-3ubuntu10.56 | bionic-security | source
systemd | 237-3ubuntu10.56 | bionic-updates | source
systemd | 245.4-4ubuntu3 | focal | source
systemd | 245.4-4ubuntu3.15 | focal-security | source
systemd | 245.4-4ubuntu3.18 | focal-updates | source
systemd | 245.4-4ubuntu3.19 | focal-proposed | source
systemd | 249.11-0ubuntu3 | jammy | source
systemd | 249.11-0ubuntu3.6 | jammy-updates | source
systemd | 251.4-1ubuntu7 | kinetic | source
systemd | 251.4-1ubuntu7 | lunar | source
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1996958/+subscriptions
More information about the foundations-bugs
mailing list