[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Clon disks with dd command

I believe this would be OK, so long as you're really sure the size is the same.

Two suggestions. First, another poster mentioned using a RAID 1 setup. This would let you verify that the sizes are in fact the same and provide automatic redundancy if a disk fails (no system down time due to the failure itself), plus no testing required.

Second, if you choose to go the dd route, you should test the resulting disk image in some way. The best would be to replace the original boot disk in your machine with the second disk (you want to do this so the device nodes, addresses etc. are the same when the BIOS/kernel come up, else you'll have a kernel panic). Second best would be to install the disk in a second system, which must have the same physical setup as the first (disk controllers, graphics card, etc.).


Alejandro wrote:
Bob and other people, thanks for your response, it's very important to me.

But I have my last short question:

Is it possible to use "dd" if I have to disks with the same size but
different models like this:

Disk A:
description: SCSI Disk
product: SAMSUNG SP0812C
vendor: ATA
physical id: 0.0.0
bus info: scsi@0.0:0.0
logical name: /dev/sda
version: SU10
size: 74GB
configuration: ansiversion=5

Disk B:
description: SCSI Disk
product: ST380013AS
vendor: ATA
physical id: 0.0.0
bus info: scsi@0.0:0.0
logical name: /dev/sda
version: 3.43
size: 74GB
configuration: ansiversion=5

Thanks a lot,


Bob McGowan escribió:
Short answer:  yes, that will work.

Longer:  showing example from my system.

# dd if=/dev/sda of=sda-blocks bs=1024 count=4
4+0 records in
4+0 records out
4096 bytes (4.1 kB) copied, 0.0101397 seconds, 404 kB/s
# ls -l
total 4
-rw-r--r-- 1 root root 4096 2006-12-21 08:33 sda-blocks
# file sd*
sda-blocks: x86 boot sector; partition 1: ID=0xfd, starthead 1,
startsector 63, 585922617 sectors, extended partition table (last)\011,
code offset 0x48

I copied the first 4K from my boot disk to a file using dd, and then
used 'file' to show that it has the:  1.  x86 boot sector; 2.  partition
information, including some data about the extended partition table.

You should probably use the 'bs=' option to 'dd', to speed it up.  In
cases where I've done this sort of thing, I've used block sizes that are
even multiples of the 'native' size.  You do need to be sure not to use
up all of your available RAM with a size that's too big ;)

I've found that 'bs=10k' seems to work well, though if you have plenty
of RAM you might want to try something bigger.


Alejandro wrote:
Hi all, I have a Debian Etch machine with a SCSI HD as a master disk. I
want to make a clon to another similar SCSI HD (same model and size), in
order to use it if the production disk fails.

People talk about "dd" command, telling it's possible to get a exact
mirror from one disk to another just running this:

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

Is this just the solution ??? No matter with the MBR or something else

Really thanks,


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply to: