linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Units for mdadm --data-offset ?
@ 2014-08-29 17:22 Patrick J. LoPresti
  2014-08-29 17:39 ` Robin Hill
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick J. LoPresti @ 2014-08-29 17:22 UTC (permalink / raw)
  To: linux-raid

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.

Thanks!

 - Pat

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Units for mdadm --data-offset ?
  2014-08-29 17:22 Units for mdadm --data-offset ? Patrick J. LoPresti
@ 2014-08-29 17:39 ` Robin Hill
  0 siblings, 0 replies; 2+ messages in thread
From: Robin Hill @ 2014-08-29 17:39 UTC (permalink / raw)
  To: Patrick J. LoPresti; +Cc: linux-raid

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-29 17:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-29 17:22 Units for mdadm --data-offset ? Patrick J. LoPresti
2014-08-29 17:39 ` Robin Hill

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).