Thread (13 messages) 13 messages, 6 authors, 2014-03-28

Re: Array created by mdadm 3.2 & 3.3 have different array size, why?

From: Stan Hoeppner <hidden>
Date: 2014-03-27 20:39:30

On 3/27/2014 10:23 AM, Bernd Schubert wrote:
On 03/26/2014 10:14 PM, Stan Hoeppner wrote:
quoted
On 3/26/2014 3:00 PM, Tide wrote:
...
quoted
=================
Array 2 (RAID 6):
=================
# mdadm --examine /dev/sdb1
...
quoted
      Raid Level : raid6
    Raid Devices : 5
...
quoted
   Bad Block Log : 512 entries available at offset 72 sectors
The RAID6 array has sectors on each drive reserved for bad block
reassignment.  The RAID5 array does not.

This is the answer to your mystery.
Commits and code do not confirm this assumption.
quoted
        __u16   bblog_size;     /* number of sectors reserved for
badblocklist */
...
quoted
                printf("  Bad Block Log : %d entries available at
offset %ld sectors",
                       __le16_to_cpu(sb->bblog_size)*512/8,

So 512 bad-block-log entries only need 8 sectors and that would still
fit into the data offset of 2048 bytes (array 1). The
write-intent-bitmap is also not that big. But this commit log gives the
correct answer
quoted
commit 508a7f16b242d6c3353e15aab46ac8ca8dc7cd08
Author: NeilBrown [off-list ref]
Date:   Wed Apr 4 14:00:40 2012 +1000

    super1: leave more space in front of data by default.

    The kernel is growing the ability to avoid the need for a
    backup file during reshape by being able to change the data offset.

    For this to be useful we need plenty of free space before the
    data so the data offset can be reduced.

    So for v1.1 and v1.2 metadata make the default data_offset much
    larger.  Aim for 128Meg, but keep a power of 2 and don't use more
    than 0.1% of each device.

    Don't change v1.0 as that is used when the data_offset is required to
    be zero.
This is a good match because the discrepancy on his RAID6 is pretty
close to 128MB per drive.  However, both his RAID5 and RAID6 arrays are
metadata 1.2.  So this commit alone may not fully explain the capacity
difference he's seeing between RAID5 and RAID6.  Or is this commit RAID6
specific?  I don't see that in the comments above.

Cheers,

Stan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help