[CentOS] Mirroring Hard Drive

Paul R. Ganci ganci at nurdog.com
Wed Aug 13 01:03:07 UTC 2008

Robert wrote:
> I should have had the common decency to report that I *did* try this 
> howto and *was* successful. There were a couple things that caused 
> some head-scratching.
Yes I also made it work this weekend. I ignored all the stuff regarding 
the creation of /etc/mtab and mdadm.conf ... they are not needed.

I also took the precaution of entering single user mode (init 1) before 
copying the file system, etc. The rationale for doing this first is so 
that the system is not writing anything while or after you do the copy. 
I read this from this URL


which describes the same basic procedure.

Also I am not sure that all the grub installs are necessary. I thought 
that once grub was installed it was unnecessary to re-install. It is 
only necessary to change the /boot/grub/grub.conf and the changes take 
effect. Similarly with the ramdisk. I am not sure it is necessary to 
keep running mkinitrd to create a new ramdisk just because the grub.conf 
changed. Can somebody who might know for sure comment? I admit I 
followed the instructions regarding the running of grub/mkinitrd to the 
letter only because I was chicken to do elsewise.

Ironically I discovered that the new raid drive (i.e. /dev/sdb from the 
documentation) was defective. When trying to sync with /dev/sda after I 
added it to the array the sync hit some bad blocks on the /dev/sdb and 
so the sync failed. The system went into an infinite loop of sorts (fail 
sync, try again, fail sync, try again). Fortunately it didn't just drop 
/dev/sdb and I was able to reverse the process to get everything back 
onto /dev/sda, replaced /dev/sdb with a different drive and tried again. 
The second time worked without any hitches. How I didn't loose any data 
is beyond me ... sometimes it is better to be lucky than good.

Other than to make sure your drives are good the procedure described in 
the links of this thread work very nicely.

Paul (ganci at nurdog.com)

More information about the CentOS mailing list