From: Anugraha Sinha <asinha.mailinglist@gmail.com>
To: Adam Goryachev <mailinglists@websitemanagers.com.au>,
linux-raid@vger.kernel.org
Subject: Re: Converting 4 disk RAID10 to RAID5
Date: Mon, 26 Oct 2015 23:09:20 +0900 [thread overview]
Message-ID: <562E3410.3080701@gmail.com> (raw)
In-Reply-To: <562D8142.80507@websitemanagers.com.au>
Dear Adam
On 10/26/2015 10:26 AM, Adam Goryachev wrote:
> 1) fail two drives from the array:
> mdadm --manage /dev/md0 --fail /dev/sdb1
> mdadm --manage /dev/md0 --remove /dev/sdb1
> mdadm --manage /dev/md0 --fail /dev/sdd1
> mdadm --manage /dev/md0 --remove /dev/sdd1
> mdadm --misc --zero-superblock /dev/sdb1
> mdadm --misc --zero-superblock /dev/sdd1
>
> It seems that RAID10 device number is in order:
> sdb1 device0
> sdc1 device1
> sdd1 device2
> sde1 device3
> Therefore, I can fail device 0 (sdb1) and device 2 (sdd1) without losing
> any data.
>
> 2) create a 3 disk RAID5 with one disk missing.
> mdadm --create /dev/md1 --level=5 --raid-devices=3 /dev/sdb1 /dev/sdd1
> missing
>
> 3) Then copy all of the existing data across
> unmount partitions, stop LVM/etc
> dd bs=16M if=/dev/md0 of=/dev/md1
I dont know why this would be necessary.
>
> 4) Finally, stop the md0, and add the two devices to the new raid5, and
> then grow the array to use the space on the 4th drive.
> mdadm --manage --stop /dev/md0
> mdadm --misc --zero-superblock /dev/sdc1
> mdadm --manage /dev/md1 --add /dev/sdc1
> mdadm --misc --zero-superblock /dev/sde1
> mdadm --manage /dev/md1 --add /dev/sde1
> mdadm --grow /dev/md1 --raid-devices=4
>
> 5) Add the space to my LVM
> pvresize /dev/md1
>
> 6) Start up LVM, mount LV's, etc
I tried your method on a local system, and it seemed to worked.
The reason why I said that dd would'nt be necessary, as it is raid
syncing would work. You just need to be careful that you should not
start doing remove/add and other changing aspects of raid till the time
syncing is going on.
Finally when you grow your raid in RAID5 also syncing would happen.
Regards
Anugraha Sinha
next prev parent reply other threads:[~2015-10-26 14:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-26 1:26 Converting 4 disk RAID10 to RAID5 Adam Goryachev
2015-10-26 14:09 ` Anugraha Sinha [this message]
2015-10-26 14:10 ` Phil Turmel
2015-10-26 23:55 ` Adam Goryachev
2015-10-27 6:19 ` Anugraha Sinha
2015-10-27 6:32 ` Adam Goryachev
2015-10-27 12:13 ` Phil Turmel
2015-10-28 1:57 ` Adam Goryachev
2015-10-28 13:56 ` 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=562E3410.3080701@gmail.com \
--to=asinha.mailinglist@gmail.com \
--cc=linux-raid@vger.kernel.org \
--cc=mailinglists@websitemanagers.com.au \
/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).