1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-02-06 01:58:01 +03:00

lvchange: add --activate ay (autoactivate)

The same as for vgchange...
This commit is contained in:
Peter Rajnoha 2012-06-27 10:43:20 -04:00
parent d2df8dddc8
commit c9b9077b44
3 changed files with 8 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.97 -
===============================
Add --activate ay to lvchange.
Add --activate ay to pvscan.
Add --activate ay to vgchange.
Add support for volume autoactivation using lvmetad.

View File

@ -61,7 +61,7 @@ xx(lvchange,
CACHE_VGMETADATA | PERMITTED_READ_ONLY,
"lvchange\n"
"\t[-A|--autobackup y|n]\n"
"\t[-a|--activate [e|l]y|n]\n"
"\t[-a|--activate [a|e|l]{y|n}]\n"
"\t[--addtag Tag]\n"
"\t[--alloc AllocationPolicy]\n"
"\t[-C|--contiguous y|n]\n"

View File

@ -136,6 +136,12 @@ static int _lvchange_activate(struct cmd_context *cmd, struct logical_volume *lv
if (lv_is_cow(lv) && !lv_is_virtual_origin(origin_from_cow(lv)))
lv = origin_from_cow(lv);
if (activate == CHANGE_AAY) {
if (!lv_passes_auto_activation_filter(cmd, lv))
return 1;
activate = CHANGE_ALY;
}
if (activate == CHANGE_ALN) {
log_verbose("Deactivating logical volume \"%s\" locally",
lv->name);