Therefore only one symlink is created in /dev/disk/by-path. We should use /dev/disk/by-id/ instead which is consistent across CentOS and Ubuntu and then to fall back to /dev/disk/by-path if there is no entry in by-id (this case should only occur when using virtio drives).
udev in Ubuntu returns the same path ID for all of these ATA devices (CentOS returns unique paths).
root@node- 24:/lib/ udev# udevadm test-builtin path_id /block/sda/ pci-0000: 00:1f.2- scsi-0: 0:0:0 TAG=pci- 0000_00_ 1f_2-scsi- 0_0_0_0 24:/lib/ udev# udevadm test-builtin path_id /block/sdb/ pci-0000: 00:1f.2- scsi-0: 0:0:0 TAG=pci- 0000_00_ 1f_2-scsi- 0_0_0_0 24:/lib/ udev# udevadm test-builtin path_id /block/sdc/ pci-0000: 00:1f.2- scsi-0: 0:0:0 TAG=pci- 0000_00_ 1f_2-scsi- 0_0_0_0
ID_PATH=
ID_PATH_
root@node-
ID_PATH=
ID_PATH_
root@node-
ID_PATH=
ID_PATH_
Therefore only one symlink is created in /dev/disk/by-path. We should use /dev/disk/by-id/ instead which is consistent across CentOS and Ubuntu and then to fall back to /dev/disk/by-path if there is no entry in by-id (this case should only occur when using virtio drives).