Multipath command gets stuck
-
Problem description:
Shareblock primary storage environment, the physical machine executes the multipath -ll command and gets stuck.Analysis of the cause of the problem:
The SAN storage side maps the LUN to the physical machine, and the physical machine side normally recognizes the LUN device. At this time, the LUN device is deleted in the SAN storage, which will cause the physical machine to keep trying to access the storage, and multipath -ll does not return.
The reason is that the default multipath policy is queue_if_no_path, and the processes of I/O operations will be suspended until one or more paths are restored.Problem handling process:
1- Temporary solution:ms=`dmsetup ls --target multipath | awk '{print $1}'`; for m in $ms; do dmsetup message $m 0 "fail_if_no_path"; done2- Complete solution:
Modify the multipath.conf multipath configuration file and modify the queue_if_no_path policy.- Use the following command on the physical machine system to generate the default multipath configuration file
multipath -t > /root/multipath.txt-
Read the content of the multipath.txt file. If the SAN vendor of the current user environment is DGC, copy the corresponding part of the content.
-
Add the above configuration to the /etc/mutilpath.conf file, and remove features “queue_if_no_path”;
Add: flush_on_last_del “yes”;
Replace no_path_retry 60 with no_path_retry fail.
- Restart the multipath service to take effect
systemctl restart multipathd.service -
undefined nexus marked this topic as a regular topic