Laszlo Ersek
2022-Feb-17 14:29 UTC
[Libguestfs] [PATCH] md-create: specify that the "chunk" parameter should be absent for RAID1
Recently, mdadm has started (correctly) rejecting the "chunk" parameter for RAID1; see e.g. <https://bugzilla.redhat.com/show_bug.cgi?id=1987170>. Update the documentation accordingly, and in the mdadm test case, move the "chunk:65536" parameter from a RAID1 creation command to a RAID5 one. Suggested-by: Richard W.M. Jones <rjones at redhat.com> Signed-off-by: Laszlo Ersek <lersek at redhat.com> --- generator/actions_core.ml | 3 +++ tests/md/test-mdadm.sh | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/generator/actions_core.ml b/generator/actions_core.ml index 226fb860a073..8884f358079b 100644 --- a/generator/actions_core.ml +++ b/generator/actions_core.ml @@ -6566,6 +6566,9 @@ If not set, this defaults to C<0>. The chunk size in bytes. +The C<chunk> parameter does not make sense, and should not be specified, +when C<level> is C<raid1> (which is the default; see below). + =item C<level> The RAID level, which can be one of: diff --git a/tests/md/test-mdadm.sh b/tests/md/test-mdadm.sh index b961581baf7d..fac6c27fdd25 100755 --- a/tests/md/test-mdadm.sh +++ b/tests/md/test-mdadm.sh @@ -63,13 +63,13 @@ part-add /dev/sdd p $p4_start $p4_end # RAID 1. md-create r1t1 "/dev/sda1 /dev/sdb1" -md-create r1t2 "/dev/sdc1 /dev/sdd1" chunk:65536 +md-create r1t2 "/dev/sdc1 /dev/sdd1" # RAID 5. md-create r5t1 "/dev/sda2 /dev/sdb2 /dev/sdc2 /dev/sdd2" \ missingbitmap:0x10 nrdevices:4 spare:1 level:5 -md-create r5t2 "/dev/sda3 /dev/sdb3" missingbitmap:0x1 level:5 +md-create r5t2 "/dev/sda3 /dev/sdb3" missingbitmap:0x1 level:5 chunk:65536 md-create r5t3 "/dev/sdc3 /dev/sdd3" \ missingbitmap:0x6 nrdevices:2 spare:2 level:5 base-commit: 19cc3dbcc4c45a1f4afe188d2e2ef4f8de217963 -- 2.19.1.3.g30247aa5d201
Richard W.M. Jones
2022-Feb-17 15:03 UTC
[Libguestfs] [PATCH] md-create: specify that the "chunk" parameter should be absent for RAID1
On Thu, Feb 17, 2022 at 03:29:44PM +0100, Laszlo Ersek wrote:> Recently, mdadm has started (correctly) rejecting the "chunk" parameter > for RAID1; see e.g. <https://bugzilla.redhat.com/show_bug.cgi?id=1987170>. > Update the documentation accordingly, and in the mdadm test case, move the > "chunk:65536" parameter from a RAID1 creation command to a RAID5 one. > > Suggested-by: Richard W.M. Jones <rjones at redhat.com> > Signed-off-by: Laszlo Ersek <lersek at redhat.com> > --- > generator/actions_core.ml | 3 +++ > tests/md/test-mdadm.sh | 4 ++-- > 2 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/generator/actions_core.ml b/generator/actions_core.ml > index 226fb860a073..8884f358079b 100644 > --- a/generator/actions_core.ml > +++ b/generator/actions_core.ml > @@ -6566,6 +6566,9 @@ If not set, this defaults to C<0>. > > The chunk size in bytes. > > +The C<chunk> parameter does not make sense, and should not be specified, > +when C<level> is C<raid1> (which is the default; see below). > + > =item C<level> > > The RAID level, which can be one of: > diff --git a/tests/md/test-mdadm.sh b/tests/md/test-mdadm.sh > index b961581baf7d..fac6c27fdd25 100755 > --- a/tests/md/test-mdadm.sh > +++ b/tests/md/test-mdadm.sh > @@ -63,13 +63,13 @@ part-add /dev/sdd p $p4_start $p4_end > > # RAID 1. > md-create r1t1 "/dev/sda1 /dev/sdb1" > -md-create r1t2 "/dev/sdc1 /dev/sdd1" chunk:65536 > +md-create r1t2 "/dev/sdc1 /dev/sdd1" > > # RAID 5. > md-create r5t1 "/dev/sda2 /dev/sdb2 /dev/sdc2 /dev/sdd2" \ > missingbitmap:0x10 nrdevices:4 spare:1 level:5 > > -md-create r5t2 "/dev/sda3 /dev/sdb3" missingbitmap:0x1 level:5 > +md-create r5t2 "/dev/sda3 /dev/sdb3" missingbitmap:0x1 level:5 chunk:65536 > > md-create r5t3 "/dev/sdc3 /dev/sdd3" \ > missingbitmap:0x6 nrdevices:2 spare:2 level:5 > > base-commit: 19cc3dbcc4c45a1f4afe188d2e2ef4f8de217963Makes sense, thanks. ACK Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/