Rebuilding Raid 1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



You can replace the boot loader as follows:

1)Boot in REscue mode, and get a command prompt
2)Run grub, if your two disks are for example /dev/hda and /dev/hdb and 
the boot partition is the first on each:
          grub> root (hd0)
....
          grub> setup (hd0,0)
...
          grub>root (hd1)
...
          grub>setup (hd1,0)
...
          grub>exit

This will put a stage1 boot loader on each disk, you should be able to 
boot the originally non-bootable disk now.  Make sure you boot in the 
bios from the second disk, (which I presume is the one you want to 
keep), to make sure you could disconnect the original drive first and 
boot the system to try it.

You might find this article useful.

If the first disk has now been fixed but contains no data, you can 
export the partition table from the second disk using sfdisk, and 
re-import it on the first hard disk using sfdisk again, you can then use 
mdadm to hot add the first (replaced) disk to the second (running and 
now bootable) disk.

Regards

Pete



Mace Eliason wrote:
> Trying a different approch.
>
> Senario
>
> Raid 1 setup
> Bootable raid drive failed
> Mirror has been working for almost a month and then rebooted
> Now can't boot mirror drive grub not mirrored from other drive.
>
> I Fixed bootable drive.
> Question?
>
> Can I hook up both drives and boot fixed drive then rebuilt mirror 
> from nonbootable drive to bootable drive?
>
> Does the raid automatically rebuilt when I boot with both drives?
> Can I run a command to rebuilt from one drive to the other and visa versa
>
> I want to try it but I am worried that if I hook them up and it boots 
> that because the bootable drive has older info it might over write the 
> other drive.
> Thanks
>
> Can't seem to figure out how to get the other drive bootable.
> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> http://lists.centos.org/mailman/listinfo/centos
>


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux