[CentOS] md0 and moving to another system

Thu Jun 10 23:42:19 UTC 2010
Joseph L. Casale <jcasale at activenetwerx.com>

>I thought to have tested this a while ago but I guess not.

Ok...

>I have a Centos 5.3 system (call its SYSA) software raid 0, 2 disks.

So a strip? Did you mean Raid 1 (Mirror)?

>I have an identical system (SYSB) else were, so I pull one of my  
>mirrors drives from SYSA and put it in SYSB as the only drive in SYSB.
>
>Upon but I get grub error.

So I am sure you meant Raid 1, otherwise I suspect you see the futility
in this?

You need to install grub to both discs, whereas the installer just hits
the first disc. In my MD Raid kickstart for systems like this I %post a
grub script that works as you describe:

# Install grub to both discs
/sbin/grub --batch >/root/grub_install.log <<EOF
root (hd0,0)
setup (hd0)
root (hd1,0)
setup (hd1)
quit
EOF

I actually use this on a dev system, I pull one of the two discs, boot and
do my tests then rebuild from the outdated original, works well...

jlc