Problem
Failed faulty running or dead multipath was showing on one of my servers as shown below. I need to remove this dead multipath without rebooting the machine.
[root@dbappweb.com ~]# multipath -ll mpathn
mpathn (30000000000000000) dm-27 3PARdata,VV
size=1.0T features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=0 status=enabled
|- 2:0:0:6 sdh 8:112 failed faulty running
|- 1:0:0:6 sdz 65:144 failed faulty running
|- 2:0:2:6 sdq 65:0 failed faulty running
|- 1:0:2:6 sdai 66:32 failed faulty running
|- 2:0:0:10 sdar 66:176 failed faulty running
|- 1:0:0:10 sdap 66:144 failed faulty running
|- 2:0:2:10 sdas 66:192 failed faulty running
`- 1:0:2:10 sdaq 66:160 failed faulty running
Solution
The dead multipath device can be simply removed by using the command multipath -f <LUN name> and no need to reboot the server.
[root@dbappweb.com ~]# multipath -f mpathn
Verify the deletion of the dead multipath device by using the command multipath -ll <LUN name>, it should not show any failed faulty running path.
[root@dbappweb.com ~]# multipath -ll mpathn
If want to know about the multipath command then run the multipath -h command to display all options which can be used.
[root@dbappweb.com ~]# multipath -h
multipath-tools v0.4.9 (04/04, 2009)
Usage:
multipath [-a|-c|-w|-W] [-d] [-r] [-v lvl] [-p pol] [-b fil] [-q] [dev]
multipath -l|-ll|-f [-v lvl] [-b fil] [dev]
multipath -F [-v lvl]
multipath -h
Where:
-h print this usage text
-l show multipath topology (sysfs and DM info)
-ll show multipath topology (maximum info)
-f flush a multipath device map
-F flush all multipath device maps
-a add a device wwid to the wwids file
-c check if a device should be a path in a multipath device
-q allow queue_if_no_path when multipathd is not running
-d dry run, do not create or update devmaps
-r force devmap reload
-p policy failover|multibus|group_by_serial|group_by_prio|
group_by_node_name
-w remove a device from the wwids file
-W reset the wwids file include only the current devices
-b fil bindings file location
-p pol force all maps to specified path grouping policy :
. failover one path per priority group
. multibus all paths in one priority group
. group_by_serial one priority group per serial
. group_by_prio one priority group per priority lvl
. group_by_node_name one priority group per target node
-v lvl verbosity level
. 0 no output
. 1 print created devmap names only
. 2 default verbosity
. 3 print debug information
dev action limited to:
. multipath named 'dev' (ex: mpath0) or
. multipath whose wwid is 'dev' (ex: 60051..)
. multipath including the path named 'dev' (ex: /dev/sda)
. multipath including the path with maj:min 'dev' (ex: 8:0)
Last Updated: August 22, 2020