Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 388433 - sys-fs/lvm2 - pvmove can deadlock system even when not moving root LV
Summary: sys-fs/lvm2 - pvmove can deadlock system even when not moving root LV
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-25 12:17 UTC by Jeff Mitchell
Modified: 2013-09-12 23:20 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Mitchell 2011-10-25 12:17:38 UTC
(This may be related to bug 350455)

I'm aware of the possibility of deadlocking the system if you try to move a logical volume that is the root volume, due to the lockfile being on that volume.

However, yesterday I ran into deadlocks while trying to pvmove non-root volumes. I wanted to move all LVs on a VG from one device to the other. This has worked fine individually in the past, but when I ran pvmove without specifying a particular LV with each call (so that it moves all extents), I eventually deadlocked. Worse, when I rebooted and tried a pvmove --abort, I deadlocked then too.

On #lvm on Freenode, the advice I was given was that pvmove can have locking issues even when not on the root volume, and to unconditionally use a lock directory not on the root volume:

"just use /dev/.lvm or the new fangled udev pushing for /run/udev so /run/lvm would seem right. though i would think /dev/.lvm as it's in a tmpfs so wouldn't affect in pvmoving root LV."

This sounds sensical; in light of the issues that the default of /var/lock/lvm for the lock directory can have both with moving root LVs and, apparently, non-root LVs, I'd like to suggest that the default be changed to /dev/.lvm as suggested (since Gentoo systems don't normally use /run currently).
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-03-27 02:52:18 UTC
agk: change it the default in your upstream code?
/run is coming in Gentoo.
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2013-09-12 23:20:31 UTC
This should be solved now with /run directory in baselayout-2.2, and lvm2-2.02.100.