dd command | Unix Linux Forums | Solaris

  Go Back    


Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

dd command

Solaris


Tags
dd, ufsdump

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 02-22-2006
savithasusan savithasusan is offline
Registered User
 
Join Date: Feb 2006
Last Activity: 16 March 2006, 2:51 AM EST
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
dd command

My machine has 2 hard disks. I have installed Solaris 10 in disk0 of my machine. I used dd command to copy from one disk to the other disk. The disk capacity is 73GB.

I gave the following command:
dd if=/dev/rdsk/c1t0d0s2 of=/dev/rdsk/c1t2d0s2

I waited for four days but the process did not terminate. How long will it take to copy one disk to the other?

Thanks,
Savitha
Sponsored Links
    #2  
Old 02-22-2006
98_1LE 98_1LE is offline Forum Advisor  
Registered User
 
Join Date: Dec 2000
Last Activity: 21 May 2012, 6:37 PM EDT
Location: Greater Dallas area
Posts: 405
Thanks: 0
Thanked 3 Times in 3 Posts
What type of machine is this? Whatr type of disks (IDE, SCSI, fiber channel, etc.)? How big is the disk? Is the OS on c1t0d0 on other slices, or is there heavy O/O on that disk?
Sponsored Links
    #3  
Old 02-22-2006
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 21 August 2014, 10:22 AM EDT
Location: Ashburn, Virginia
Posts: 9,919
Thanks: 59
Thanked 428 Times in 256 Posts
Timely question! I started a 73 GB dd disk copy a few hours ago. Unfortunately, both disks are on the same scsi controller. This is on an HP rp3440. I have glance running watching the dd process. glance can continuously update the display just like top does. By watching the file offsets I can see how fast the dd is progressing. I am getting almost 5GB/hour. And I thought this was slow. 4 days! whoa....

My command line:
Code:
dd if=/dev/dsk/source-disk bs=10485760 of=/dev/dsk/destination-disk

Your command line will behave like either:
Code:
dd if=/dev/dsk/source-disk bs=512 of=/dev/dsk/destination-disk
dd if=/dev/dsk/source-disk ibs=512 obs=512 of=/dev/dsk/destination-disk

You need to crank that block size up.

Last edited by Yogesh Sawant; 02-26-2010 at 12:58 PM.. Reason: added code tags
    #4  
Old 02-22-2006
dangral dangral is offline Forum Advisor  
Registered User
 
Join Date: Oct 2002
Last Activity: 31 July 2013, 6:52 PM EDT
Posts: 723
Thanks: 3
Thanked 4 Times in 4 Posts
I've always wondered what block size I should be using for a dd copy. Does it differ by hardware (for example a DVD drive vs. a Hard drive)? How does one know what block size to use?

Last edited by dangral; 02-22-2006 at 05:25 PM.. Reason: took out quote
Sponsored Links
    #5  
Old 02-22-2006
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 21 August 2014, 10:22 AM EDT
Location: Ashburn, Virginia
Posts: 9,919
Thanks: 59
Thanked 428 Times in 256 Posts
Some day I will benchmark a few runs of dd and find the optimal setting, if there is one. I have only dd'ed magnetic disks. Never dd'ed a cd-rom, let alone a dvd. So I'll stay with what I know. Use the rdsk style device, not the dsk so the data goes to straight your data segment (not via the buffer cache). The rdsk driver has to read whole sectors. If you ask for a piece of a sector, it may not work. Or it may read a sector and discard what you don't want. I stay with a multiple of 1024. Bigger is better than tiny. But after a point, the advantage starts to taper off. 1 MB is the smallest size I would consider trying. I will want to mentally estimate how much is left, etc...so no screwball sizes. I wind up with N * (1 MB) where N is some small integer. 10 MB seems like a nice round number. We have one bad spot on the disk. I expect dd to fail when it gets there. I will restart it on the next 10 MB chunk. So I have doomed myself to having a 10 MB hole in my disk. That is pretty much my thought process as I picked my blocksize.

It would be a disaster to pick a buffer size so large that box starts to page. I have plenty of memory on this box, so no problem there.
Sponsored Links
    #6  
Old 02-22-2006
zazzybob's Avatar
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
 
Join Date: Dec 2003
Last Activity: 13 May 2013, 9:02 AM EDT
Location: Melbourne, Australia
Posts: 2,185
Thanks: 3
Thanked 24 Times in 23 Posts
I dd from CD-ROM and DVD quite often to make iso images for mounting under VMWare ESX server. I always use a bs=512 in the dd command when creating the ISOs. I've never timed it, but also never been disappointed with performance - most data I've ever dd'd from optical media is around 1.4Gb.

Cheers
ZB
Sponsored Links
    #7  
Old 02-23-2006
savithasusan savithasusan is offline
Registered User
 
Join Date: Feb 2006
Last Activity: 16 March 2006, 2:51 AM EST
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
dd command

The disks are under a SCSI controller. Solaris 8 has been installed in c1t0d0. 4 days is indeed long time.

Regards,
Savitha
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
passing command output from one command to the next command in cshell kaaliakahn UNIX for Dummies Questions & Answers 2 02-10-2012 04:59 PM
unix command : how to insert text at the cursor location via command line? xib.be UNIX for Advanced & Expert Users 0 12-22-2010 05:45 PM
Need help! command working ok when executed in command line, but fails when run inside a script! 4dirk1 Shell Programming and Scripting 4 12-02-2010 05:47 AM
awk command in script gives error while same awk command at prompt runs fine: Why? catalys Shell Programming and Scripting 4 09-20-2010 10:07 PM
awk/sed Command : Parse parameter file / send the lines to the ksh export command rajan_san Shell Programming and Scripting 4 11-06-2008 12:29 PM



All times are GMT -4. The time now is 02:01 PM.