Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 432042 - sys-fs/multipath-tools: lvm vgs hangs when iSCSI/multipath has not been stopped correctly
Summary: sys-fs/multipath-tools: lvm vgs hangs when iSCSI/multipath has not been stopp...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major with 1 vote (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-20 10:32 UTC by Christian Ruppert (idl0r)
Modified: 2016-08-05 18:44 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch that let's multipath wait for iscsid and lvm before it's being started (multipath.patch,432 bytes, patch)
2013-06-26 13:48 UTC, Stefan Behte (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Ruppert (idl0r) gentoo-dev 2012-08-20 10:32:16 UTC
Hi guys,

we had a case were iscsid has been started and multipath has been initialiazed by hand and thus it has not been stopped during shutdown by OpenRC.

So during shutdown iscsi was stopped, multipath still active and OpenRC's stop-lvm addon was issuing a "vgs" call and it tried to open/read some of those iSCSI devices even thought the connection has been terminated already. The result is that the "vgs" just hangs forever.
IMHO there should be a timeout or something else to validate the (block-)devices first.

(tested with LVM 2.02.88)

Steps to reproduce:
# Setup iSCSI and multipath
# Start iscsid
/etc/init.d/iscsid start

iscsiadm ...

# Initialize multipath by hand (do not use the init script)
multipath
# Make sure the devices are present
multipath -l

# Stop iSCSI
/etc/init.d/iscsid stop

# multipath still has the devices
multipath -l

# vgs hangs now
vgs
Comment 1 Christian Ruppert (idl0r) gentoo-dev 2012-08-20 11:15:50 UTC
A "vgs" when the Devices are connected:

# vgs
  /dev/sdag: read failed after 0 of 4096 at 0: Input/output error
  /dev/sdag: read failed after 0 of 4096 at 32212189184: Input/output error
  /dev/sdag: read failed after 0 of 4096 at 32212246528: Input/output error
  /dev/sdag: read failed after 0 of 4096 at 4096: Input/output error
...
Comment 2 Stefan Behte (RETIRED) gentoo-dev Security 2013-06-26 13:48:49 UTC
Created attachment 352000 [details, diff]
Patch that let's multipath wait for iscsid and lvm before it's being started