]> sourceware.org Git - lvm2.git/commitdiff
lvmlockd: always disallow mirror splitting
authorDavid Teigland <teigland@redhat.com>
Tue, 5 Sep 2017 15:26:58 +0000 (10:26 -0500)
committerDavid Teigland <teigland@redhat.com>
Tue, 5 Sep 2017 15:28:33 +0000 (10:28 -0500)
lv_raid_split() was correctly prevented in a shared VG,
but lv_raid_split_and_track() was missing that check.

WHATS_NEW
lib/metadata/raid_manip.c

index 32bbc4194be39a9207ddc90307931c6fe8eb59d8..e6cc18db009b03b82dba507c3e8f82eb3ef4dd45 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.174 - 
 =================================
+  Prevent raid1 split with trackchanges in a shared VG.
   Avoid double unlocking of client & lockspace mutexes in lvmlockd.
   Fix leaking of file descriptor for non-blocking filebased locking.
   Fix check for 2nd mda at end of disk fits if using pvcreate --restorefile.
index 043292849d73c708dc1a6ca713d499bfd3bb4093..72223ca91bd4a854cf790bdba13eb36b9db6c7f8 100644 (file)
@@ -3426,6 +3426,12 @@ int lv_raid_split_and_track(struct logical_volume *lv,
        int s;
        struct lv_segment *seg = first_seg(lv);
 
+       if (is_lockd_type(lv->vg->lock_type)) {
+               log_error("Splitting raid image is not allowed with lock_type %s.",
+                         lv->vg->lock_type);
+               return 0;
+       }
+
        if (!seg_is_mirrored(seg)) {
                log_error("Unable to split images from non-mirrored RAID.");
                return 0;
This page took 0.056333 seconds and 5 git commands to generate.