Question: How To remove the Multipath Device after Unmapping the LUN from the Server?
For example the “mpath4” in below output is not in use and needs to be removed.
# multipath -ll
sda: checker msg is "tur checker reports path is down"
sdd: checker msg is "tur checker reports path is down"
1_oracle_index ( Unique WWID ) dm-10 HP,MSA2012fc
[size=1.4T][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=0][active]
\_ 0:0:1:13 sdc 8:32 [active][ready]
\_ 1:0:1:13 sdf 8:80 [active][ready]
1_oracle_data ( Unique WWID ) dm-9 HP,MSA2012fc
[size=1.4T][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=0][active]
\_ 0:0:1:12 sdb 8:16 [active][ready]
\_ 1:0:1:12 sde 8:64 [active][ready]
mpath4 ( Unique WWID ) dm-8 HP,MSA2012fc
[size=1.0G][features=0][hwhandler=0][rw]
\_ round-robin 0 [prio=0][enabled]
\_ 0:0:1:10 sda 8:0 [failed][faulty]
\_ 1:0:1:10 sdd 8:48 [failed][faulty]
Follow the steps outlined below to remove the failed/faulty device from multipath.
1. Flush the multipath device “mpath4” or wwid if different from alias. in this example alias is “mpath4”. Use “-f” to flush the multipath map.
# multipath -f mpath4
2. Run the multipath command again to confirm.
# multipath -ll sda: checker msg is "tur checker reports path is down" sdd: checker msg is "tur checker reports path is down" 1_oracle_index ( Unique WWID ) dm-10 HP,MSA2012fc [size=1.4T][features=1 queue_if_no_path][hwhandler=0][rw] \_ round-robin 0 [prio=0][active] \_ 0:0:1:13 sdc 8:32 [active][ready] \_ 1:0:1:13 sdf 8:80 [active][ready] 1_oracle_data ( Unique WWID ) dm-9 HP,MSA2012fc [size=1.4T][features=1 queue_if_no_path][hwhandler=0][rw] \_ round-robin 0 [prio=0][active] \_ 0:0:1:12 sdb 8:16 [active][ready] \_ 1:0:1:12 sde 8:64 [active][ready]
As seen from the output above, the multipath device mpath4 is now removed from the server.