Bug 1312182 - ID_SAS_PATH is not generated in /dev/disk/by-path/
ID_SAS_PATH is not generated in /dev/disk/by-path/
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd (Show other bugs)
7.1
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: systemd-maint
qe-baseos-daemons
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-25 21:30 EST by zhongyan
Modified: 2017-08-03 03:51 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description zhongyan 2016-02-25 21:30:27 EST
Not sure I'm filing a bug on the right category.
I have two machines with the exact same configuration(hardware and software).
 I use these machines for storage purpose, so the issue I reported here is related to storage. 
both are installed with the same os version:
#cat /etc/redhat-release 
CentOS Linux release 7.1.1503 (Core)

however, I found the two machines behaved differently:
for any block devices, one machine has only one symbolic link in /dev/disk/by-path/ while antoher machine has two.
take /dev/sdd as an example:
In machine A:
# ls -l /dev/disk/by-path/*|grep sdd
lrwxrwxrwx 1 root root  9 Feb  3 19:30 /dev/disk/by-path/pci-0000:04:00.0-sas-0x56c92bf000377aaa-lun-0 -> ../../sdd


In machine B:
# ls -l /dev/disk/by-path/*|grep sdd
lrwxrwxrwx 1 root root  9 Feb  3 23:11 /dev/disk/by-path/pci-0000:04:00.0-sas-0x56c92bf00037986a-lun-0 -> ../../sdd
lrwxrwxrwx 1 root root  9 Feb  3 23:11 /dev/disk/by-path/pci-0000:04:00.0-sas-exp0x56c92bf00037987f-phy10-lun-0 -> ../../sdd

seems that machine B has one more link via expander for sdd. I'm sure disks in both machines are cabled in the same way.

udevadm test-builtin in both machines shows the same output as following:
# udevadm test-builtin path_id /sys/block/sdd
calling: test-builtin
=== trie on-disk ===
tool version:          219
file size:         6860207 bytes
header size             80 bytes
strings            1870199 bytes
nodes              4989928 bytes
Load module index
Network interface NamePolicy= disabled on kernel command line, ignoring.
Created link configuration context.
ID_SAS_PATH=pci-0000:04:00.0-sas-exp0x56c92bf000377abf-phy10-lun-0
ID_PATH=pci-0000:04:00.0-sas-0x56c92bf000377aaa-lun-0
ID_PATH_TAG=pci-0000_04_00_0-sas-0x56c92bf000377aaa-lun-0
Unload module index
Unloaded link configuration context.

here ID_SAS_PATH and ID_PATH are all there.


however, udevadm info -q all -n /dev/sdd outputs are different for A and B:
in machine A:
# udevadm info -q all -n /dev/sdd
P: /devices/pci0000:00/0000:00:02.2/0000:04:00.0/host0/port-0:0/expander-0:0/port-0:0:2/end_device-0:0:2/target0:0:2/0:0:2:0/block/sdd
N: sdd
S: disk/by-id/ata-ST4000NM0024-1HT178_Z4F0GAMP
S: disk/by-id/wwn-0x5000c50087889d3a
S: disk/by-path/pci-0000:04:00.0-sas-0x56c92bf000377aaa-lun-0
E: DEVLINKS=/dev/disk/by-id/ata-ST4000NM0024-1HT178_Z4F0GAMP /dev/disk/by-id/wwn-0x5000c50087889d3a /dev/disk/by-path/pci-0000:04:00.0-sas-0x56c92bf000377aaa-lun-0
E: DEVNAME=/dev/sdd
E: DEVPATH=/devices/pci0000:00/0000:00:02.2/0000:04:00.0/host0/port-0:0/expander-0:0/port-0:0:2/end_device-0:0:2/target0:0:2/0:0:2:0/block/sdd
E: DEVTYPE=disk
E: ID_ATA=1
E: ID_ATA_DOWNLOAD_MICROCODE=1
E: ID_ATA_FEATURE_SET_PM=1
E: ID_ATA_FEATURE_SET_PM_ENABLED=1
E: ID_ATA_FEATURE_SET_PUIS=1
E: ID_ATA_FEATURE_SET_PUIS_ENABLED=0
E: ID_ATA_FEATURE_SET_SECURITY=1
E: ID_ATA_FEATURE_SET_SECURITY_ENABLED=0
E: ID_ATA_FEATURE_SET_SECURITY_ENHANCED_ERASE_UNIT_MIN=424
E: ID_ATA_FEATURE_SET_SECURITY_ERASE_UNIT_MIN=424
E: ID_ATA_FEATURE_SET_SMART=1
E: ID_ATA_FEATURE_SET_SMART_ENABLED=1
E: ID_ATA_ROTATION_RATE_RPM=7200
E: ID_ATA_SATA=1
E: ID_ATA_SATA_SIGNAL_RATE_GEN1=1
E: ID_ATA_SATA_SIGNAL_RATE_GEN2=1
E: ID_ATA_WRITE_CACHE=1
E: ID_ATA_WRITE_CACHE_ENABLED=1
E: ID_BUS=ata
E: ID_MODEL=ST4000NM0024-1HT178
E: ID_MODEL_ENC=ST4000NM0024-1HT178\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
E: ID_PART_TABLE_TYPE=gpt
E: ID_PATH=pci-0000:04:00.0-sas-0x56c92bf000377aaa-lun-0
E: ID_PATH_TAG=pci-0000_04_00_0-sas-0x56c92bf000377aaa-lun-0
E: ID_REVISION=SN05
E: ID_SERIAL=ST4000NM0024-1HT178_Z4F0GAMP
E: ID_SERIAL_SHORT=Z4F0GAMP
E: ID_TYPE=disk
E: ID_WWN=0x5000c50087889d3a
E: ID_WWN_WITH_EXTENSION=0x5000c50087889d3a
E: MAJOR=8
E: MINOR=48
E: MPATH_SBIN_PATH=/sbin
E: SUBSYSTEM=block
E: TAGS=:systemd:
E: USEC_INITIALIZED=754155

