Files
libguestfs/tests
Laszlo Ersek 24f98939ae test-md-and-lvm-devices: work around RAID0 regression in Linux v3.14/v5.4
The "test-md-and-lvm-devices" test case creates, among other things, a
RAID0 array (md127) that spans two *differently sized* block devices
(sda1: 20MB, lv0: 16MB).

In Linux v3.14, the layout of such arrays was changed incompatibly and
undetectably. If an array were created with a pre-v3.14 kernel and
assembled on a v3.14+ kernel, or vice versa, data could be corrupted.

In Linux v5.4, a mitigation was added, requiring the user to specify the
layout version of such RAID0 arrays explicitly, as a module parameter. If
the user fails to specify a layout version, the v5.4+ kernel refuses to
assemble such arrays. This is why "test-md-and-lvm-devices" currently
fails, with any v5.4+ appliance kernel.

Until we implement a more general solution (see the bugzilla link below),
work around the issue by sizing sda1 and lv0 identically. For this,
increase the size of sdb1 to 24MB: when one 4MB extent is spent on LVM
metadata, the resultant lv0 size (20MB) will precisely match the size of
sda1.

This workaround only affects sizes, and does not interfere with the
original purpose of this test case, which is to test various *stackings*
between disk partitions, software RAID (md), and LVM logical volumes.

Related: https://bugzilla.redhat.com/show_bug.cgi?id=2005485
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20210920052335.3358-3-lersek@redhat.com>
Acked-by: Richard W.M. Jones <rjones@redhat.com>
[lersek@redhat.com: remove stray empty line]
2021-09-21 19:00:59 +02:00
..
2021-03-18 16:28:55 +00:00
2021-03-18 16:28:55 +00:00
2021-03-18 16:28:55 +00:00
2021-03-18 16:28:55 +00:00
2021-03-18 16:28:55 +00:00
2021-03-18 16:28:55 +00:00
2021-03-18 16:28:55 +00:00
2021-03-18 16:28:55 +00:00
2021-03-18 16:28:55 +00:00
2021-03-18 16:28:55 +00:00
2021-03-18 16:28:55 +00:00
2021-03-18 16:28:55 +00:00
2021-03-18 16:28:55 +00:00
2021-03-18 16:28:55 +00:00
2021-03-18 16:28:55 +00:00
2021-03-18 16:28:55 +00:00
2021-03-18 16:28:55 +00:00
2021-03-18 16:28:55 +00:00
2021-03-18 16:28:55 +00:00
2021-03-18 16:28:55 +00:00
2021-03-18 16:28:55 +00:00
2021-03-18 16:28:55 +00:00
2021-03-18 16:28:55 +00:00
2021-03-18 16:28:55 +00:00
2021-03-18 16:28:55 +00:00
2021-03-22 16:27:07 +00:00