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

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
This commit is contained in:
Alasdair G Kergon 2016-09-27 18:22:54 +01:00
parent 56c90ffa5e
commit 1bc546269a
2 changed files with 6 additions and 0 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.167 - Version 2.02.167 -
====================================== ======================================
Disable lvconvert of thin pool to raid while active.
Disable systemd service start rate limiting for lvm2-pvscan@.service. Disable systemd service start rate limiting for lvm2-pvscan@.service.
Version 2.02.166 - 26th September 2016 Version 2.02.166 - 26th September 2016

View File

@ -776,6 +776,11 @@ static int _raid_add_images_without_commit(struct logical_volume *lv,
return 0; 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)) if (!archive(lv->vg))
return_0; return_0;