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

raid: add temporary activation for raid metadata clear

Use LV_TEMPORARY when activating devices for clearing
raid metadata.
This commit is contained in:
Zdenek Kabelac 2014-02-04 14:47:52 +01:00
parent ef557b8091
commit ef6c5795a0
2 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.106 -
====================================
Avoid exposing temporary devices when initializing raid metadata volumes.
Add internal tags command to display any tags defined on the host.
Prohibit use of external origin with size incompatible with thin pool.
Avoid trying to convert single to thin pool and volume at the same time.

View File

@ -174,11 +174,13 @@ static int _clear_lv(struct logical_volume *lv)
if (test_mode())
return 1;
if (!was_active && !activate_lv_excl_local(lv->vg->cmd, lv)) {
log_error("Failed to activate %s for clearing",
lv->status |= LV_TEMPORARY;
if (!was_active && !activate_lv_local(lv->vg->cmd, lv)) {
log_error("Failed to activate localy %s for clearing",
lv->name);
return 0;
}
lv->status &= ~LV_TEMPORARY;
log_verbose("Clearing metadata area of %s/%s",
lv->vg->name, lv->name);