All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Grover <agrover@redhat.com>
To: device-mapper development <dm-devel@redhat.com>
Subject: Re: How big should raid metadata device be?
Date: Tue, 3 Nov 2015 09:29:44 -0800	[thread overview]
Message-ID: <5638EF08.9050907@redhat.com> (raw)
In-Reply-To: <5638075F.90602@redhat.com>

On 11/02/2015 05:01 PM, Heinz Mauelshagen wrote:
> On 11/02/2015 08:55 PM, Andy Grover wrote:
>> Hi all,
>>
>> In looking at md-raid one question I had was exactly how large does
>> the metadata device need to be in comparison to the data device? It
>> contains a padded-to-4Kbyte sized raid metadata struct, and then also
>> a write intent bitmap that is sized based upon the number of stripes,
>> with 16 bits per stripe.
>
> There is no direct relationship between stripes and bitmap size, because
> the
> bitmap holds a bit per region.

Ah ok. I was confused because what dm-raid calls a chunk, mdraid calls a 
stripe, and what dm-raid calls a region, bitmap.c calls a chunk :-)

<snip example md size calculation>

I added some explanation to your size calculation and formatted it to be 
suitable to add to Documentation/device-mapper/dm-raid.txt:

The Metadata Device
-------------------
While users of dm-raid need not parse or access the contents of the
metadata device, they must still ensure it is of a certain minimum
size. Fixed-size metadata consumes 8KiB, and then one extra bit must
be allocated for each region in the raid device.

For example:

With a 64KiB region size and 1TiB raid1 set size (1TiB*Bit / 64 KiB =
16777216 Bit; 16777216 Bit / (8 Bit/Byte) / (1024 Byte/KiB) = 2048 KiB

      8 KiB fixed-size metadata
+ 2048 KiB region bitmap
-------------------------
   2056 KiB total

A device must contain fewer than 2^21 regions. With the default region
size of 4MiB this limit is reached at 8TiB. Therefore, raid devices
larger than that will need to use a larger region size, set with the
"region_size" parameter.

(end)

What do you think?

Anything else to add or change in dm-raid.txt while we're at it?

Thanks -- Regards -- Andy

      reply	other threads:[~2015-11-03 17:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-02 19:55 How big should raid metadata device be? Andy Grover
2015-11-03  1:01 ` Heinz Mauelshagen
2015-11-03 17:29   ` Andy Grover [this message]

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=5638EF08.9050907@redhat.com \
    --to=agrover@redhat.com \
    --cc=dm-devel@redhat.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.