mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
lv{resize,extend,reduce}: reject size change on 2-legged raid5*
Reject size changing request in to avoid 'Bus error' and display hint to convert to more stripes. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1784351
This commit is contained in:
parent
3bd9d81b29
commit
2cf0f90780
@ -5066,6 +5066,7 @@ static int _lvresize_check(struct logical_volume *lv,
|
|||||||
struct lvresize_params *lp)
|
struct lvresize_params *lp)
|
||||||
{
|
{
|
||||||
struct volume_group *vg = lv->vg;
|
struct volume_group *vg = lv->vg;
|
||||||
|
struct lv_segment *seg = first_seg(lv);
|
||||||
|
|
||||||
if (lv_is_external_origin(lv)) {
|
if (lv_is_external_origin(lv)) {
|
||||||
/*
|
/*
|
||||||
@ -5089,6 +5090,12 @@ static int _lvresize_check(struct logical_volume *lv,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (seg && seg_is_any_raid5(seg) && seg->area_count < 3) {
|
||||||
|
log_error("Cannot resize %s LV %s. Convert to more stripes first.",
|
||||||
|
lvseg_name(seg), display_lvname(lv));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (lv_is_raid(lv) &&
|
if (lv_is_raid(lv) &&
|
||||||
lp->resize == LV_REDUCE) {
|
lp->resize == LV_REDUCE) {
|
||||||
unsigned attrs;
|
unsigned attrs;
|
||||||
|
Loading…
Reference in New Issue
Block a user