]> sourceware.org Git - lvm2.git/commit
snapshot: rework cluster creation and removal
authorZdenek Kabelac <zkabelac@redhat.com>
Sun, 21 Apr 2013 08:37:52 +0000 (10:37 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Thu, 25 Apr 2013 15:33:24 +0000 (17:33 +0200)
commitf84f12a6a3edaac5220699dd9c6937139429d852
tree07c1587f3c90aed16bf0851805c7540c5fd74a1c
parentd51b7e54044518ed8e20ce3ea617a28d2313730d
snapshot: rework cluster creation and removal

Support for exclusive activation of snapshots revealed some problems.

When snapshot is created, COW LV is activated first (for clearing) and
then it's transformed into snapshot's COW LV, but it has left the lock
for such LV active in cluster and this lock could not have been removed
from dlm, unless snapshot has been removed within same dlm session.

If the user tried to remove snapshot after rebooting node, the lock was
missing, and COW LV could not have been detached.

Patch modifes the approach in this way:

Always deactivate COW LV for clustered vg  after clearing (so it's
activated again via imlicit snapshot activation rule when snapshot is activated).

When snapshot is removed, activate COW LV as independend LV, so the lock
will exist for such LV, but only when the snapshot is active.

Also add test case for testing snapshot removal after cluster reboot.
WHATS_NEW
lib/metadata/lv_manip.c
lib/metadata/snapshot_manip.c
test/shell/clvmd-restart.sh
This page took 0.030743 seconds and 5 git commands to generate.