mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
Disallow changing cluster attribute of VG while RAID LVs are active.
Mirror and snapshot LVs are already checked for when switching the cluster attribute of a VG. This patch adds RAID.
This commit is contained in:
parent
ff8ed61f76
commit
7072ed86f9
@ -1,5 +1,6 @@
|
||||
Version 2.02.96 -
|
||||
================================
|
||||
Disallow changing cluster attribute of VG while RAID LVs are active.
|
||||
Fix lvconvert error message for non-mergeable volumes.
|
||||
Allow subset of failed devices to be replaced in RAID LVs.
|
||||
Prevent resume from creating error devices that already exist from suspend.
|
||||
|
@ -517,9 +517,11 @@ int vg_set_clustered(struct volume_group *vg, int clustered)
|
||||
* on active mirrors or snapshots.
|
||||
*/
|
||||
dm_list_iterate_items(lvl, &vg->lvs) {
|
||||
if (lv_is_mirrored(lvl->lv) && lv_is_active(lvl->lv)) {
|
||||
log_error("Mirror logical volumes must be inactive "
|
||||
"when changing the cluster attribute.");
|
||||
if (lv_is_active(lvl->lv) &&
|
||||
(lv_is_mirrored(lvl->lv) || lv_is_raid_type(lvl->lv))) {
|
||||
log_error("%s logical volumes must be inactive "
|
||||
"when changing the cluster attribute.",
|
||||
lv_is_raid_type(lvl->lv) ? "RAID" : "Mirror");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user