From: Bill Davidsen <davidsen@tmr.com>
To: Maxime Boissonneault <maxime.boissonneault@usherbrooke.ca>
Cc: robin@robinhill.me.uk, linux-raid@vger.kernel.org
Subject: Re: Upgrading a software RAID
Date: Sat, 30 May 2009 14:32:08 -0400 [thread overview]
Message-ID: <4A217BA8.1080208@tmr.com> (raw)
In-Reply-To: <4A1EA095.9090406@usherbrooke.ca>
Maxime Boissonneault wrote:
>
> Robin Hill a écrit :
>> On Mon May 25, 2009 at 01:05:15PM -0400, Maxime Boissonneault wrote:
>>
>>
>>> Hello,
>>> I am using Ubuntu Hardy with 3x500GB drives and the following RAID
>>> configuration :
>>>
>>> /boot is on a 100MB RAID1
>>> / is on a 30GB RAID0
>>> /home is on a 906GB RAID5
>>>
>>>
>> Ouch - why RAID0 for /? If you lose a single drive then all the
>> configuration, etc. is down the drain. I'd suggest rethinking this
>> while you're going through the rebuild process anyway.
>>
>>
> That is why I do backups of / on /home regularily. I first did a RAID0
> for performance. I did some testing on performance of RAID0,1,5 and
> RAID1 was pretty lousy (I put the results of my tests here :
> http://cqed.physique.usherbrooke.ca/~mboisson/htpc.php?sec=raid_test )
> I guess I should have used a RAID5, but RAID1 seems like a terrible
> idea considering the really bad performances.
>
>>> I want to replace the 3 drives by 3 1TB drives.
>>>
>>> Here is how I planned to do it :
>>> 0- Backup my /home on some external disk.
>>> 1- backup / with something like :
>>> sudo tar cvpzf /backup.tgz --exclude=/media --exclude=/proc
>>> --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt
>>> --exclude=/sys
>>> --exclude=/home /
>>> mv /backup.tgz $1
>>>
>> You'll need to do the tar in single user mode (init 1) to ensure there's
>> no open files when you're backing up (or use a bootable CD).
>>
>>
> I used this backup before to restore the system and it seemed to work
> pretty well.
>>> 2- Replace 1 disk
>>> 3- Boot and let the RAID1 and RAID5 reconstruct
>>>
>> You'll have to boot to a CD then - your root FS is trashed at this
>> point.
>>
>>
>>> 4- Replace 1 other disk
>>> 5- Boot and let the RAID1 and RAID5 reconstruct again
>>> 6- Replace the last disk
>>> 7- Boot and let the RAID1 and RAID5 reconstruct one last time
>>> 8- Boot and restore the backup on the RAID0 / partition.
>>> 9- Resize the /home partition to 1 TB.
>>>
>>> I suspect there will be a problem replacing the primary disk, but I
>>> guessed
>>> that I could solve this simply by changing which is the primary disk
>>> in the
>>> BIOS.
>>>
>>> Is there any other problem that will or could happen ?
>>>
>>>
>> See above - your current plan is pretty much doomed I'm afraid.
>>
>>
>>> For example, I am not sure if the raid manager is on the /boot
>>> partition or
>>> on the /. I guess if it is on /, it won't work at all since the raid
>>> manager
>>> itself won't be able to run ?
>>> Also, is it possible to boot and access a command line to restore
>>> the backup
>>> with a failed / partition ?
>>>
>>> I am also unsure about how I should proceed to resize the /home
>>> partition.
>>> Is this done through mdadm ?
>>>
>>>
>> No, you'll have to delete & recreate the partition using fdisk.
>>
>>
>>> Please enlight me on any problems that I will have.
>>>
>>>
>>
>> An easier option (assuming you want to keep the arrays as currently
>> setup) would be to boot from a CD and do a full copy of each of the
>> 500GB disks to the 1TB disks. You'll then just need to resize the
>> last partition (assuming /home is set up on the last partition on the
>> disks anyway) and grow the array and filesystem.
>>
>> A _better_ option (if possible) would be to install all the drives in
>> the system concurrently, then you can boot from CD and create arrays on
>> the new drives and copy the data across. You'll also need to update
>> mdadm.conf (and the initrd if you're using one) to indicate the new
>> array IDs.
>>
>> HTH,
>> Robin
>>
>
> I can not install more drives in the computer. It is a home theater
> computer in a small case. I was expecting to be able to let the raid
> manage the copies itself.
>
> If the / was on a RAID5, would it be able to boot with 2 disks ?
> If so, is it possible to convert my RAID0 to a RAID5 ?
> For example, I could boot on a CD, backup / onto /home, delete the
> RAID0 array and recreate it as RAID5, then restore the backup. Would
> this work ?
Based on my testing (somewhat old now) and regular use, I would say
raid10 is probably your best bet. It's fast and secure, and with the -f2
option for "far" copies it's able to give high transfer rates.
--
bill davidsen <davidsen@tmr.com>
CTO TMR Associates, Inc
"You are disgraced professional losers. And by the way, give us our money back."
- Representative Earl Pomeroy, Democrat of North Dakota
on the A.I.G. executives who were paid bonuses after a federal bailout.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-05-30 18:32 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-25 15:32 Adaptec 2405 : hardware or software raid? Janek Kozicki
2009-05-25 16:52 ` Andrew Burgess
2009-05-25 17:05 ` Upgrading a software RAID Maxime Boissonneault
2009-05-28 13:38 ` Bill Davidsen
2009-05-28 13:44 ` Maxime Boissonneault
2009-05-28 14:05 ` Bill Davidsen
2009-05-28 14:14 ` Robin Hill
2009-05-28 14:32 ` Maxime Boissonneault
2009-05-28 15:08 ` Robin Hill
2009-05-30 18:11 ` Maxime Boissonneault
2009-05-30 19:03 ` Robin Hill
2009-05-30 20:03 ` Maxime Boissonneault
2009-05-30 20:15 ` Robin Hill
2009-05-30 22:18 ` Maxime Boissonneault
2009-05-30 22:52 ` Maxime Boissonneault
2009-06-02 18:23 ` Bill Davidsen
2009-06-02 18:32 ` Thomas Fjellstrom
2009-06-02 19:57 ` Bill Davidsen
2009-06-02 20:03 ` Thomas Fjellstrom
2009-06-02 21:13 ` CoolCold
2009-06-03 16:30 ` Bill Davidsen
2009-05-29 8:58 ` Keld Jørn Simonsen
2009-05-30 18:32 ` Bill Davidsen [this message]
2009-05-30 18:35 ` Maxime Boissonneault
2009-05-30 19:10 ` Robin Hill
2009-05-30 22:39 ` Bill Davidsen
2009-05-31 0:17 ` Keld Jørn Simonsen
2009-05-31 5:21 ` Maxime Boissonneault
2009-06-02 18:33 ` Bill Davidsen
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=4A217BA8.1080208@tmr.com \
--to=davidsen@tmr.com \
--cc=linux-raid@vger.kernel.org \
--cc=maxime.boissonneault@usherbrooke.ca \
--cc=robin@robinhill.me.uk \
/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).