mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
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.
This commit is contained in:
parent
154753db8b
commit
99113cc588
@ -1,8 +1,11 @@
|
||||
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.
|
||||
|
||||
|
@ -2037,6 +2037,7 @@ int lv_remove_single(struct cmd_context *cmd, struct logical_volume *lv,
|
||||
}
|
||||
|
||||
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 " : "",
|
||||
@ -2083,7 +2084,9 @@ int lv_remove_single(struct cmd_context *cmd, struct logical_volume *lv,
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -540,6 +540,7 @@ static int lvchange_single(struct cmd_context *cmd, struct logical_volume *lv,
|
||||
{
|
||||
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) ||
|
||||
@ -584,7 +585,12 @@ static int lvchange_single(struct cmd_context *cmd, struct logical_volume *lv,
|
||||
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;
|
||||
|
@ -910,12 +910,16 @@ static int _lvcreate(struct cmd_context *cmd, struct volume_group *vg,
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ int process_each_lv_in_vg(struct cmd_context *cmd,
|
||||
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? */
|
||||
|
Loading…
Reference in New Issue
Block a user