Excluding a physical disk from multipath discovery

It happens, from time to time, that you discover some issues in the configuration of your systems by analyzing deeply log files.

In this case it was in my work of customizing logcheck not to bother me with tons of fake warnings that I discovered a problem

Multipathd was trying, 3 or 4 times a day to acquire /dev/sda as a multipath resource.

Apr 28 14:17:11 pve4 systemd-udevd[23691]: sda: Failed to process device, ignoring: Resource temporarily unavailable
Apr 28 14:17:11 pve4 multipathd[692]: sda: failed to get udev uid: Invalid argument
Apr 28 14:17:11 pve4 multipathd[692]: sda: path wwid changed from '3600508b1001030373220202020200007' to ''. disallowing

At first I was concerned because I was focused on the systemd error that seemed to me like the os disk (volume on a smart array controller) was having some issues and so, at first I tried to diagnose the issue via ssacli.

Then I saw that the issue was on every cluster’s node. Even if this is more like a warning than a dangerous error, you never know what will happen in the long term, so its better investigate and solve the issue.

The first thing I found is that you can blacklist a wwid so that multipathd won’t try anymore to manage it. But (as a surprise) i found no /etc/multipath.conf on my systems.

Luckily defaults of multipath are merget with directives in the /etc/multipath.conf file. I can check with the command multipath -t (very long output, so better grep or pipe it to less.

# multipath -t
[...]
blacklist {
devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st|dcssblk)[0-9]"
devnode "^(td|hd|vd)[a-z]"
devnode "^cciss!c[0-9]d[0-9]*"
device {
vendor "SGI"
product "Universal Xport"
}
device {
vendor "^DGC"
product "LUNZ"
}
device {
vendor "EMC"
product "LUNZ"
}
device {
vendor "DELL"
product "Universal Xport"
}
device {
vendor "IBM"
product "Universal Xport"
}
device {
vendor "IBM"
product "S/390"
}
device {
vendor "(NETAPP|LSI|ENGENIO)"
product "Universal Xport"
}
device {
vendor "STK"
product "Universal Xport"
}
device {
vendor "SUN"
product "Universal Xport"
}
device {
vendor "(Intel|INTEL)"
product "VTrak V-LUN"
}
device {
vendor "Promise"
product "VTrak V-LUN"
}
device {
vendor "Promise"
product "Vess V-LUN"
}
}
[...]

So, it’s quite simple adding the following code to /etc/multipath.conf (or creating the file with the only content)

blacklist {
devnode "^sda"
}

This directive will prevent /dev/sda to be processed from multipath. Now multipathd have to reload rules.

systemctl reload multipathd.service

now I can check if changes are effective

# multipath -t
[...]
blacklist {
devnode "^sda"
devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st|dcssblk)[0-9]"
devnode "^(td|hd|vd)[a-z]"
devnode "^cciss!c[0-9]d[0-9]*"
[...]

Now in the last 24h I haven’t had any other errors in logs.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.