From: John Robinson <john.robinson@anonymous.org.uk>
To: Linux RAID <linux-raid@vger.kernel.org>
Subject: Re: Growing after replacing with larger discs
Date: Sat, 13 Mar 2010 15:18:28 +0000 [thread overview]
Message-ID: <4B9BACC4.8030608@anonymous.org.uk> (raw)
In-Reply-To: <20100312180910.GA12002@maude.comedia.it>
On 12/03/2010 18:09, Luca Berra wrote:
> On Fri, Mar 12, 2010 at 05:39:47PM +0000, John Robinson wrote:
>> Before I have to go to a customer's premises and try it, I wanted to
>> ask if anyone had already done anything like this: I have a CentOS 5
>> system with 0.90 metadata and type fd partitions with RAID-5 over 3
>> discs. I want to grow it by replacing the drives. If I dd the small
>> partitions onto larger ones on the new discs, then reboot, will the
>> system recognise the RAID-5 - which now has its metadata somewhere in
>> the middle of the paritions not at the end - so that I can then --grow?
> I believe it won't work
> mdadm has no way to know where the metadata is in the above case.
>
> you have to follow the painful procedure
> fail one drive (mdadm /dev/mdX --fail /dev/sdY)
> remove it (mdadm /dev/mdX --remove /dev/sdY)
> replace drive with larger one
> create larger partition
> add drive again (mdadm /dev/mdX --add /dev/sdY)
> wait for it to resync...
> ...and repeat until all drives have been replaced
Yeuch. That'll take forever, because I'd need to rebuild 3 times. I see
two other options:
(1) dd the drives as I said originally, and when the system can't find
the array on the bigger discs, recreate the array using the same options
the original array had
(2) degrade the existing array to two discs, replace the soft-failed
disc with one of the new discs, temporarily make a filesystem on it,
copy the data; replace the other two discs, make a new array on them
with a missing drive, copy the data back; scrub the temporarily-made
filesystem and add the drive to the array.
Actually I think something along the lines of Majed B's suggestion - in
this case hang a spare drive out the side of the chassis, and just copy
twice - would be quicker than (2). But (1) should work, shouldn't it?
Cheers,
John.
next prev parent reply other threads:[~2010-03-13 15:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-12 17:39 Growing after replacing with larger discs John Robinson
2010-03-12 18:00 ` Majed B.
2010-03-12 18:04 ` John Robinson
2010-03-12 18:13 ` Majed B.
2010-03-12 18:09 ` Luca Berra
2010-03-13 15:18 ` John Robinson [this message]
2010-03-13 15:21 ` Majed B.
2010-03-13 18:13 ` John Robinson
2010-03-13 18:22 ` Majed B.
2010-03-15 15:17 ` Stefan /*St0fF*/ Hübner
[not found] ` <aebf5d971003131242q234a6c5ct441dd995a9c6a541@mail.gmail.com>
2010-03-13 20:45 ` Beolach
2010-03-13 21:00 ` Majed B.
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=4B9BACC4.8030608@anonymous.org.uk \
--to=john.robinson@anonymous.org.uk \
--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).