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

activation: _lv_activate is ok when filtered.

If the volume_list filters out volume from activation,
it is still success result for this function.
Change the error message back to verbose level.

Detect if the volume is active localy before zeroing,
so we report error a bit later for cases, where volume
could not be activated because it doesn't pass through volume
list  (but user still could create volume when he disables
zeroing)
This commit is contained in:
Zdenek Kabelac 2013-11-01 10:28:42 +01:00
parent 1bde9f68ce
commit c3e674ad30
3 changed files with 10 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.104 -
===================================
Return success when LV cannot be activated because of volume_list filter.
Return proper error state for remote exclusive activation.
Fix missing lvmetad scan for PVs found on MD partitions.
Respect DM_UDEV_DISABLE_OTHER_RULES_FLAG in lvmetad udev rules.

View File

@ -2029,8 +2029,9 @@ static int _lv_activate(struct cmd_context *cmd, const char *lvid_s,
goto out;
if (filter && !_passes_activation_filter(cmd, lv)) {
log_error("Not activating %s/%s since it does not pass "
"activation filter.", lv->vg->name, lv->name);
log_verbose("Not activating %s/%s since it does not pass "
"activation filter.", lv->vg->name, lv->name);
r = 1;
goto out;
}

View File

@ -5381,6 +5381,12 @@ int set_lv(struct cmd_context *cmd, struct logical_volume *lv,
struct device *dev;
char *name;
if (!lv_is_active_locally(lv)) {
log_error("Volume \"%s/%s\" is not active locally.",
lv->vg->name, lv->name);
return 0;
}
/*
* FIXME:
* <clausen> also, more than 4k