[NBLUG/talk] Software Raid - Proper method to replace a failing drive.

Christopher Wagner waggie at waggie.net
Wed Mar 9 00:15:09 PST 2011


Hi Mark, looks pretty sane to me, but it's been awhile for me, too..  My 
only comment is that you should make sure you have a complete and usable 
backup of mission-critical data before doing anything.

- Chris

On 03/09/2011 12:09 AM, Mark Street wrote:
> Hi,
>
> I have an older 1 U with 4 drives in a RAID array running CentOS 5.*.
>
> One of the drives is starting to fail /dev/sdd so I need to replace 
> it...  It is a bit different than hardware raid as I need to use the 
> mdadm commands.
>
> sdd1 is a boot partition = RAID 1
> sdd2 is a swap partition = RAID 1
> sdd3 is a root partition = RAID 5
>
> It has been a long time since I have done this with software raid so I 
> am asking for some critique of my written method.
>
> 1.  Make sure disk is not present in any arrays.
>
> mdadm --fail /dev/md0 /dev/sdd1
> mdadm --fail /dev/md1 /dev/sdd2
> mdadm --fail /dev/md2 /dev/sdd3
>
> 2.  Hotswap drive /dev/sdd or shutdown machine and replace drive /dev/sdd
>
> 3.  Add the drive back to the array
>
> mdadm --add /dev/md0 /dev/sdd1
> mdadm --add /dev/md1 /dev/sdd2
> mdadm --add /dev/md2 /dev/sdd3
>
> 4.  Let it rebuild and wait...
>
> Does that sound like a sane method?
>
> _______________________________________________
> talk mailing list
> talk at nblug.org
> http://nblug.org/cgi-bin/mailman/listinfo/talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nblug.org/pipermail/talk/attachments/20110309/fe717f0e/attachment.htm>


More information about the talk mailing list