1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-11 09:18:25 +03:00

lv{resize,extend,reduce}: also check for 2-legged raid4

Users can also convert 2-legged raid1 to raid4 thus causing 'Bus error'
on resize requests.

Related: https://bugzilla.redhat.com/show_bug.cgi?id=1784351
This commit is contained in:
Heinz Mauelshagen 2020-06-24 14:02:29 +02:00
parent d17780c6b8
commit e7e2288ff4

View File

@ -4797,7 +4797,7 @@ static int _lvresize_check(struct logical_volume *lv,
return 0;
}
if (seg && seg_is_any_raid5(seg) && seg->area_count < 3) {
if (seg && (seg_is_raid4(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;