From: NeilBrown <neilb@suse.com>
To: LM <linux-raid@moellendorf.eu>, linux-raid@vger.kernel.org
Subject: Re: Level change from 4 disk RAID5 to 4 disk RAID6
Date: Mon, 10 Apr 2017 11:04:30 +1000 [thread overview]
Message-ID: <87vaqdxech.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <20170408214239.GF10267@lars-laptop>
[-- Attachment #1: Type: text/plain, Size: 1632 bytes --]
On Sat, Apr 08 2017, LM wrote:
> Hi,
>
> I have a 4 disk RAID5, the used dev size is 640.05 GB. Now I want to
> replace the 4 disks by 4 disks with a size of 2TB each.
>
> As far as I understand the man page, this can be achieved by replacing
> the devices one after another and for each device rebuild the degraded
> array with:
>
> mdadm /dev/md0 --add /dev/sdX1
>
> Then the level change can be done together with growing the array:
>
> mdadm --grow /dev/md0 --level=raid6 --backup-file=/root/backup-md0
>
> Does this work?
>
> I am asking if it works, because the man page also says:
>
>> mdadm --grow /dev/md4 --level=6 --backup-file=/root/backup-md4
>> The array /dev/md4 which is currently a RAID5 array will
>> be converted to RAID6. There should normally already be
>> a spare drive attached to the array as a RAID6 needs one
>> more drive than a matching RAID5.
>
> And in my case only the size of disks is increased, not their number.
>
Yes, it probably works, and you probably don't need a backup file.
Though you might need to explicitly tell mdadm to keep the number of
devices unchanged by specifying "--raid-disk=4".
You probably aren't very encouraged that I say "probably" and "might",
and this is deliberate.
I recommend that you crate 4 10Meg files, use losetup to create 10M
devices, and build a RAID5 over them with --size=5M.
Then try the --grow --level=6 command, and see what happens.
If you mess up, you can easily start from scratch and try again.
If it works, you can have some confidence that the same process will
have the same result on real devices.
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2017-04-10 1:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-08 21:42 Level change from 4 disk RAID5 to 4 disk RAID6 LM
2017-04-10 1:04 ` NeilBrown [this message]
2017-04-11 21:27 ` LM
2017-04-10 5:41 ` Wols Lists
2017-04-11 21:28 ` LM
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=87vaqdxech.fsf@notabene.neil.brown.name \
--to=neilb@suse.com \
--cc=linux-raid@moellendorf.eu \
--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.