From: Bernd Schubert <bernd.schubert@fastmail.fm>
To: stan@hardwarefreak.com, Tide <lovetide@qq.com>,
linux-raid@vger.kernel.org
Subject: Re: Array created by mdadm 3.2 & 3.3 have different array size, why?
Date: Thu, 27 Mar 2014 16:23:09 +0100 [thread overview]
Message-ID: <5334425D.5010704@fastmail.fm> (raw)
In-Reply-To: <53334347.4050108@hardwarefreak.com>
On 03/26/2014 10:14 PM, Stan Hoeppner wrote:
> On 3/26/2014 3:00 PM, Tide wrote:
> ...
>> =================
>> Array 2 (RAID 6):
>> =================
>> # mdadm --examine /dev/sdb1
> ...
>> Raid Level : raid6
>> Raid Devices : 5
> ...
>> 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.
> __u16 bblog_size; /* number of sectors reserved for badblocklist */
...
> 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
> commit 508a7f16b242d6c3353e15aab46ac8ca8dc7cd08
> Author: NeilBrown <neilb@suse.de>
> 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.
Bernd
next prev parent reply other threads:[~2014-03-27 15:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-26 10:31 Array created by mdadm 3.2 & 3.3 have different array size, why? Tide
2014-03-26 18:01 ` Larry Fenske
2014-03-26 19:47 ` Tide
2014-03-26 18:38 ` Mikael Abrahamsson
2014-03-26 20:00 ` Tide
2014-03-26 21:14 ` Stan Hoeppner
2014-03-27 2:44 ` Array created by mdadm 3.2 & 3.3 have different array size Tide
2014-03-27 5:52 ` Stan Hoeppner
2014-03-27 6:41 ` Tide
2014-03-27 13:04 ` Wilson Jonathan
2014-03-27 15:23 ` Bernd Schubert [this message]
2014-03-27 20:39 ` Array created by mdadm 3.2 & 3.3 have different array size, why? Stan Hoeppner
2014-03-28 2:44 ` Tide
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5334425D.5010704@fastmail.fm \
--to=bernd.schubert@fastmail.fm \
--cc=linux-raid@vger.kernel.org \
--cc=lovetide@qq.com \
--cc=stan@hardwarefreak.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.