1
0
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:
Jonathan Earl Brassow 2012-04-25 13:38:41 +00:00
parent ff8ed61f76
commit 7072ed86f9
2 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.96 - Version 2.02.96 -
================================ ================================
Disallow changing cluster attribute of VG while RAID LVs are active.
Fix lvconvert error message for non-mergeable volumes. Fix lvconvert error message for non-mergeable volumes.
Allow subset of failed devices to be replaced in RAID LVs. Allow subset of failed devices to be replaced in RAID LVs.
Prevent resume from creating error devices that already exist from suspend. Prevent resume from creating error devices that already exist from suspend.

View File

@ -517,9 +517,11 @@ int vg_set_clustered(struct volume_group *vg, int clustered)
* on active mirrors or snapshots. * on active mirrors or snapshots.
*/ */
dm_list_iterate_items(lvl, &vg->lvs) { dm_list_iterate_items(lvl, &vg->lvs) {
if (lv_is_mirrored(lvl->lv) && lv_is_active(lvl->lv)) { if (lv_is_active(lvl->lv) &&
log_error("Mirror logical volumes must be inactive " (lv_is_mirrored(lvl->lv) || lv_is_raid_type(lvl->lv))) {
"when changing the cluster attribute."); log_error("%s logical volumes must be inactive "
"when changing the cluster attribute.",
lv_is_raid_type(lvl->lv) ? "RAID" : "Mirror");
return 0; return 0;
} }