linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adam Goryachev <mailinglists@websitemanagers.com.au>
To: bobzer <bobzer@gmail.com>, linux-raid <linux-raid@vger.kernel.org>
Subject: Re: migration of raid 5 to raid 6 and disk of 2TB to 4TB
Date: Tue, 26 Jul 2016 09:08:35 +1000	[thread overview]
Message-ID: <31663d09-eead-9e57-f1d7-34c19c901b91@websitemanagers.com.au> (raw)
In-Reply-To: <CADzS=aqYQEoqxHbp7keeuYqN2dLur1O=RfctfuFsraggxiWTKg@mail.gmail.com>

On 26/07/16 07:14, bobzer wrote:
> Hi,
>
> I'm looking for advice to not mess up my migration. because
> unfortunately i miss drive
> I wanna migrate all my data from a raid 5 of 4x2TB (actually 3 because
> i'm degraded right now) to a raid 6 of 4x4TB
> so exactly i got :
> - raid 5, should be 4 disk of 2T but got problem and so right now it's
> just 2x2T and a 2Tb disk image in a 4T disk (the raid crashed and is
> not start right now but is clean)
> - 2 disk of 4TB
> - the raid 5 use lvm2 on top of mdadm
>
> I want a raid 6 so i thought i could create a raid 6 degraded with the
> 2x4TB and after copy the data to this new raid and after add the third
> 4TB and finally add the 2  2TB as a raid 0 to get a 4TB
> I know it's an ideal solution to get 3x4TB + 2x2TB to do my raid but
> it give me time to invest.
>
> So my question is :
> - is it a really bad idea ?
> - do you have a better idea? solution ?
> - maybe i can migrate instead of copy a raid to another ?
>
> thank you very much
> Math
My head hurts, I don't understand what you currently have, but I think 
you have:
RAID5 with three members, sda1(2TB), sdb1(2TB) and an 2TB image stored 
on sdc1(4TB)
Two spare 4TB drives sdd1 and sde1.

I would do a replace from the image on sdc1 to sde1
Do a replace from sda1 to sdc1
Do a replace from sdb1 to sdd1
Create a RAID0 array on sda1 + sdb1 (linear or stripe, guess it doesn't 
matter much either way, though if performance matters, then think about 
this as it will throw out the expected performance of your array).
Do a add of the RAID0 to the RAID5 (it will add as a spare)
Do a grow of the RAID5 to RAID6
Do a grow --size=max to increase capacity to the smallest drive (don't 
do the grow earlier, the RAID0 might be slightly smaller).

The above means at no point is your RAID5 degraded, and you end up with 
RAID6.
It will probably take some time to do all that, I'm not sure if the 2nd 
and 3rd steps can be done in parallel or not...

PS, you should take a copy of all your RAID information and drive member 
details (lsdrv script) before commencing so that if something goes 
wrong, you have the best chance of recovery.
!!!Also, definitely ensure you have SCT/ERC configured properly on both 
the old and new drives!!!

Regards,
Adam
-- 
Adam Goryachev Website Managers www.websitemanagers.com.au

  parent reply	other threads:[~2016-07-25 23:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-25 21:14 migration of raid 5 to raid 6 and disk of 2TB to 4TB bobzer
2016-07-25 22:48 ` Wols Lists
2016-07-25 23:08 ` Adam Goryachev [this message]
2016-07-26 18:33 ` Peter Grandi
2016-07-26 20:19   ` Wols Lists
2016-07-27  2:16     ` bobzer
2016-07-27 13:22       ` Peter Grandi
2016-07-27 13:44         ` Wols Lists
2016-07-27 14:57           ` Peter Grandi
2016-07-27 13:27       ` Anthony Youngman
2016-07-27 15:12       ` Peter Grandi
2016-08-05 23:32         ` bobzer
2016-08-06 18:04           ` Wols Lists
2016-07-27 12:55     ` Peter Grandi

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=31663d09-eead-9e57-f1d7-34c19c901b91@websitemanagers.com.au \
    --to=mailinglists@websitemanagers.com.au \
    --cc=bobzer@gmail.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 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).