mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
When creating new LV, double-check that name is not already in use.
This commit is contained in:
parent
052169695c
commit
f8964db41c
@ -1,5 +1,6 @@
|
||||
Version 2.02.48 -
|
||||
===============================
|
||||
When creating new LV, double-check that name is not already in use.
|
||||
Remove /dev/vgname/lvname symlink automatically if LV is no longer visible.
|
||||
Rename internal vorigin LV to match visible LV.
|
||||
Suppress 'removed' messages displayed when internal LVs are removed.
|
||||
|
@ -1844,6 +1844,10 @@ struct logical_volume *lv_create_empty(const char *name,
|
||||
log_error("Failed to generate unique name for the new "
|
||||
"logical volume");
|
||||
return NULL;
|
||||
} else if (find_lv_in_vg(vg, name)) {
|
||||
log_error("Unable to create LV %s in Volume Group %s: "
|
||||
"name already in use.", name, vg->name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
log_verbose("Creating logical volume %s", name);
|
||||
|
Loading…
Reference in New Issue
Block a user