This works great if sdb or sdc fail, i can swap them with a different disk and rebuild them the problem starts if sda fails. When that happens i have booted from an OpenSUSE 11.1 Live cd and re partitioned the disk with the same three partitions and then rebuild the Raid on that disk. Then once you reboot the system it won’t boot from the harddisks. I guessed this might have something to do with Grub not been installed and pointing to the right disk. So booted back into the Live cd and tried installing Grub through Yast but it doesn’t seem to work. Also tried booting from a full OpenSUSE 11.1 DVD and used the repair system option, this however said i had no root partition. Im most confussed about what to do.
Any ideas how to fix this or if anyone has a better partition and Raid setup im happy to try that, can the /boot and /swap be put into the raid so if any disk fails it will be ok?
You could create a /boot on each drive (don’t mount the two extras) and
use dd to copy them across after the install is complete. You could
also setup additional swap and use all three in the fstab option (in the
partitioner) just set them as 1, 2 and 3.
sda1 swap pri=3
sdb1 swap pri=2
sdb2 /boot_spare1 (do not mount at boot)
sdc1 swap pri=1
sdc2 /boot_spare2 (do not mount at boot)
Then use the following to coppy boot to the spare ones;
Yes syslinux is part of the distro either from YaST or command line
zypper in syslinux. This can be all done after the install, and
probably best from rescue mode so the disks are unmounted, just need to
copy that mbr.bin to one of the boot directories and mount that
Like I said, wait for comments from others first, this can all be done
later after you install…
Ok im still have problems with my setup. I have now tested the following setup:
sda2 swap pri=3
sdb2 swap pri=2
sdc2 swap pri=1
md0 raid 1 using the 3 partitions for /boot
md1 raid 5 using the 3 partitions for /
md2 raid 5 using the 3 partitions for /data
This installs and runs fine. Now if sda fails the system still boots because sdb becomes sda and as it has a mirror of boot on there it boots fine. This is better than i was getting before the problem starts when you try to connect a new disk back as sda, the system won’t boot because sda is blank. So i booted from a OpenSuse Live cd and recreated the partitions on sda and then reconstructed the raid on the new disk, this all worked fine and the raids are all happy. Now if you reboot the system you would expect because of the mirror for /boot grub would be there working fine and you would boot off sda, this doesnt happen and im left with a black screen and “Booting from local disk”.
Ok so i then tried to boot the System repair from the DVD and reinstall Grub, this returns the error that no root partition is configued and won’t install a grub config. So i checked the Partition setup in the system repair tool and it doesn’t show any of my raids i have setup, the partitions are all there but none of the raids yet in the Live cd they are all there. So i tried to create them but not mount or format them, it lets me do this but them it seems to be reconstructing the raids as the disk are going for it then click accept and i get an error and are thrown out of the system repair!!! Is this happening because the System Repair isn’t mounting these Raids.
Any ideas on how to recover if the first disk in an array fails or is this just not possiable?
I have tested what you have suggested i dd the mbr and installed syslinux after i had installed the system by booting from a live cd. Then removed the 1st disk and replaced with another. Booted from a the live cd rebuild the partitions and the raid. dd the /boot partition back over and then booted from the hard disk and it won’t boot. Rebooted from the live cd and had a look at the /boot folder and it has no /grub folder so it has nowhere to boot from. Tried to reinstall /grub on the command line but this returns errors???
Have i missed something out or done something in the wrong order?