diff options
author | Alasdair G Kergon <agk@redhat.com> | 2016-09-27 18:22:54 +0100 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2016-09-27 18:22:54 +0100 |
commit | 1bc546269a7d2cae156827e282715410a4967d51 (patch) | |
tree | 6755df152a2b416715ac0937004b9b0c2963ca4a | |
parent | 56c90ffa5e7d7c69c5230ac3bbee3ed03e7bae62 (diff) | |
download | lvm2-1bc546269a7d2cae156827e282715410a4967d51.tar.gz |
lvconvert: Disable thin pool raid conversion while active.
Works if the pool is inactive.
Activation code doesn't notice a new raid dependency in on-disk metadata
when a thin LV is already active.
https://bugzilla.redhat.com/1365286
-rw-r--r-- | WHATS_NEW | 1 | ||||
-rw-r--r-- | lib/metadata/raid_manip.c | 5 |
2 files changed, 6 insertions, 0 deletions
@@ -1,5 +1,6 @@ Version 2.02.167 - ====================================== + Disable lvconvert of thin pool to raid while active. Disable systemd service start rate limiting for lvm2-pvscan@.service. Version 2.02.166 - 26th September 2016 diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c index deb88a245..f8a3c466b 100644 --- a/lib/metadata/raid_manip.c +++ b/lib/metadata/raid_manip.c @@ -776,6 +776,11 @@ static int _raid_add_images_without_commit(struct logical_volume *lv, return 0; } + if (lv_is_active(lv_lock_holder(lv)) && (old_count == 1) && (lv_is_thin_pool_data(lv) || lv_is_thin_pool_metadata(lv))) { + log_error("Can't add image to active thin pool LV %s yet. Deactivate first.", display_lvname(lv)); + return 0; + } + if (!archive(lv->vg)) return_0; |