linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: "Garðar Arnarsson" <gardar@giraffi.net>
Cc: linux-raid@vger.kernel.org
Subject: Re: Backup file size when migrating from raid5 to raid6?
Date: Sun, 6 May 2012 21:00:28 +1000	[thread overview]
Message-ID: <20120506210028.6212b2f8@notabene.brown> (raw)
In-Reply-To: <CAH-e9vLiK6=HmDjM=Ub7p_Lxrp_L0x1bkAa2oP=ykajqvtkfDQ@mail.gmail.com>

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

On Sun, 6 May 2012 10:17:52 +0000 Garðar Arnarsson <gardar@giraffi.net> wrote:

> My raid5 array has gotten a bit big, it's containing total 10 drives
> right now (I started out with 3 drives). So I am going to convert it
> to raid6 before it gets any bigger.
> 
> I am doing a test-run on a virtual machine with virtual drives to see
> that everything works flawlessly.
> 
> When I tried to convert the array to raid6 I got a error message about
> a missing backup-file
> 
> mdadm --grow /dev/md0 --raid-devices=5 --level=6
> 
> mdadm level of /dev/md0 changed to raid6
> mdadm: /dev/md0: Cannot grow - need backup-file
> mdadm: aborting level change
> 
> I added the backup file and was able to convert the array successfully
> after that.
> 
> My question is, how big is this backup file going to be? My real raid
> array consists of 2tb drives, will the backup file be as big as one
> drive in the array, or will it just be few megabytes or gigabytes?
> I'm asking because I'm wondering if I need to buy an extra hdd for the
> backup file or if the backup file can just be on my OS hdd that has
> around 100gb free.

The backup file is a few megabytes. Around 16MB I think.

However if you are likely to add another device in the not too distant future
you can save yourself a bit of time.

If you

 mdadm --grow /dev/md0 --level=6 --layout=preserve

It will just make the new few a 'Q-block' device, containing the extra RAID6
'parity' block for each stripe.  This doesn't require any reshape or or any
backup file and is a lot faster.  All it requires is a normal recovery
operation.

Then when you later add another device you can

  mdadm --grow /dev/md0 --raid-devices=N+1 --layout=normalise

This will convert from the Q-on-the-last-device layout to a more normal
rotated-P-and-Q layout at the same time as adding extra space.

NeilBrown

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

  reply	other threads:[~2012-05-06 11:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAH-e9vLTY2eo0p3ud5FaWNe_2f8hej0aitFuu8K0M1RZdObiXQ@mail.gmail.com>
2012-05-06 10:17 ` Backup file size when migrating from raid5 to raid6? Garðar Arnarsson
2012-05-06 11:00   ` NeilBrown [this message]
     [not found]     ` <CAH-e9vJkrv2R-HTR7JfHwZK1sbYQ3fduGbtxEwtor4gtyd6PKQ@mail.gmail.com>
2012-05-07  0:35       ` Garðar Arnarsson
2012-05-07  0:54       ` NeilBrown
2012-08-16 23:28         ` Thomas Fjellstrom
2012-08-17  0:39           ` NeilBrown
2012-08-17  0:45             ` Thomas Fjellstrom
2012-08-17  0:52           ` John Robinson
2013-07-17 13:01   ` Boyan Alexiev
2013-07-17 20:51     ` NeilBrown

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=20120506210028.6212b2f8@notabene.brown \
    --to=neilb@suse.de \
    --cc=gardar@giraffi.net \
    --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).