[root@rg1-ceph65 /lib/udev/rules.d]# udevadm test-builtin path_id /sys/block/sdd
calling: test-builtin
=== trie on-disk ===
tool version:          219
file size:         6860207 bytes
header size             80 bytes
strings            1870199 bytes
nodes              4989928 bytes
Load module index
Network interface NamePolicy= disabled on kernel command line, ignoring.
Created link configuration context.
ID_SAS_PATH=pci-0000:04:00.0-sas-exp0x56c92bf000377abf-phy10-lun-0
ID_PATH=pci-0000:04:00.0-sas-0x56c92bf000377aaa-lun-0
ID_PATH_TAG=pci-0000_04_00_0-sas-0x56c92bf000377aaa-lun-0
Unload module index
Unloaded link configuration context.
[root@rg1-ceph65 /lib/udev/rules.d]# cat /etc/redhat-release 
CentOS Linux release 7.1.1503 (Core) 
[root@rg1-ceph65 /lib/udev/rules.d]# ls -l /dev/disk/by-path/*|grep sdd
lrwxrwxrwx 1 root root  9 Feb  3 19:30 /dev/disk/by-path/pci-0000:04:00.0-sas-0x56c92bf000377aaa-lun-0 -> ../../sdd
lrwxrwxrwx 1 root root 10 Feb  4 17:29 /dev/disk/by-path/pci-0000:04:00.0-sas-0x56c92bf000377aaa-lun-0-part1 -> ../../sdd1
[root@rg1-ceph65 /lib/udev/rules.d]# udevadm info -q all -n /dev/sdd
P: /devices/pci0000:00/0000:00:02.2/0000:04:00.0/host0/port-0:0/expander-0:0/port-0:0:2/end_device-0:0:2/target0:0:2/0:0:2:0/block/sdd
N: sdd
S: disk/by-id/ata-ST4000NM0024-1HT178_Z4F0GAMP
S: disk/by-id/wwn-0x5000c50087889d3a
S: disk/by-path/pci-0000:04:00.0-sas-0x56c92bf000377aaa-lun-0
E: DEVLINKS=/dev/disk/by-id/ata-ST4000NM0024-1HT178_Z4F0GAMP /dev/disk/by-id/wwn-0x5000c50087889d3a /dev/disk/by-path/pci-0000:04:00.0-sas-0x56c92bf000377aaa-lun-0
E: DEVNAME=/dev/sdd
E: DEVPATH=/devices/pci0000:00/0000:00:02.2/0000:04:00.0/host0/port-0:0/expander-0:0/port-0:0:2/end_device-0:0:2/target0:0:2/0:0:2:0/block/sdd
E: DEVTYPE=disk
E: ID_ATA=1
E: ID_ATA_DOWNLOAD_MICROCODE=1
E: ID_ATA_FEATURE_SET_PM=1
E: ID_ATA_FEATURE_SET_PM_ENABLED=1
E: ID_ATA_FEATURE_SET_PUIS=1
E: ID_ATA_FEATURE_SET_PUIS_ENABLED=0
E: ID_ATA_FEATURE_SET_SECURITY=1
E: ID_ATA_FEATURE_SET_SECURITY_ENABLED=0
E: ID_ATA_FEATURE_SET_SECURITY_ENHANCED_ERASE_UNIT_MIN=424
E: ID_ATA_FEATURE_SET_SECURITY_ERASE_UNIT_MIN=424
E: ID_ATA_FEATURE_SET_SMART=1
E: ID_ATA_FEATURE_SET_SMART_ENABLED=1
E: ID_ATA_ROTATION_RATE_RPM=7200
E: ID_ATA_SATA=1
E: ID_ATA_SATA_SIGNAL_RATE_GEN1=1
E: ID_ATA_SATA_SIGNAL_RATE_GEN2=1
E: ID_ATA_WRITE_CACHE=1
E: ID_ATA_WRITE_CACHE_ENABLED=1
E: ID_BUS=ata
E: ID_MODEL=ST4000NM0024-1HT178
E: ID_MODEL_ENC=ST4000NM0024-1HT178\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
E: ID_PART_TABLE_TYPE=gpt
E: ID_PATH=pci-0000:04:00.0-sas-0x56c92bf000377aaa-lun-0
E: ID_PATH_TAG=pci-0000_04_00_0-sas-0x56c92bf000377aaa-lun-0
E: ID_REVISION=SN05
E: ID_SERIAL=ST4000NM0024-1HT178_Z4F0GAMP
E: ID_SERIAL_SHORT=Z4F0GAMP
E: ID_TYPE=disk
E: ID_WWN=0x5000c50087889d3a
E: ID_WWN_WITH_EXTENSION=0x5000c50087889d3a
E: MAJOR=8
E: MINOR=48
E: MPATH_SBIN_PATH=/sbin
E: SUBSYSTEM=block
E: TAGS=:systemd:
E: USEC_INITIALIZED=754155

