[CentOS] software raid1 syncing

Lucian@lastdot.org lucian at lastdot.org
Fri Jul 3 20:45:44 UTC 2009


On Fri, Jul 3, 2009 at 9:15 PM, Steven Vishoot<sir_funzone at yahoo.com> wrote:
>
> hello all,
>
> I have a setup that is raid 1 and put the mirrored drive back in and now it is still showing as degraded saying: raid1: raid set md6 active with 1 out of 2 mirrors with this message on all the raids.i know i am wrong by saying this but i thought putting in the driving and rebooting would start the re syncing itself. what do i have to do to add this back in, i am so confused with this process.
>
> centos 4.x
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>

Well, just putting a new disk drive in the place of the bad one
doesn't cut it. You have to recreate partition table and then add the
partitions to the drive.
e.g.
sda = the old disk in the raid that has not failed
sdb = the newly added disk
dd if=/dev/sda of=/dev/sdb bs=512 count=1

That'll replicate the partition table and mbr to the new disk.

Then starting addinf the new partitions to the linux raid:
mdadm -a /dev/sdb1 /dev/md0 and so on, depending what your setup is.
Do a:
cat /proc/mdstat and see what partitions are added to which raid.
Alternatively to a google search for howtos (e.g.
http://www.gagme.com/greg/linux/raid-lvm.php ) and learn how to manage
linux raid so you dont fsck up your system.



More information about the CentOS mailing list