linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "G.raud" <graud@gmx.com>
To: linux-raid@vger.kernel.org
Subject: mdadm: how to move superblock 1.0 on reduced components
Date: Thu, 16 Feb 2017 00:41:14 +0100	[thread overview]
Message-ID: <20170215234114.GL28234@gmx.com> (raw)

I cannot find information about this topic on the web.

Reducing the size of the components of an md array keeps the superblock
1.0 at the same position (which avoids data corruption and maybe is
required for md to find it).  However how can one then reduce the size
of the underlying device without losing the superblock?

In an array with redundancy re-addind reduced components one after the
other is a rather safe solution, I suppose, but it is time consuming.
Would it be possible to update the superblock version by doing that,
either by mixing different superblock versions by giving --metadata with
--add or by modifying the partitions defining the re-added components so
that the new devices start at the right offset for a superblock 1.2 (and
later using the following solution, re-creating the array with the
original partitions and a 1.2 superblock at the right offset with
--data-offset)?

Re-creating all components after a reduction of the underlying devices
seems possible by using --assume-clean.  What to look for to avoid data
loss?

mdadm already supports enlarging a 1.0 component, which requires moving
the superblock, so the code to reduce one would probably not require
much efforts.  Could it be added in the future?

I would like to attempt to move the superblocks 1.0 manually, but I lack
some information:

1) Should the reserved space before the superblock be moved along?

2) Is there metadata inside a superblock 1.0 to update after the move
   (that another program would not correct automatically)?

3) How is the superblock detected?  Is there only one position possible
   for a given chunk size on a given component size?  Should the
   remaining (padding) sectors of the underlying device be zeroed?

Thanks

             reply	other threads:[~2017-02-15 23:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-15 23:41 G.raud [this message]
2017-02-17 10:36 ` mdadm: how to move superblock 1.0 on reduced components Wols Lists

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=20170215234114.GL28234@gmx.com \
    --to=graud@gmx.com \
    --cc=linux-raid@vger.kernel.org \
    /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).