linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neil Brown <nfbrown@novell.com>
To: Phil Turmel <philip@turmel.org>,
	andras@tantosonline.com, linux-raid@vger.kernel.org
Subject: Re: How to recover after md crash during reshape?
Date: Thu, 22 Oct 2015 07:26:37 +1100	[thread overview]
Message-ID: <87k2qg0xz6.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <56278284.5020306@turmel.org>

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

Phil Turmel <philip@turmel.org> writes:

> Good morning Neil,
>
> On 10/20/2015 09:35 PM, Neil Brown wrote:
>
>> Nothing dumb about that - you don't need a --backup option.
>> If you did, mdadm would have complained.
>> 
>> You only need --backup when the size of the array is unchanged or
>> decreasing.
>
>> mdadm reads the first few stripes and stores them somewhere in each of
>> the spares.  md (in the kernel) then reads those stripes again and
>> writes them out in the new configuration.  It appears that one of the
>> writes failed, others might have succeeded.  This may not have corrupted
>> anything (the first few blocks are in the same position for both the old
>> and new layout) but it might have done.
>
>> If you do want to look for the backup, it is around about the middle of
>> the device and has some metadata which contains the string
>> "md_backup_data-1".  If you find that, you are close to getting the
>> backup data back.
>
> Hmmm.  This feature has advanced beyond my last look at the code.  I was
> under the impression the backup option was only optional when mdadm
> could move the data offset.  Does this new algorithm apply to v0.90
> metadata, a v3.2 kernel, and v3.2.5 mdadm?
>

It isn't a new algorithm, it is the original algorithm.

In mdadm-2.4-pre1 (march 2006), you couldn't specify a backup file, but
you could grow a raid5 to more devices.
That was changed by a patch with comment:

    Allow resize to backup to a file.
    
    To support resizing an array without a spare, mdadm now understands
      --backup-file=
    which should point to a file for storing a backup of critical data.
    This can be given to --grow which will create the file, or
    --assemble which will restore from the file if needed.
    
The backup-file was subsequently used to support in-place reshapes and
array shrinking.

NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

  reply	other threads:[~2015-10-21 20:26 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-20  2:35 How to recover after md crash during reshape? andras
2015-10-20 12:50 ` Anugraha Sinha
2015-10-20 13:04 ` Wols Lists
2015-10-20 13:49 ` Phil Turmel
     [not found]   ` <3baf849321d819483c5d20c005a31844@tantosonline.com>
2015-10-20 15:42     ` Phil Turmel
2015-10-20 22:34       ` Anugraha Sinha
2015-10-21  3:52       ` andras
2015-10-21 12:01         ` Phil Turmel
2015-10-21 16:17       ` Wols Lists
2015-10-21 16:05         ` Phil Turmel
2015-10-25 14:15       ` andras
2015-10-25 23:02         ` Phil Turmel
2015-10-28 16:31           ` Andras Tantos
2015-10-28 16:42             ` Phil Turmel
2015-10-28 17:10               ` Andras Tantos
2015-10-28 17:38                 ` Phil Turmel
2015-10-29 16:59               ` Andras Tantos
2015-10-30 18:12                 ` Phil Turmel
2015-11-03 23:42                   ` How to recover after md crash during reshape? - SOLVED/SUMMARY Andras Tantos
2015-10-21  1:35 ` How to recover after md crash during reshape? Neil Brown
2015-10-21  4:03   ` andras
2015-10-21 12:18   ` Phil Turmel
2015-10-21 20:26     ` Neil Brown [this message]
2015-10-21 20:37       ` Phil Turmel

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=87k2qg0xz6.fsf@notabene.neil.brown.name \
    --to=nfbrown@novell.com \
    --cc=andras@tantosonline.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=philip@turmel.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).