Re: Issues with large chunk size (16Mb)

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

 



On Thu, Nov 29 2018, Ed Spiridonov wrote:

> On Thu, Nov 29, 2018 at 3:09 AM NeilBrown <neilb@xxxxxxxx> wrote:
>>
>> On Wed, Nov 28 2018, Ed Spiridonov wrote:
>> > I uploaded mdadm --examine output to
>> > https://bugzilla.kernel.org/show_bug.cgi?id=201331
>>
>> This only shows
>>      Raid Level : raid10
>> and
>>      Chunk Size : 512K
>>
>> I thought the problem was with RAID6 and a chunk size of 16M ??
>
> Oops, my wrong, I uploaded data of another array.
> Right 'mdadm --examine' output just uploaded
>
>> In any case, an import detail from this is :
>>
>>    Unused Space : before=98216 sectors, after=32768 sectors
>>
>> To perform a reshape-without-a-backup there needs to be at least one
>> chunk (the larger chunk size) either before or after.
>
> So it is
>    Unused Space : before=262056 sectors, after=28639 sectors
> Anyway it is big enough.
>
>> >> >> 2. Is it possible to reshape existing RAID with smaller chunk size?
>> >> >> (without data loss)
>> >>
>> >> Yes.
>> >
>> > I have not managed yet.
>>
>> Please try without --backup-file.
>
> I tried it before, it does nothing too.
>
> Here is tail of the strace output,could it help?

Yes it did - I could compare it to what happens when I test things (on a
smaller array) and see the differences.

The problem is here:

	blocks = (ochunk/512) * (nchunk/512) * odata * ndata / a;

in compute_backup_blocks() in Grow.c in mdadm.

ochunk is 16M or 2^24.
nhucnk is 4M or 2^22
When divided by 512 they are 2^15 and 2^13
odata and ndata are 2^3, so when those first 4 factors are multiplied
we get 2^*(15+13+3+3) or 2^34.
All of these are ints, so that overflows to zero.

If you can compile you own mdadm, try changing the types of nchunk and
ochunk to be 'long'.

Or you can try a chunk size of 512K - that should avoid overflow.

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