[CentOS] A questiong about replacing my failing drive

Steve Huff shuff at vecna.org
Sun Jun 12 13:16:39 UTC 2005


On Jun 12, 2005, at 8:45 AM, Mark Weaver wrote:

> Since a Unix/Linux guru/admin is what I want to be when I grow up,  
> (my wife tells me thats not likely to happen - me growing up), I  
> would love to hear about your process.

one technique that works quickly and simply for *cloning* disks (i.e.  
you've got one disk that's already partitioned, has data on it, etc.  
and you've got another of the same make and model, and you want two  
exact copies) is to use dd.  since it's a block-level operation, it  
couldn't care less about whatever sorts of filesystems you've put on  
the disk, it'll preserve the MBR and whatever bootloader you may have  
there, and so forth.

1. install source disk and target disk in a machine (hooray for hot- 
swap bays!)
2. boot from CD or from other disk (i.e. *not* the target disk) into  
single-user mode
3. dd if=/dev/sdb of=/dev/sdc bs=1024 (source disk is /dev/sdb,  
target is /dev/sdc)

-steve

---
If this were played upon a stage now, I could condemn it as an  
improbable fiction. - Fabian, Twelfth Night, III,v




More information about the CentOS mailing list