[CentOS] Software Raid Recovery

Stephen Leonard Character Stephen.Character at Alorica.net
Fri Feb 20 18:17:52 UTC 2009


-----Original Message-----
From: centos-bounces at centos.org [mailto:centos-bounces at centos.org] On
Behalf Of Dan Carl
Sent: Friday, February 20, 2009 11:37 AM
To: CentOS mailing list
Subject: Re: [CentOS] Software Raid Recovery

Stephen Leonard Character wrote:
> On Fri, Feb 20, 2009 at 3:15 PM, Stephen Leonard Character
> <Stephen.Character at alorica.net> wrote:
>   
>> I have a server set up with 4hdd using software raid. I have /boot on
>>     
> a
>   
>> raid1 on md0 , / on raid5 on md1, and swap on raid0 on md2. If one of
>>     
> my
>   
>> drives die, how to I recover?
>>     
>
>   
>> First, put the swap also on RAID1, you don't want part of your memory
>> to become unavailable is a drive dies. Using RAID has no use then.
>>     
>
>   
>> If a drive dies nothing will happen, your system will continue to
keep
>> running (if you put your swap on raid1 that is). But make sure you
>> configure mdadm to send you a mail when that happens, so you know a
>> drive is gone.
>>     
>
>   
>> For recovery, just replace the disk, repartition it and re-add the
>> partitions to the raid arrays and your are done. The disks will
resync
>> and then everything is back to how it was.
>>     
>
>   
>> Regards,
>> Tim
>>     
>
> Thanks for the reply's, I'm assuming to do the repartitioning with
fdisk
> or gparted to repartition, what tools do I use to manage the software
> raid? I.e. how do I go about changing the swap partition to raid1 and
> re-add the partitions to the array? This system is for me to practice
on
> for my RHCT/E exams(too broke to pay for training) so I'm planning on
> breaking one of the drives(just remove it) and add a new one for
> practice.
>
> Thanks in advance,
> Stephen
>
>   
>Right, first partition the new drive then add it back to the Raid like
this.
>mdadm /dev/md1 -a /dev/sdc3
>Then the raid will start rebuilding.
>As posted early having swap on a raid zero is a bad idea .
>Dan


So, to change my swap to raid1, I would need to unmount it, delete the
md2 device, and rebuild it as a raid1 md2 device?
______________________________________________
CentOS mailing list
CentOS at centos.org
http://lists.centos.org/mailman/listinfo/centos



More information about the CentOS mailing list