Re: [PATCH 2/2] Assemble: add support for RAID0 layouts.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 31 2019, dann frazier wrote:

> On Thu, Oct 31, 2019 at 10:56:04AM +1100, NeilBrown wrote:
>> If you have a RAID0 array with varying sized devices
>> on a kernel before 5.4, you cannot assembling it on
>> 5.4 or later without explicitly setting the layout.
>> This is now possible with
>>   --update=layout-original (For 3.13 and earlier kernels)
>> or
>>   --update=layout-alternate (for 3.15 and later kernels)
>
> s/3.15/3.14/
>
>> Signed-off-by: NeilBrown <neilb@xxxxxxx>
>> ---
>>  Assemble.c |    8 ++++++++
>>  md.4       |    7 +++++++
>>  mdadm.8.in |   17 +++++++++++++++++
>>  mdadm.c    |    4 ++++
>>  super1.c   |   12 +++++++++++-
>>  5 files changed, 47 insertions(+), 1 deletion(-)
>> 
>> diff --git a/Assemble.c b/Assemble.c
>> index b2e69144f1a2..4066f93e977f 100644
>> --- a/Assemble.c
>> +++ b/Assemble.c
>> @@ -1031,6 +1031,11 @@ static int start_array(int mdfd,
>>  				pr_err("failed to add %s to %s: %s\n",
>>  				       devices[j].devname, mddev,
>>  				       strerror(errno));
>> +				if (errno == EINVAL && content->array.level == 0 &&
>> +				    content->array.layout != 0) {
>> +					cont_err("Possibly your kernel doesn't support RAID0 layouts.\n");
>
> Why possibly?

Because there might be other circumstances that could result in EINVAL.
I tend to be cautious when determining the cause for a particular
effect.

I've made all the changes you suggested.  Thanks a lot.

NeilBrown

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux