Operating System - HP-UX
1834604 Members
4280 Online
110069 Solutions
New Discussion

dd on 10.20 box, for 9Gb disk, taking hours+

 
SOLVED
Go to solution
Nik
Advisor

dd on 10.20 box, for 9Gb disk, taking hours+

Hi,
I'm trying to image some disks from c3000 workstations with 2x9Gb disks. In single user mode, I am using the following command:

dd if=/dev/dsk/c3t6d0 of=/dev/dsk/c3t5d0 bs=512k

This is taking hours to run! It never used to.. I have tried a number of different target and source disks but no change in the time it takes to complete. It works fine, same rec's in and out, but just taking sooo long!
This can't be right for 9Gb data can it?

Does anyone have any ideas? with bs=512k the source disk (6) flashes intermittently, while the target disk (5) is on constant...
but if I remove bs=512k at the end of the command, both disk are flashing constantly. (It's been running over 2 hours now!) bonus points for whoever replies before it completes! :)

cheers, Nik
8 REPLIES 8
Dan Hetzel
Honored Contributor

Re: dd on 10.20 box, for 9Gb disk, taking hours+

Hi Nik,

Blocksize 512k should be adequate...
It shouldn't take that long to copy 9 gigs.

Don't you have any disk or SCSI related errors is /var/adm/syslog/syslog.log?

You could use mirroring if you want to replicate a full disk, as they appear to be of same size.


Best regards,

Dan

Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Nik
Advisor

Re: dd on 10.20 box, for 9Gb disk, taking hours+

thanks for your feedback..

No errors at all.. it all completes fine as well.. It's just kindof annoying how long it takes as I only have 1 system I can use to image at the moment.. And it gets pretty boring watching the output of 'dd'...!

Maybe I'll try bs=1024k on the next one...?!
Carlos Fernandez Riera
Honored Contributor
Solution

Re: dd on 10.20 box, for 9Gb disk, taking hours+

Just in time ;-)

for this prurpose you must use raw device -/dev/rdsk/- for both disk.

If your disk were be in different controlers best- /dev/rdsk/c1.... & /dev/rdsk/c3....-


unsupported
melvyn burnard
Honored Contributor

Re: dd on 10.20 box, for 9Gb disk, taking hours+

Having both discs on the same bus is certainly not going to help.

I would also suggest you check you are using the raw disc, i.e. /dev/rdsk rather than the block device.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Dan Hetzel
Honored Contributor

Re: dd on 10.20 box, for 9Gb disk, taking hours+

Hi Nik,

You could try to time transfers using a few blocksize values.
Give a 'count=xxx' to transfer the same amount of data every time.

example for 100Mb:

time dd if=/dev/dsk/c3t6d0 of=/dev/dsk/c3t5d0 bs=1024k count=100
time dd if=/dev/dsk/c3t6d0 of=/dev/dsk/c3t5d0 bs=512k count=200
time dd if=/dev/dsk/c3t6d0 of=/dev/dsk/c3t5d0 bs=256k count=400
time dd if=/dev/dsk/c3t6d0 of=/dev/dsk/c3t5d0 bs=128k count=800
time dd if=/dev/dsk/c3t6d0 of=/dev/dsk/c3t5d0 bs=64k count=1600

This would at least show you which blocksize gives the best speed.

Best regards,

Dan

Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Nik
Advisor

Re: dd on 10.20 box, for 9Gb disk, taking hours+

cheers everyone..

carlos, melvyn, I didn't realise I shoulld be using the raw disc (rdsk) rather than (dsk). Is that the case for all dd's?

Dan, thanks for the info on 'time' can't say I've ever used that before.

Nik
btw: you'll be glad to know it still hasn't finished.. so bring on the points! :)
Carlos Fernandez Riera
Honored Contributor

Re: dd on 10.20 box, for 9Gb disk, taking hours+

raw devices not need to pass through cache, and it is a lot faster.

To get image of your system:
Try to install ignite-UX!!!! and use make_recovery utility. ( perfect to put your image on tape ready to install).



unsupported
Michael Lampi
Trusted Contributor

Re: dd on 10.20 box, for 9Gb disk, taking hours+

Definitely use the character device files rather than the block device files.

Also, it might be possible that one or both of the disk drives is encountering internal recoverable errors. This can cause slower I/O transfers that do not actually report any problems to the host computer. It is only when the errors are unrecoverable that the drives squawk and SCSI errors are output on the console.
A journey of 1000 steps ends in a mile.