mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
RAID: Do not allow RAID LVs in a cluster volume group.
It would be possible to activate a RAID LV exclusively in a cluster volume group, but for now we do not allow RAID LVs to exist in a clustered volume group at all. This has two components: 1) Do not allow RAID LVs to be created in a clustered VG 2) Do not allow changing a VG from single-machine to clustered if there are RAID LVs present.
This commit is contained in:
parent
a27650cc98
commit
9efd3fb604
@ -1,5 +1,6 @@
|
||||
Version 2.02.98 -
|
||||
=================================
|
||||
Do not allow RAID LVs in a clustered volume group.
|
||||
Update lvconvert to support stacking of devs for thin meta/data devs.
|
||||
Support changes of permissions for thin snapshot volumes.
|
||||
Enhance insert_layer_for_lv() with recursive rename for _tdata LVs.
|
||||
|
@ -4438,10 +4438,25 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg, struct l
|
||||
if (!(lvl = find_lv_in_vg(vg, lp->pool))) {
|
||||
log_error("Unable to find existing pool LV %s in VG %s.",
|
||||
lp->pool, vg->name);
|
||||
return 0;
|
||||
return NULL;
|
||||
}
|
||||
if (!update_pool_lv(lvl->lv, 1))
|
||||
return_0;
|
||||
return_NULL;
|
||||
}
|
||||
|
||||
if (vg_is_clustered(vg) && segtype_is_raid(lp->segtype)) {
|
||||
/*
|
||||
* FIXME:
|
||||
* We could allow a RAID LV to be created as long as it
|
||||
* is activated exclusively. Any subsequent activations
|
||||
* would have to be enforced as exclusive also.
|
||||
*
|
||||
* For now, we disallow the existence of RAID LVs in a
|
||||
* cluster VG
|
||||
*/
|
||||
log_error("Unable to create a %s logical volume in a cluster.",
|
||||
lp->segtype->name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (segtype_is_mirrored(lp->segtype) || segtype_is_raid(lp->segtype)) {
|
||||
|
@ -514,9 +514,20 @@ int vg_set_clustered(struct volume_group *vg, int clustered)
|
||||
|
||||
/*
|
||||
* We do not currently support switching the cluster attribute
|
||||
* on active mirrors or snapshots.
|
||||
* on active mirrors, snapshots or RAID logical volumes.
|
||||
*/
|
||||
dm_list_iterate_items(lvl, &vg->lvs) {
|
||||
/*
|
||||
* FIXME:
|
||||
* We could allow exclusive activation of RAID LVs, but
|
||||
* for now we disallow them in a cluster VG at all.
|
||||
*/
|
||||
if (lv_is_raid_type(lvl->lv)) {
|
||||
log_error("RAID logical volumes are not allowed "
|
||||
"in a cluster volume group.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
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 "
|
||||
|
Loading…
Reference in New Issue
Block a user