mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
Suppress a (normally) unnecessary warning.
This commit is contained in:
parent
c80325cae4
commit
00958b5818
@ -32,6 +32,7 @@ static int vgconvert_single(struct cmd_context *cmd, const char *vg_name,
|
|||||||
uint64_t pvmetadatasize = 0;
|
uint64_t pvmetadatasize = 0;
|
||||||
uint64_t pe_end = 0, pe_start = 0;
|
uint64_t pe_end = 0, pe_start = 0;
|
||||||
struct list *pvh;
|
struct list *pvh;
|
||||||
|
int change_made = 0;
|
||||||
|
|
||||||
if (!vg) {
|
if (!vg) {
|
||||||
log_error("Unable to find volume group \"%s\"", vg_name);
|
log_error("Unable to find volume group \"%s\"", vg_name);
|
||||||
@ -97,11 +98,15 @@ static int vgconvert_single(struct cmd_context *cmd, const char *vg_name,
|
|||||||
pvmetadatasize, &mdas))) {
|
pvmetadatasize, &mdas))) {
|
||||||
log_error("Failed to setup physical volume \"%s\"",
|
log_error("Failed to setup physical volume \"%s\"",
|
||||||
dev_name(existing_pv->dev));
|
dev_name(existing_pv->dev));
|
||||||
log_error("Use pvcreate and vgcfgrestore to repair "
|
if (change_made)
|
||||||
"from archived metadata.");
|
log_error("Use pvcreate and vgcfgrestore to "
|
||||||
|
"repair from archived metadata.");
|
||||||
return ECMD_FAILED;
|
return ECMD_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Need to revert manually if it fails after this point */
|
||||||
|
change_made = 1;
|
||||||
|
|
||||||
log_verbose("Set up physical volume for \"%s\" with %" PRIu64
|
log_verbose("Set up physical volume for \"%s\" with %" PRIu64
|
||||||
" available sectors", dev_name(pv->dev), pv->size);
|
" available sectors", dev_name(pv->dev), pv->size);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user