In some cases we use 'creation' also during conversion.
Here it can be actually unwanted side effect we may remove
not just newly created layers - but also original converted LV.
So until we make clear how to properly revert from some errors
in middle of conversion, disable removal for any 'lvconvert' commands.
lockd_free_lv(vg->cmd, vg, lv->name, &lv->lvid.id[1], lv->lock_args);
/* FIXME Better to revert to backup of metadata? */
- if (!lv_remove(lv) || !vg_write(vg) || !vg_commit(vg))
+ /* Do not remove anything for create during conversion operation */
+ if (!strncmp(cmd->name, "lvconvert", 9) ||
+ !lv_remove(lv) || !vg_write(vg) || !vg_commit(vg))
log_error("Manual intervention may be required to remove "
"abandoned LV(s) before retrying.");
else