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:
parent
ef557b8091
commit
ef6c5795a0
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.106 -
|
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.
|
Add internal tags command to display any tags defined on the host.
|
||||||
Prohibit use of external origin with size incompatible with thin pool.
|
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.
|
Avoid trying to convert single to thin pool and volume at the same time.
|
||||||
|
@ -174,11 +174,13 @@ static int _clear_lv(struct logical_volume *lv)
|
|||||||
if (test_mode())
|
if (test_mode())
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if (!was_active && !activate_lv_excl_local(lv->vg->cmd, lv)) {
|
lv->status |= LV_TEMPORARY;
|
||||||
log_error("Failed to activate %s for clearing",
|
if (!was_active && !activate_lv_local(lv->vg->cmd, lv)) {
|
||||||
|
log_error("Failed to activate localy %s for clearing",
|
||||||
lv->name);
|
lv->name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
lv->status &= ~LV_TEMPORARY;
|
||||||
|
|
||||||
log_verbose("Clearing metadata area of %s/%s",
|
log_verbose("Clearing metadata area of %s/%s",
|
||||||
lv->vg->name, lv->name);
|
lv->vg->name, lv->name);
|
||||||
|
Loading…
Reference in New Issue
Block a user