[lvm-devel] master - vgconvert: Check system ID compatibility.

Alasdair Kergon agk at fedoraproject.org
Mon Mar 9 19:00:56 UTC 2015


Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1334ea214ea1f55173f2ff7e3045cc72a8c4e7c7
Commit:        1334ea214ea1f55173f2ff7e3045cc72a8c4e7c7
Parent:        a8545462349c560cf66362cb3d25b44b7b0e819b
Author:        Alasdair G Kergon <agk at redhat.com>
AuthorDate:    Mon Mar 9 19:01:12 2015 +0000
Committer:     Alasdair G Kergon <agk at redhat.com>
CommitterDate: Mon Mar 9 19:01:12 2015 +0000

vgconvert: Check system ID compatibility.

If system ID is set, don't switch to a format that doesn't support it.
---
 tools/vgconvert.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/tools/vgconvert.c b/tools/vgconvert.c
index 50b3e44..3742237 100644
--- a/tools/vgconvert.c
+++ b/tools/vgconvert.c
@@ -94,6 +94,13 @@ static int vgconvert_single(struct cmd_context *cmd, const char *vg_name,
 				return ECMD_FAILED;
 			}
 
+	/* New-style system ID supported? */ 
+	if (vg->system_id && *vg->system_id && (cmd->fmt->features & FMT_SYSTEMID_ON_PVS)) {
+		log_error("Unable to convert VG %s while it has a system ID set (%s).", vg->name,
+			  vg->system_id);
+		return ECMD_FAILED;
+	}
+
 	/* Attempt to change any LVIDs that are too big */
 	if (cmd->fmt->features & FMT_RESTRICTED_LVIDS) {
 		dm_list_iterate_items(lvl, &vg->lvs) {




More information about the lvm-devel mailing list