Fix lvchange -a and -p for sparse LVs.
Fix lvcreate --virtualsize to activate the new device immediately.
Version 2.02.48 -
===============================
+ Suppress 'removed' messages displayed when internal LVs are removed.
+ Fix lvchange -a and -p for sparse LVs.
+ Fix lvcreate --virtualsize to activate the new device immediately.
Make --snapshot optional with lvcreate --virtualsize.
Generalise --virtualoriginsize to --virtualsize.
- Skip virtual origins in process_each_lv_in_vg().
+ Skip virtual origins in process_each_lv_in_vg() without --all.
Fix counting of virtual origin LVs in vg_validate.
Attempt to load dm-zero module if zero target needed but not present.
}
if (lv_is_active(lv) && (force == PROMPT) &&
+ lv_is_visible(lv) &&
yes_no_prompt("Do you really want to remove active "
"%slogical volume %s? [y/n]: ",
vg_is_clustered(vg) ? "clustered " : "",
log_error("Failed to resume %s.", origin->name);
}
- log_print("Logical volume \"%s\" successfully removed", lv->name);
+ if (lv_is_visible(lv))
+ log_print("Logical volume \"%s\" successfully removed", lv->name);
+
return 1;
}
{
int doit = 0, docmds = 0;
int archived = 0;
+ struct logical_volume *origin;
if (!(lv->vg->status & LVM_WRITE) &&
(arg_count(cmd, contiguous_ARG) || arg_count(cmd, permission_ARG) ||
return ECMD_FAILED;
}
- if (!(lv_is_visible(lv))) {
+ /* If LV is sparse, activate origin instead */
+ if (arg_count(cmd, available_ARG) && lv_is_cow(lv) &&
+ lv_is_virtual_origin(origin = origin_from_cow(lv)))
+ lv = origin;
+
+ if (!(lv_is_visible(lv)) && !lv_is_virtual_origin(lv)) {
log_error("Unable to change internal LV %s directly",
lv->name);
return ECMD_FAILED;
return 0;
}
+ /* A virtual origin must be activated explicitly. */
if (lp->voriginsize &&
- !(org = _create_virtual_origin(cmd, vg, lv->name,
- lp->permission,
- lp->voriginextents))) {
+ (!(org = _create_virtual_origin(cmd, vg, lv->name,
+ lp->permission,
+ lp->voriginextents)) ||
+ !activate_lv(cmd, org))) {
log_error("Couldn't create virtual origin for LV %s",
lv->name);
+ if (org && !lv_remove(org))
+ stack;
goto deactivate_and_revert_new_lv;
}
if (lvl->lv->status & SNAPSHOT)
continue;
- if (lv_is_virtual_origin(lvl->lv))
+ if (lv_is_virtual_origin(lvl->lv) && !arg_count(cmd, all_ARG))
continue;
/* Should we process this LV? */