DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 3rd October 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default dd slow, 1500KB/s (OpenBSD LiveCD)

Yesterday I wanted to clone a 500GB disk, this disk was somewhat faulty (Trouble spinning up, but once it was spinning it worked fine) and wanted to clone all data to an identical disk, dd is the obvious way to do that.

I booted jggmi's OpenBSD 4.3.1 liveCD, and used:
# dd if=/dev/wd1c of=/dev/wd0c

vmstat and systat show the speed to be about 1500 KB/s (!), this would mean it would take ~90 hours for the disk to be cloned (!).
I let dd run for well over 8 hours, and the speed didn't vary much, after I ^C-ed dd it told me the average speed was 1442010 bytes/sec.

I rebooted the machine, started Windows PE, used Norton Ghost, and the disk was cloned in about 30 minutes (As it should be).

Did I do something wrong? Why is dd so slow?
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #2   (View Single Post)  
Old 3rd October 2008
wilfried's Avatar
wilfried wilfried is offline
Real Name: Peter Strömberg
Port Guard
 
Join Date: May 2008
Location: Teckomatorp, Sweden
Posts: 11
Default

Quote:
Originally Posted by Carpetsmoker View Post
Yesterday I wanted to clone a 500GB disk, this disk was somewhat faulty (Trouble spinning up, but once it was spinning it worked fine) and wanted to clone all data to an identical disk, dd is the obvious way to do that.

I booted jggmi's OpenBSD 4.3.1 liveCD, and used:
# dd if=/dev/wd1c of=/dev/wd0c
use raw devices (rwdxx) instead of block devices (wdxx), and use a larger blocksize (default is a measly 512 bytes), e.g.:
# dd if=/dev/rwd1c of=/dev/rwd0c bs=32k
__________________
HP ProCurve 1800-24G, Phenom 9750, Dual Opteron 265, AMD64 3000+,
Dual P3-800, eMac G4 1.0GHz, Sun Blade 150, Alpha PWS 433 and more ...

Last edited by wilfried; 3rd October 2008 at 08:12 AM.
Reply With Quote
  #3   (View Single Post)  
Old 3rd October 2008
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by Carpetsmoker View Post
Why is dd so slow?
Try accessing the devices as character (raw) devices instead of block devices:

# dd if=/dev/rwd1c of=/dev/rwd0c
Reply With Quote
  #4   (View Single Post)  
Old 3rd October 2008
vermaden's Avatar
vermaden vermaden is offline
Administrator
 
Join Date: Apr 2008
Location: pl_PL.lodz
Posts: 1,056
Default

About dd(1) bs size I always get best results with bs=8-16MB
__________________
religions, worst damnation of mankind
"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds

Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”.
vermaden's: links resources deviantart spreadbsd
Reply With Quote
  #5   (View Single Post)  
Old 3rd October 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

Alright, I already used ghost now to clone this drive, but I'll remember your tips for the next time, many thanks.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
freeBSD LiveCD ccc FreeBSD Installation and Upgrading 10 14th September 2009 04:06 PM
why can't install freebsd on freesbie or livecd bsd2009 FreeBSD Installation and Upgrading 1 21st June 2009 07:24 AM
Using a LiveCD to gather info phreud FreeBSD Installation and Upgrading 9 15th November 2008 12:43 AM
start KDE on OpenBSD LiveCD ccc OpenBSD Installation and Upgrading 5 3rd November 2008 10:24 PM
Announcing LiveCD and LiveDVD .iso images of 4.3-release jggimi OpenBSD General 28 29th September 2008 02:25 PM


All times are GMT. The time now is 05:20 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick