summaryrefslogtreecommitdiffstats
path: root/tools/lvchange.c
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2011-10-28 20:28:00 +0000
committerZdenek Kabelac <zkabelac@redhat.com>2011-10-28 20:28:00 +0000
commita1d5aaf725ad8de72f605abea6614ba8938c5beb (patch)
treef018288aff5fa78b043e7b2a4af8dddb2c59c8c9 /tools/lvchange.c
parent2721175d557b506515a9fc439f4a89a717e7a1d5 (diff)
downloadlvm2-a1d5aaf725ad8de72f605abea6614ba8938c5beb.tar.gz
lvm2-a1d5aaf725ad8de72f605abea6614ba8938c5beb.tar.xz
lvm2-a1d5aaf725ad8de72f605abea6614ba8938c5beb.zip
Thin pool activation change
To ensure we properly handle LV cluster locking - explicitely do not allow to change the availability of the thin pool that is in use for some thin LV. As soon as the thin volume is created the only way to activate pool is via implicit dependency. Ignore thinpool open count for lv/vgchange operations.
Diffstat (limited to 'tools/lvchange.c')
-rw-r--r--tools/lvchange.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/lvchange.c b/tools/lvchange.c
index 1a5cce6b..09377ab1 100644
--- a/tools/lvchange.c
+++ b/tools/lvchange.c
@@ -532,6 +532,12 @@ static int lvchange_single(struct cmd_context *cmd, struct logical_volume *lv,
return ECMD_FAILED;
}
+ if (lv_is_used_thin_pool(lv) &&
+ (arg_count(cmd, available_ARG))) {
+ log_error("Can't change pool volume \"%s\".", lv->name);
+ return ECMD_FAILED;
+ }
+
if (lv_is_cow(lv) && !lv_is_virtual_origin(origin_from_cow(lv)) &&
arg_count(cmd, available_ARG)) {
log_error("Can't change snapshot logical volume \"%s\"",