1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

vgconvert: Check system ID compatibility.

If system ID is set, don't switch to a format that doesn't support it.
This commit is contained in:
Alasdair G Kergon 2015-03-09 19:01:12 +00:00
parent a854546234
commit 1334ea214e

View File

@ -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) {