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

thin: deactivate subvolumes

Do not leave active thin data and metadata volumes
if activation of thin pool fails.
This commit is contained in:
Zdenek Kabelac 2012-12-02 16:31:27 +01:00
parent dde5a6c52b
commit ade2f47829

View File

@ -1960,6 +1960,11 @@ static int _lvconvert_thinpool(struct cmd_context *cmd,
if (!activate_lv_excl(cmd, pool_lv)) { if (!activate_lv_excl(cmd, pool_lv)) {
log_error("Failed to activate pool logical volume %s/%s.", log_error("Failed to activate pool logical volume %s/%s.",
pool_lv->vg->name, pool_lv->name); pool_lv->vg->name, pool_lv->name);
/* Deactivate subvolumes */
if (!deactivate_lv(cmd, seg_lv(seg, 0)))
log_error("Failed to deactivate pool data logical volume.");
if (!deactivate_lv(cmd, seg->metadata_lv))
log_error("Failed to deactivate pool metadata logical volume.");
goto out; goto out;
} }