Skip to contentSkip to conversation

Deadlock on RHEL4 with kpartx/queue_if_no_path - any way out?

DISCUSSION Tore Anderson 2 participants 3 messages May 19, 2008 – May 20, 2008 Device mapper

lore
Share & tools
lore
#0 lore raw

Hi. Due to a PEBCAK and wrong paths being removed I've now ended up in this situation:

$ multipath -ll multimedia
multimedia (3600a0b80002984ae00001da546c27de1)
[size=200 GB][features="1 queue_if_no_path"][hwhandler="0"]
\_ round-robin 0 [enabled]
 \_ #:#:#:#  -    65:16  [failed][faulty]

I readded the paths with 'echo - - - > /sys/class/scsi_host/host*/scan', but the map does not get healthy - all attempts to reload the map with the multipath tools ends up in blocking I/O, using dmsetup directly I only get failures due to the map being busy.

This is how the process list looks:

$ ps axf
  PID TTY      STAT   TIME COMMAND
[...]
11598 ?        SLl    0:01 /sbin/multipathd
12080 ?        S<     0:00 /bin/sh /etc/dev.d/block/multipath.dev block
12087 ?        S<     0:00  \_ /sbin/dmsetup ls -j 253 -m 3 --target multipath --exec /sbin/kpartx -a
12088 ?        D<     0:00      \_ /sbin/kpartx -a /dev/mapper/multimedia
12714 ?        S<     0:00 /bin/sh /etc/dev.d/block/multipath.dev block
12720 ?        S<     0:00  \_ /sbin/multipath -v0 /dev/sdb
12794 ?        S<     0:00 /bin/sh /etc/dev.d/block/multipath.dev block
12800 ?        D<     0:00  \_ /sbin/multipath -v0 /dev/sdc
12831 ?        D      0:00 multipath -v 2
14132 ?        S<     0:00 /bin/sh /etc/dev.d/block/multipath.dev block
14139 ?        S<     0:00  \_ /sbin/dmsetup ls -j 253 -m 3 --target multipath --exec /sbin/kpartx -a
14140 ?        D<     0:00      \_ /sbin/kpartx -a /dev/mapper/multimedia
14219 ?        S<     0:00 /bin/sh /etc/dev.d/block/multipath.dev block
14225 ?        D<     0:00  \_ /sbin/multipath -v0 /dev/sdd
14255 ?        D      0:00 multipath -v 2
15312 ?        D      0:00 multipath /dev/sdd
17032 ?        D      0:00 multipath
 1008 ?        S<     0:00 /bin/sh /etc/dev.d/block/multipath.dev block
 1014 ?        D<     0:00  \_ /sbin/multipath -v0 /dev/sde

...I assume the kpartx process is locking the map so no changes can be done, but since there's no alive paths and queue_if_no_path is active, it will never return, and I'm stuck in a deadlock.

Is there any way out of this save a reboot?

Regards,

Signature · 1 line
Tore Anderson
#1 lore raw

RE: Deadlock on RHEL4 with kpartx/queue_if_no_path - any wayout?

multipathd -k
reconfigure

maybe....

--

Craig Simpson

"In the circle the beginning and the end are common"
~ Heraclitis (540-480BC)

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Tore Anderson
Sent: Monday, May 19, 2008 2:01 AM
To: device-mapper development
Subject: [dm-devel] Deadlock on RHEL4 with kpartx/queue_if_no_path - any wayout?

Hi. Due to a PEBCAK and wrong paths being removed I've now ended up in this situation:

$ multipath -ll multimedia
multimedia (3600a0b80002984ae00001da546c27de1)
[size=200 GB][features="1 queue_if_no_path"][hwhandler="0"]
\_ round-robin 0 [enabled]
 \_ #:#:#:#  -    65:16  [failed][faulty]

I readded the paths with 'echo - - - > /sys/class/scsi_host/host*/scan', but the map does not get healthy - all attempts to reload the map with the multipath tools ends up in blocking I/O, using dmsetup directly I only get failures due to the map being busy.

This is how the process list looks:

$ ps axf
  PID TTY      STAT   TIME COMMAND
[...]
11598 ?        SLl    0:01 /sbin/multipathd
12080 ?        S<     0:00 /bin/sh /etc/dev.d/block/multipath.dev block
12087 ?        S<     0:00  \_ /sbin/dmsetup ls -j 253 -m 3 --target
multipath --exec /sbin/kpartx -a
12088 ?        D<     0:00      \_ /sbin/kpartx -a
/dev/mapper/multimedia
12714 ?        S<     0:00 /bin/sh /etc/dev.d/block/multipath.dev block
12720 ?        S<     0:00  \_ /sbin/multipath -v0 /dev/sdb
12794 ?        S<     0:00 /bin/sh /etc/dev.d/block/multipath.dev block
12800 ?        D<     0:00  \_ /sbin/multipath -v0 /dev/sdc
12831 ?        D      0:00 multipath -v 2
14132 ?        S<     0:00 /bin/sh /etc/dev.d/block/multipath.dev block
14139 ?        S<     0:00  \_ /sbin/dmsetup ls -j 253 -m 3 --target
multipath --exec /sbin/kpartx -a
14140 ?        D<     0:00      \_ /sbin/kpartx -a
/dev/mapper/multimedia
14219 ?        S<     0:00 /bin/sh /etc/dev.d/block/multipath.dev block
14225 ?        D<     0:00  \_ /sbin/multipath -v0 /dev/sdd
14255 ?        D      0:00 multipath -v 2
15312 ?        D      0:00 multipath /dev/sdd
17032 ?        D      0:00 multipath
 1008 ?        S<     0:00 /bin/sh /etc/dev.d/block/multipath.dev block
 1014 ?        D<     0:00  \_ /sbin/multipath -v0 /dev/sde

...I assume the kpartx process is locking the map so no changes can be done, but since there's no alive paths and queue_if_no_path is active, it will never return, and I'm stuck in a deadlock.

Is there any way out of this save a reboot?

Regards,

Signature · 6 lines
Tore Anderson

--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel
#2 lore raw

Re: Deadlock on RHEL4 with kpartx/queue_if_no_path - any wayout?

* Craig Simpson

Quoted 4 lines

multipathd -k
reconfigure

maybe....

Thanks for the suggestion, but no go...

Ended up rebooting the machine, didn't see any other way out. :-(

Signature · 1 line
Tore Anderson