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

raid: check lock holding LV

Since raid could be used as stacked LV - check lock holding LV
for proper locking type for clustered usage.
This commit is contained in:
Zdenek Kabelac 2015-01-30 14:13:25 +01:00
parent c99cb20715
commit 434031719e
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.116 - Version 2.02.116 -
==================================== ====================================
Check lock holding LV when lvconverting stacked raid LV in cluster.
Support "udev" ext. dev. info for filters: PV min size, mpath, md, partition. Support "udev" ext. dev. info for filters: PV min size, mpath, md, partition.
Add fw_raid_component_detection lvm.conf option to enable FW raid detection. Add fw_raid_component_detection lvm.conf option to enable FW raid detection.
Add devices/external_device_info_source lvm.conf option ("none" by default). Add devices/external_device_info_source lvm.conf option ("none" by default).

View File

@ -1040,8 +1040,8 @@ int lv_raid_change_image_count(struct logical_volume *lv,
/* /*
* LV must be either in-active or exclusively active * LV must be either in-active or exclusively active
*/ */
if (lv_is_active(lv) && vg_is_clustered(lv->vg) && if (lv_is_active(lv_lock_holder(lv)) && vg_is_clustered(lv->vg) &&
!lv_is_active_exclusive_locally(lv)) { !lv_is_active_exclusive_locally(lv_lock_holder(lv))) {
log_error("%s/%s must be active exclusive locally to" log_error("%s/%s must be active exclusive locally to"
" perform this operation.", lv->vg->name, lv->name); " perform this operation.", lv->vg->name, lv->name);
return 0; return 0;