in machine B:
# udevadm info -q all -n /dev/sdd
P: /devices/pci0000:00/0000:00:02.2/0000:04:00.0/host0/port-0:0/expander-0:0/port-0:0:2/end_device-0:0:2/target0:0:2/0:0:2:0/block/sdd
N: sdd
S: disk/by-id/ata-ST4000NM0024-1HT178_Z4F0GB0Y
S: disk/by-id/wwn-0xa1e98788c5005000
S: disk/by-path/pci-0000:04:00.0-sas-0x56c92bf00037986a-lun-0
S: disk/by-path/pci-0000:04:00.0-sas-exp0x56c92bf00037987f-phy10-lun-0
E: DEVLINKS=/dev/disk/by-id/ata-ST4000NM0024-1HT178_Z4F0GB0Y /dev/disk/by-id/wwn-0xa1e98788c5005000 /dev/disk/by-path/pci-0000:04:00.0-sas-0x56c92bf00037986a-lun-0 /dev/disk/by-pa
th/pci-0000:04:00.0-sas-exp0x56c92bf00037987f-phy10-lun-0E: DEVNAME=/dev/sdd
E: DEVPATH=/devices/pci0000:00/0000:00:02.2/0000:04:00.0/host0/port-0:0/expander-0:0/port-0:0:2/end_device-0:0:2/target0:0:2/0:0:2:0/block/sdd
E: DEVTYPE=disk
E: ID_ATA=1
E: ID_ATA_DOWNLOAD_MICROCODE=1
E: ID_ATA_FEATURE_SET_PM=1
E: ID_ATA_FEATURE_SET_PM_ENABLED=1
E: ID_ATA_FEATURE_SET_PUIS=1
E: ID_ATA_FEATURE_SET_PUIS_ENABLED=0
E: ID_ATA_FEATURE_SET_SECURITY=1
E: ID_ATA_FEATURE_SET_SECURITY_ENABLED=0
E: ID_ATA_FEATURE_SET_SECURITY_ENHANCED_ERASE_UNIT_MIN=414
E: ID_ATA_FEATURE_SET_SECURITY_ERASE_UNIT_MIN=414
E: ID_ATA_FEATURE_SET_SMART=1
E: ID_ATA_FEATURE_SET_SMART_ENABLED=1
E: ID_ATA_ROTATION_RATE_RPM=7200
E: ID_ATA_SATA=1
E: ID_ATA_SATA_SIGNAL_RATE_GEN1=1
E: ID_ATA_SATA_SIGNAL_RATE_GEN2=1
E: ID_ATA_WRITE_CACHE=1
E: ID_ATA_WRITE_CACHE_ENABLED=1
E: ID_BUS=ata
E: ID_MODEL=ST4000NM0024-1HT178
E: ID_MODEL_ENC=ST4000NM0024-1HT178\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
E: ID_PART_TABLE_TYPE=gpt
E: ID_PATH=pci-0000:04:00.0-sas-0x56c92bf00037986a-lun-0
E: ID_PATH_TAG=pci-0000_04_00_0-sas-0x56c92bf00037986a-lun-0
E: ID_REVISION=SN05
E: ID_SAS_PATH=pci-0000:04:00.0-sas-exp0x56c92bf00037987f-phy10-lun-0
E: ID_SERIAL=ST4000NM0024-1HT178_Z4F0GB0Y
E: ID_SERIAL_SHORT=Z4F0GB0Y
E: ID_TYPE=disk
E: ID_WWN=0xa1e98788c5005000
E: ID_WWN_WITH_EXTENSION=0xa1e98788c5005000
E: MAJOR=8
E: MINOR=48
E: MPATH_SBIN_PATH=/sbin
E: SUBSYSTEM=block
E: TAGS=:systemd:
E: USEC_INITIALIZED=359459


The bottomline is machineA doesn't detect ID_SAS_PATH and therefo doesn't generate corresponding /dev/disk/by-path/ link while machine B did.
the question is why is the defference.

BTW, I searched redhat's website, and got a related issue report:
This update provides udev identifiers based on physical layer of the OSI model (PHY) identifier, so that both ID_SAS_PATH and ID_PATH identifiers are set for Serial Attached SCSI (SAS) disk drives. (BZ#957112)

Not sure it is related to my issue.
Comment 2 Michal Sekletar 2016-07-20 03:01:27 EDT
udev in RHEL7 is part of systemd package. Moving against correct component.

Note You need to log in before you can comment on or make changes to this bug.