diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2011-10-28 20:28:00 +0000 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2011-10-28 20:28:00 +0000 |
commit | a1d5aaf725ad8de72f605abea6614ba8938c5beb (patch) | |
tree | f018288aff5fa78b043e7b2a4af8dddb2c59c8c9 /tools/vgchange.c | |
parent | 2721175d557b506515a9fc439f4a89a717e7a1d5 (diff) | |
download | lvm2-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/vgchange.c')
-rw-r--r-- | tools/vgchange.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/vgchange.c b/tools/vgchange.c index fd4e4208..8cb0e230 100644 --- a/tools/vgchange.c +++ b/tools/vgchange.c @@ -100,6 +100,10 @@ static int _activate_lvs_in_vg(struct cmd_context *cmd, if (!lv_is_visible(lv)) continue; + /* Never manipulate with thin pools in use */ + if (lv_is_used_thin_pool(lv)) + continue; + /* If LV is sparse, activate origin instead */ if (lv_is_cow(lv) && lv_is_virtual_origin(origin_from_cow(lv))) lv = origin_from_cow(lv); |