mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
b4be988732
The vgchange/lvchange activation commands read the VG, and don't write it, so they acquire a shared VG lock from lvmlockd. When other commands fail to acquire a shared VG lock from lvmlockd, a warning is printed and they continue without it. (Without it, the VG metadata they display from lvmetad may not be up to date.) vgchange/lvchange -a shouldn't continue without the shared lock for a couple reasons: . Usually they will just continue on and fail to acquire the LV locks for activation, so continuing is pointless. . More importantly, without the sh VG lock, the VG metadata used by the command may be stale, and the LV locks shown in the VG metadata may no longer be current. In the case of sanlock, this would result in odd, unpredictable errors when lvmlockd doesn't find the expected lock on disk. In the case of dlm, the invalid LV lock could be granted for the non-existing LV. The solution is to not continue after the shared lock fails, in the same way that a command fails if an exclusive lock fails. |
||
---|---|---|
.. | ||
toolcontext.c | ||
toolcontext.h |