Operating System - Linux
1753760 Members
4837 Online
108799 Solutions
New Discussion юеВ

Re: DM multipath on Linux

 
SOLVED
Go to solution
John Guster
Trusted Contributor

DM multipath on Linux

How to remove paths under DM multipath management? We have 4 paths for each device, want reduce to 2. Thanks.
7 REPLIES 7
Matti_Kurkela
Honored Contributor

Re: DM multipath on Linux

First disconnect the extra paths or otherwise cause them to stop working (zoning/masking changes in FibreChannel environment?).

Then execute "multipath -f mpathXX" where mpathXX is the name of multipath device whose paths you are reducing, or "multipath -F" to remove all non-functional paths and devices from the multipath tracking at once.

MK
MK
John Guster
Trusted Contributor

Re: DM multipath on Linux

multipath -F does not work, want remove [failed][faulty] path see below:
mpath1 (12345)
[size=10 GB][features="0"][hwhandler="0"]
\_ round-robin 0 [prio=3][active]
\_ 1:0:0:35 sdc 4:32 [active][ready]
\_ 1:0:1:35 sde 4:64 [active][ready]
\_ 2:0:0:35 sdg 4:96 [active][ready]
\_ 2:0:1:35 sdi 4:128 [failed][faulty]

mpath0 (67894)
[size=10 GB][features="0"][hwhandler="0"]
\_ round-robin 0 [prio=3][active]
\_ 1:0:0:0 sdb 4:16 [active][ready]
\_ 1:0:1:0 sdd 4:48 [active][ready]
\_ 2:0:0:0 sdf 4:80 [active][ready]
\_ 2:0:1:0 sdh 4:112 [failed][faulty]
skt_skt
Honored Contributor

Re: DM multipath on Linux

Paths coming from 1:0 are from one HBA and other two paths from 2:0 which represents another HBA.

so make the masking/zoning changes mention above first so as to have one path each from each of the HBAa.
Matti_Kurkela
Honored Contributor

Re: DM multipath on Linux

Ah, so the underlying disk devices have not been deleted from the system yet? OK, I see now...

To tell the system that a certain disk device is not going to come back, you should write an "1" to the "delete" pseudo-file in the sysfs directory of that disk device.

In your situation:

echo 1 > /sys/class/scsi_disk/2\:0\:1\:35/device/delete

echo 1 > /sys/class/scsi_disk/2\:0\:1\:0/device/delete

Don't bother to "cd" to the device directory, because that directory will cease to exist immediately after you enter that command.

As far as I've understood, the multipath system should automatically receive a notification of the device deletion. If the multipath command still displays the failed links, try flushing the multipath devices again.

MK
MK
John Guster
Trusted Contributor

Re: DM multipath on Linux

MK,
is scsi_device same as scsi_disk under /sys/...?
Matti_Kurkela
Honored Contributor
Solution

Re: DM multipath on Linux

Why yes, it seems to end up into the same place.

However, I just noticed there is another, even simpler path:

echo 1 > /sys/block/sdh/device/delete
echo 1 > /sys/block/sdi/device/delete

MK
MK
John Guster
Trusted Contributor

Re: DM multipath on Linux

Thanks MK. It helps.