diff options
author | Jonathan Earl Brassow <jbrassow@redhat.com> | 2012-04-25 13:38:41 +0000 |
---|---|---|
committer | Jonathan Earl Brassow <jbrassow@redhat.com> | 2012-04-25 13:38:41 +0000 |
commit | ac6e1e3e8d25c7bfd4c861e9fc1961e9601bc9c4 (patch) | |
tree | 48db55552069351c6df3d6c17998ab62525a984a /lib/metadata/vg.c | |
parent | c70037445acd5033ca9f3096ccfc69f0253dee21 (diff) | |
download | lvm2-ac6e1e3e8d25c7bfd4c861e9fc1961e9601bc9c4.tar.gz lvm2-ac6e1e3e8d25c7bfd4c861e9fc1961e9601bc9c4.tar.xz lvm2-ac6e1e3e8d25c7bfd4c861e9fc1961e9601bc9c4.zip |
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.
Diffstat (limited to 'lib/metadata/vg.c')
-rw-r--r-- | lib/metadata/vg.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/metadata/vg.c b/lib/metadata/vg.c index bae22dc8..29e9aa4a 100644 --- a/lib/metadata/vg.c +++ b/lib/metadata/vg.c @@ -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; } |