Table of Contents
Unnecessary multipath devices
Error description
Sometimes local hard disks are also controlled by multipath. The command multipath -l
then displays these disks as multipath devices although they only have one path. In the example below is the last displayed device an unnecessary multipath device with only one path:
root@kvm55:~# multipath -l 350002ac21d622071 dm-4 3PARdata,VV size=5.0G features='0' hwhandler='0' wp=rw `-+- policy='round-robin 0' prio=-1 status=active |- 6:0:0:0 sdb 8:16 active undef running `- 5:0:0:0 sdc 8:32 active undef running 350002ac21d632071 dm-2 3PARdata,VV size=500G features='0' hwhandler='0' wp=rw `-+- policy='round-robin 0' prio=-1 status=active |- 6:0:0:1 sdd 8:48 active undef running `- 5:0:0:1 sde 8:64 active undef running 36848f690ebf1a7001afab704197c80a dm-8 DELL,PERC H700 size=90.0G features=‘0‘ hwhandler=‘0‘ wp=rw `-+- policy=‘round-robin 0‘ prio=-1 status=active `- 0:2:1:0 sdf 8:16 active undef running
The display of a hard disk as a multipath device causes no problem for the stability of the system. But for the following management tasks can the unnecessary device cause problems:
Disable multipath
Multipath cannot be disabled, because a local hard disk under the control of multipath cannot be disabled.
The unnecessary DM device causes problems
Multipath devices are also DM device. Therefore the unnecessary multipath device generates also an unnecessary DM device. The additional DM device possibly interferes with other tools like Puppet. On the other hand the monitoring (OMD/Nagios) recognizes the additional DM device and generates error messages when the device disappears.
Failure cause
The error is caused by multipath itself: It recognizes multipath devices automatically. Recognition of unnecessary multipath devices can only be prevented by a proper multipath configuration: Unnecessary devices have to be blacklisted (see the example below in the section 'Solution').
Solution
Remove the unnecessary multipath device
Because of the possible problems the unnecessary multipath device should be removed. Before the removal all processes have to be finished that access the device. These can be mount processes or LVM devices. LVM partitions on the unnecessary device have to be removed. Data on the partitions possibly have to be moved to other partitions. If the unnecessary multipath device contains a partition that cannot be removed from a running system (e.g. the root partition), the device has to removed from the multipath configuration first. Afterwards the host has to be rebooted.
When all access to the affected device was finished, it would be possible to remove the device from the running system. As device reference the device name displayed by multipath -l
can be used:
root@kvm55:~# dmsetup remove 36848f690ebf1a7001afab704197c80a root@kvm55:~#
When successful, the command delivers no output. Another execution of multipath -l
proves, that the unnecessary multipath device has disappeared:
root@kvm55:~# multipath -l 350002ac21d622071 dm-4 3PARdata,VV size=5.0G features='0' hwhandler='0' wp=rw `-+- policy='round-robin 0' prio=-1 status=active |- 6:0:0:0 sdb 8:16 active undef running `- 5:0:0:0 sdc 8:32 active undef running 350002ac21d632071 dm-2 3PARdata,VV size=500G features='0' hwhandler='0' wp=rw `-+- policy='round-robin 0' prio=-1 status=active |- 6:0:0:1 sdd 8:48 active undef running `- 5:0:0:1 sde 8:64 active undef running
Prevent the unnecessary multipath device from reappearing
Multipath automatically recognizes devices to be managed. Unnecessary multipath devices that where just removed from the command line would reappear after a reboot. This can be prevented by blacklisting the device by an additional blacklist entry into the multipath configuration file '/etc/multipath.conf'. For the example depicted above the result would look like this:
root@kvm55:~# grep -A 6 “blacklist {“ /etc/multipath.conf blacklist { devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[-0-9]*" devnode "^sdf" devnode "^hd[a-z]" devnode "^dcssblk[0-9]*" devnode "^cciss!c[0-9]d[0-9]*" }
In the example above the entry 'devnode “^sdf”' prevents the reappearance of the unnecessary multipath device after reboot.