"multipathd: sdXX: failed to get path uid" - Native Multipath Layer Does Not Discover Physical Path Devices For LUN on CentOS/RHEL

The Problem

The native multipath subsystem will group several physical paths into a single logical block device. Using the logical block device to access the LUN helps the server survive the loss of one or more physical paths to storage. Use the multipath(8) tool to view the paths to storage from the multipath subsystem viewpoint:

# multipath -v4 -ll
===== paths list =====
uuid hcil dev dev_t pri dm_st chk_st vend/prod/rev dev_st
0:0:0:0 sda 8:0 -1 undef ready HP,LOGICAL VOLUME running
1:0:0:23 sdd 8:48 -1 undef ready HP,MSA 2040 SAN running
1:0:1:23 sde 8:64 -1 undef ready HP,MSA 2040 SAN running
2:0:0:23 sdf 8:80 -1 undef ready HP,MSA 2040 SAN running
2:0:1:23 sdg 8:96 -1 undef ready HP,MSA 2040 SAN running
...

In this example, only one physical path to storage has been detected. Examining the /var/log/messages system error file shows the entries:

Sep 8 15:08:26 geeklab kernel: [ 9931.454192] sd 1:0:0:23: [sdd] 218742784 512-byte logical blocks: (105 GB/106 GiB)
Sep 8 15:08:26 geeklab kernel: [ 9931.454200] sd 1:0:0:23: Attached scsi generic sg9 type 0
Sep 8 15:08:26 geeklab kernel: [ 9931.455097] sd 1:0:0:23: [sdd] Write Protect is off
Sep 8 15:08:26 geeklab kernel: [ 9931.455896] sd 1:0:0:23: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Sep 8 15:08:26 geeklab kernel: [ 9931.461323] sd 1:0:0:23: [sdd] Attached SCSI disk
Sep 8 15:08:26 geeklab multipathd: sdd: add path (uevent)
Sep 8 15:08:26 geeklab multipathd: sdd: failed to get path uid
Sep 8 15:08:26 geeklab multipathd: uevent trigger error

The Solution

One or more syntax errors in the /etc/multipath.conf file incorrectly configures the multipath management layer. The multipath subsystem must be tailored to the local server storage setup. An ordinary text file /etc/multipath.conf does this. An error in this file can invalidate the entire multipath layer. Consider this configuration file:

If stanza for getuid_callout is set wrongly multipath won’t properly get Path UID and mpath device won’t be created. In some case there could be a problem with special character in getuid_callout stanza:

1:# cat /etc/multipath.conf
2:device {
3:vendor "HP"
4:product "MSA 2040 SAN"
5:path_grouping_policy group_by_prio
6:getuid_callout "/sbin/scsi_id -g -u â€"n -s /block/%n"
7:prio alua
8:path_selector "round-robin 0"
9:path_checker tur
10:hardware_handler "0"
11:failback immediate
12:rr_weight uniform
13:rr_min_io 100
14:no_path_retry 18

Line #5 in this example has the error: a non-ASCII character, a A-umlaut. This error prevents the multipath layer from running the path checker and results in the path information not being availble to the multipath subsystem. Replacing the A-umlaut with an ASCII ‘a’ allows the path checker to run:

getuid_callout "/sbin/scsi_id -g -u –n -s /block/%n"

Afrer restarting the multipath service:

# service multipathd reload

shows the multipath physical paths are detected properly:

# multipath -ll
mpath1 3600c0ff00025ffaf5e2ed15701000000 dm-1 HP,MSA 2040 SAN
size=104G features='1 queue_if_no_path' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| |- 1:0:1:23 sde 8:64 active ready running
| '- 2:0:1:23 sdg 8:96 active ready running
'-+- policy='round-robin 0' prio=10 status=enabled
|- 1:0:0:23 sdd 8:48 active ready running
'- 2:0:0:23 sdf 8:80 active ready running