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
Steven Vishoot 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.
A 'cat /proc/mdstat' will show which partitions are active in each md set. Use 'mdadm --add /dev/md_device /dev/partition_device' to add back the missing partitions, being careful to match up the right device names for the raid sets and partitions. This will start a sync with the newly added and you can watch the progress with 'cat /proc/mdstat'. I'm not sure exactly what conditions trigger an automatic sync and what requires the manual one but if the system goes down cleanly they will pair up at reboot as long as the partition type is FD.
On Fri, Jul 3, 2009 at 9:15 PM, Steven Vishootsir_funzone@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@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.
Lucian@lastdot.org schrieb:
On Fri, Jul 3, 2009 at 9:15 PM, Steven Vishootsir_funzone@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@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.
well as I just did that yesterday I'd wish to add:
a) dd if=/dev/sda of=/dev/sdb bs=512 count=1 will also copy the grub info so it's a good thing to do if you ever want to be able to boot from the new disk if the old disk goes bad. However it does not seem to copy the info about the extended partitions, just the primary ones. So in my case (I needed a sdb5 and sdb6) I had to manually (using fdisk) prepare the extended partitions, taking the old disk as a template.
b) the syntax for mdadm is e.g. mdadm /dev/md0 --add /dev/sdb1 AFAICT although mdadm seems to be pretty smart about getting it right.
HTH
Kay
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
Here is what I did..cent 5.x, but linux commands shoulf work http://www.bobhoffman.com/wordpress/?page_id=44
----- Original Message ----
From: "Lucian@lastdot.org" lucian@lastdot.org To: CentOS mailing list centos@centos.org Sent: Friday, July 3, 2009 3:45:44 PM Subject: Re: [CentOS] software raid1 syncing
On Fri, Jul 3, 2009 at 9:15 PM, Steven Vishootwrote:
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@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. _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Thank you Les & Lucian,
I was able to fix the problem with your help, the first problem was an error between the chair and keyboard. I had forgot to turn the hard drive back on in the bios when i was trying to do some other stuff a while ago, so that caused me some grief and soon as i turned that on i was able to see the drive without having to do the "dd" command. ( i was trying to replace the mirrored drives and knock out the raid but i was not able to get the other drive up and running because i was having so much trouble with samba not working correctly). The second did help me and i was able to sync it up with no problems.
again thanks
steven