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

Suppress "Volume group not found" message when vgsplit of new VG.

This commit is contained in:
Dave Wysochanski 2008-04-02 13:08:49 +00:00
parent d0bf2f3fa0
commit e283bda91d
2 changed files with 6 additions and 0 deletions

View File

@ -1,5 +1,7 @@
Version 2.02.34 -
===================================
Suppress excess messages when vgsplit into a new vg.
Suppress duplicate message when lvresize fails because of invalid vgname.
Cache VG metadata internally while VG lock is held.
Fix redundant lvresize message if vg doesn't exist.
Fix another allocation bug with clvmd and large node IDs.

View File

@ -220,6 +220,7 @@ int vgsplit(struct cmd_context *cmd, int argc, char **argv)
int opt;
int active;
int existing_vg;
int old_suppress;
struct pv_list *pvl;
if (argc < 3) {
@ -253,9 +254,11 @@ int vgsplit(struct cmd_context *cmd, int argc, char **argv)
}
log_verbose("Checking for new volume group \"%s\"", vg_name_to);
old_suppress = log_suppress(2);
if ((vg_to = vg_lock_and_read(cmd, vg_name_to, NULL,
LCK_VG_WRITE | LCK_NONBLOCK,
0, 0))) {
log_suppress(old_suppress);
existing_vg = 1;
if (new_vg_option_specified(cmd)) {
log_error("Volume group \"%s\" exists, but new VG "
@ -265,6 +268,7 @@ int vgsplit(struct cmd_context *cmd, int argc, char **argv)
if (!vgs_are_compatible(cmd, vg_from,vg_to))
goto error;
} else {
log_suppress(old_suppress);
existing_vg = 0;
/* Set metadata format of original VG */