Operating System - HP-UX
1829454 Members
1611 Online
109992 Solutions
New Discussion

what is the correct format use dd command?

 
Leon Shen
Frequent Advisor

what is the correct format use dd command?

Hi experts,

I would like use dd command to copy 1 harddisk to another harddisk on hp 700 series workstation. The operating system is 10.20. I know the dd command is like this:

# dd if=/dev/dsk/cxtxdx of=/dev/dsk/cxtxdx bs=1024

1. Can I use above command to copy whole data and os from 1 hard disk to another disk?

2. what is the best block size to copy ? 1024 or 8092 ?

3. can I use raw device to copy ? what is the differnce b/w raw device to block device copy ? following command also can use for copy image?
# dd if=/dev/rdsk/cxtxdx of=/dev/rdsk/cxtxdx bs=1024


Best
Leon
1 REPLY 1
Hein van den Heuvel
Honored Contributor

Re: what is the correct format use dd command?

1) I'd use the raw disk. Too slow otherwise.

2) Both are way to small. You will be constraint by IO/sec and seek latency.
How about 1024K for 1MB per IO! That should get you a decent MB/sec rate.

3) You should use the raw device, or you can mount the regular device and copy the mount point with cpio or such. The latter is atractive if the disk is not filled, or has relatively few big files. The former (raw dd) is intereting for near full disks, and when many little files are to be dealt with.



Free advice... Just try a few combinations!
Use /dev/zero and /dev/null to test as source resp sink.


Cheers,
Hein.