Ubuntu Virtual Machines on VMware and Multipathd syslog messages

Everynow and then you might install a Ubuntu or Debian machine and get multipath daemon pushed along the way.

Multipathd is used in environments where a disk may have one or more paths to it. Think of isci/fiber/SAN etc. If one path drops, it still might be available on the others.

However, in an environment with Virtual Disks this isn’t useful. And your syslog might get spammed with entries like the ones below, at least my syslog did.

multipathd[651]: sda: add missing path
multipathd[651]: sda: failed to get udev uid: Invalid argument
multipathd[651]: sda: failed to get sysfs uid: Invalid argument
multipathd[651]: sda: failed to get sgio uid: No such file or directory
multipathd[651]: sda: add missing path
multipathd[651]: sda: failed to get udev uid: Invalid argument
multipathd[651]: sda: failed to get sysfs uid: Invalid argument
multipathd[651]: sda: failed to get sgio uid: No such file or directory

There is a simple resolution to this issue.
Modify your multipath daemon config. Open the file /etc/multipath.conf in your favorite texteditor and ensure it looks like the following:

defaults {
    user_friendly_names yes
}

blacklist {
    device {
        vendor "VMware"
        product "Virtual disk"
    }
}

Now restart your multipath-tools service

/etc/init.d/multipath-tools restart

Your syslog should get less messages that you can’t resolve anyway.

Other options are to turn Multipath complete off with the commands:

systemctl disable multipathd
systemctl stop multipathd

OR you can modify your virtual machine definition in VMware (esx or Workstation) by adding the following to the .vmx file:

disk.EnableUUID = "TRUE"