[Libguestfs] [PATCH] md-create: specify that the "chunk" parameter should be absent for RAID1

Laszlo Ersek lersek at redhat.com
Thu Feb 17 15:08:45 UTC 2022


On 02/17/22 16:03, Richard W.M. Jones wrote:
> 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: 19cc3dbcc4c45a1f4afe188d2e2ef4f8de217963
> 
> Makes sense, thanks.
> 
> ACK

Commit b92c026ddb69.

Thanks!
Laszlo




More information about the Libguestfs mailing list