linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robin Hill <robin@robinhill.me.uk>
To: "Patrick J. LoPresti" <lopresti@gmail.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: Units for mdadm --data-offset ?
Date: Fri, 29 Aug 2014 18:39:23 +0100	[thread overview]
Message-ID: <20140829173923.GA6774@cthulhu.home.robinhill.me.uk> (raw)
In-Reply-To: <CAKGkouuVrkjxSNOLqiNnd0OAByMw4iOLDgXVvQW0cMtRK5-sVw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2383 bytes --]

On Fri Aug 29, 2014 at 10:22:21am -0700, Patrick J. LoPresti wrote:

> What are the units for the "--data-offset" flag to mdadm? I am
> guessing kilobytes, but "--examine" displays the value in sectors, so
> I am not sure.
> 
> Also, is the "data-offset" per-member, or for the RAID as an aggregate?
> 
> Forgive me if this is all documented somewhere, but I cannot find it.
> 
It's in the mdadm man page on my system anyway. According to that:

    Arrays with 1.x metadata can leave a gap between the start of the
    device and the start of array data. This gap can be used for various
    metadata. The start of data is known as the data-offset. Normally an
    appropriate data offset is computed automatically. However it can be
    useful to set it explicitly such as when re-creating an array which
    was originally created using a different version of mdadm which
    computed a different offset.

    Setting the offset explicitly over-rides the default. The value
    given is in Kilobytes unless an 'M' or 'G' suffix is given.

    Since Linux 3.4, --data-offset can also be used with --grow for some
    RAID levels (initially on RAID10). This allows the data-offset to be
    changed as part of the reshape process. When the data offset is
    changed, no backup file is required as the difference in offsets is
    used to provide the same functionality.

    When the new offset is earlier than the old offset, the number of
    devices in the array cannot shrink. When it is after the old offset,
    the number of devices in the array cannot increase.

    When creating an array, --data-offset can be specified as variable.
    In the case each member device is expected to have a offset appended
    to the name, separated by a colon. This makes it possible to
    recreate exactly an array which has varying data offsets (as can
    happen when different versions of mdadm are used to add different
    devices).

It would look like the data offset is per member (it's not explicitly
stated, but that's certainly how I read it and how I recall seeing it
used previously).

HTH,
    Robin

-- 
     ___        
    ( ' }     |       Robin Hill        <robin@robinhill.me.uk> |
   / / )      | Little Jim says ....                            |
  // !!       |      "He fallen in de water !!"                 |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

      reply	other threads:[~2014-08-29 17:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-29 17:22 Units for mdadm --data-offset ? Patrick J. LoPresti
2014-08-29 17:39 ` Robin Hill [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=20140829173923.GA6774@cthulhu.home.robinhill.me.uk \
    --to=robin@robinhill.me.uk \
    --cc=linux-raid@vger.kernel.org \
    --cc=lopresti@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).