LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   cloning a drive with dd (http://www.linuxquestions.org/questions/linux-general-1/cloning-a-drive-with-dd-783495/)

gdanko 01-20-2010 10:17 AM

cloning a drive with dd
 
I have a Shuttle XPC with 3 drives. /dev/sda is a 320GB SATA drive with a basic installation. Two partitions, a swap and the rest is on /. The other two drives are 1.5TB SATA configured as a software mirror as /dev/md0.

I want to use dd to clone the 320GB boot/OS drive to a 750GB SATA I have at home. Last night I put the 750 in a USB enclosure and at about 6:00 PM fired off: dd if=/dev/sda of=/dev/sdd

It's now 7:16 AM and the dd is *STILL* going. Is this unusually long to clone the drive? Is there any way to check the progress or a way to launch dd with a progress indicator?

Tinkster 01-20-2010 11:46 AM

First thing: you don't really want to overwrite a 750 like that.
Just dd the partition across. 2nd: use a sensible blocksize, by
default dd will try to write the copy byte by byte which makes no
sense on a block-device (bs=2048 or bs=4096 are a good starting
point). 3rd: read the dd man-page. It gives you an EXAMPLE on how
to find out what kind of progress it has made.


Cheers,
Tink

gdanko 01-20-2010 12:23 PM

1) So I should partition the target disk first and then dd the partitions?
2) Check
3) Will do

Tinkster 01-20-2010 02:11 PM

Quote:

Originally Posted by gdanko (Post 3833737)
1) So I should partition the target disk first and then dd the partitions?

You could - that should save you the need to fix the
partition table afterwards. Make sure that the partition
on the new disk shares the same metrics.

Quote:

Originally Posted by gdanko (Post 3833737)
3) Will do

Sweet :}


Cheers,
Tink


All times are GMT -5. The time now is 07:40 AM.