Skip to contentSkip to conversation

master - vgchange: allow changing to lockd type when mirrors exist

PATCH David Teigland 1 participant 1 message Jul 10, 2015

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b8538f5dcd2e1c0880607a2bbd067d6aa60e689a
Commit:        b8538f5dcd2e1c0880607a2bbd067d6aa60e689a
Parent:        c4fdcb04be174dd3ec68eb0c3f17dd8a08314b59
Author:        David Teigland <[email protected]>
AuthorDate:    Fri Jul 10 11:48:50 2015 -0500
Committer:     David Teigland <[email protected]>
CommitterDate: Fri Jul 10 15:53:21 2015 -0500

vgchange: allow changing to lockd type when mirrors exist

and update lvmlockd man page to reflect the fact that mirror LVs work correctly in lockd VGs.

---
 man/lvmlockd.8.in |    4 +---
 tools/vgchange.c  |   17 -----------------
 2 files changed, 1 insertions(+), 20 deletions(-)
man/lvmlockd.8.in +1 -3
index 4d9b3f5..c3b0ac0 100644
@@ -682,13 +682,11 @@ it are not autoactivated.
 
 Things that do not yet work in lockd VGs:
 .br
-- old style mirror LVs (only raid1)
-.br
 - creating a new thin pool and a new thin LV in a single command
 .br
 - using lvcreate to create cache pools or cache LVs (use lvconvert)
 .br
-- splitting raid1 mirror LVs
+- splitting mirrors and snapshots from LVs
 .br
 - vgsplit
 .br
tools/vgchange.c +0 -17
index 4b90b56..95cffaf 100644
@@ -604,23 +604,6 @@ static int _vgchange_locktype(struct cmd_context *cmd,
 		return 0;
 	}
 
-	/*
-	 * Check if there are any LV types in the VG that cannot be handled
-	 * with the new lock type.  Remove this once all LV types can be
-	 * handled.
-	 */
-	if (is_lockd_type(lock_type)) {
-		dm_list_iterate_items(lvl, &vg->lvs) {
-			lv = lvl->lv;
-
-			if (lv_is_mirror_type(lv)) {
-				log_error("Changing to lock type %s is not allowed with mirror type LV %s/%s",
-					  lock_type, vg->name, display_lvname(lv));
-				return 0;
-			}
-		}
-	}
-
 	/* none to clvm */
 	if (!strcmp(vg->lock_type, "none") && !strcmp(lock_type, "clvm")) {
 		log_warn("New clvm lock type will not be usable with lvmlockd.");