All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wols Lists <antlists@youngman.org.uk>
To: Amy Chiang <amychiang@qnap.com>, linux-raid@vger.kernel.org
Subject: Re: Will mdadm make a backup if it takes two steps to covert raid5 to raid6?
Date: Wed, 13 Dec 2017 13:54:57 +0000	[thread overview]
Message-ID: <5A313131.9070709@youngman.org.uk> (raw)
In-Reply-To: <CAJtTb3EwgaAPCW+xKeNLxViWt2OixTLtW9Zeh3WZQY4q59x6hQ@mail.gmail.com>

On 13/12/17 03:57, Amy Chiang wrote:
> my question is,
> 1. "mdadm --grow /dev/md0 --level=6 --layout=preserve" will this
> command create Q even though it degrades the array?
> 2. Is backup happening in second step (reshaping)? if it's happening,
> why don't I need a backup file?

mdadm normally does not need a backup file. I don't know what
--layout=preserve is doing, but the reshape always happens as an
independent step, even if everything is specified at once.

If the space is available (and mdadm by default always reserves spare
space if it is given enough - I think a 2GB array will trigger a reserve
allocation) a reshape always starts writing in the reserved space. It
will lock and read stripe 1, and write it to reserved space. It will
then lock and read stripe 2, stripe 3 etc until it runs out of reserved
space. It will then use a window to make the new stripes active, unlock
them, and then reserve the space those stripes used to occupy for the
next bit of the reshape.

So, at all times, the bit of the array being reshaped is locked and has
multiple copies, and there's a window setting telling the management
layer where to find the active bits of the array.

Backup files are prone to cause trouble for novices, and this means they
are not necessary. Great news.

Cheers,
Wol

  reply	other threads:[~2017-12-13 13:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-13  3:57 Will mdadm make a backup if it takes two steps to covert raid5 to raid6? Amy Chiang
2017-12-13 13:54 ` Wols Lists [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-12-13  3:38 Amy Chiang

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=5A313131.9070709@youngman.org.uk \
    --to=antlists@youngman.org.uk \
    --cc=amychiang@qnap.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 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.