Site icon Davoud Teimouri – Virtualization and Data Center

Multipath: Best and Safe Solution Map in Use Devices

Based on Red Hat solution (https://access.redhat.com/solutions/47438), the below steps should be done before flush any multipath device, otherwise the command will be failed:

Once all holders of the device have been removed, the device should be flushed with “multipath -f“.

But may the above instruction failed at first step because the disk is hold by a process.

Multipath

Problem!

Here is an example of the error:

multipath -f {Multipath Alias}
Mar 1 09:59:10 | {Multipath Alias}: map in use
dmsetup remove -f {Multipath Alias}
device-mapper: remove ioctl on {Multipath Alias} failed: Device or resource busy

Solution!

What is the solution for this problem?

As Red Hat mentioned, “Locate any subsystem or process holding the device open”. Usually a process holding the disk or disks, so as the first step follow the below:

lsof | grep {Multipath Alias}

Output will be same as the below:

oracle    10298    oracle  257u      BLK              252,8       0t0 18446612177448267048 /dev/oracleasm/disks/{Multipath Alias} (deleted)

In this example output, oracle process holding the disk and the process should be identified before any action:

ps -ef | grep 10298
oracle   10298     1  0  2016 ?        00:00:00 oraclecmsrestd (LOCAL=NO)

If there is no problem about killing the process, kill the process by the below command:

kill -9 10298

Then try to flush device again and if the problem is still exists, follow the below for troubleshooting:

Further Reading

HBA Port and Linux: What’s The Best Solutions to Disable?

VMware Horizon View Connection (Session) Duration Report

Exit mobile version