[CentOS] Mirroring Hard Drive

Fri Aug 1 19:34:30 UTC 2008
John R Pierce <pierce at hogranch.com>

Matt wrote:
> I have a 500GB Sata drive about 15% used I would like to make an exact
> copy of too another Sata 500GB drive as a spare.  That way if
> something happens to the one in service I can plug in the spare
> quickly and restore one of the weekly backups without reinstalling the
> entire OS and all the little tweaks of setup on this mail/web server.
>
> How do I do this?  That is make an exact bootable copy of a linux
> drive.  Its running Centos 4.6 if that matters.
>   


brute force approach...

    dd if=/dev/sda of=/dev/sdb bs=16384

that will copy the whole physical drive.   I would do this in single 
user mode (init 1) for best results, as any changes to the file system 
while a copy is in progress will be inconsistent