Linux Drive Clone Question

By w2ktechman ·
Ok, here is the deal, and I think this would be good to know for all of those looking into learning Linux as well.
Currently at work I have a system (desktop) with 2 IDE based drives, master (OS -- WinXP) and slave (for data recovery, images for testing, etc.). I had an internal drive bay for the second, but I need the storage now.
Anyway, I have started using USB drive bays to recover data. But I just ran into a problem.
On Thursday, I had an ER recovery, and my manager requested the disk to be cloned. No Problem I say because I have done it many times. Usually it will take a few hours. But this time, it is cloning from a USB 2 drive. After an hour (Using Ghost 2003) I noticed that the speed was running at 17MB/Min. That translates to 1020MB/Hr. There is 36 GB on this drive.
Friday morning it was still running, and the user is asking why her system is not ready.
Then, another user comes in with a system that BSOD's on boot. It is easily tracked to the SW reg hive being corrupt. I could not use my machine for another 14 hours so, I setup a new desktop system with XP, 2 Hdd's and Ghost. Borrowed a USB drive bay, and started it. It ran at 112MB/Min.. Great, I thought about taking the first drive and using it on the new system. But after 5 min, it was running at 17MB/min.
Ok, this is too slow, in Windows, it works fast like it should, from the Ghost boot it runs like molasses.

Is there a solution in Linux that can clone a drive to an image file to be extracted on another drive where both the source and destination are a USB drive bay.
And, will it keep Linux open where the USB will work better, or will it close out to the command line or perform like ghost? Later Friday, I had another users drive go out and I had to tell them I could not get to it until Monday.
I was reading a bit on DD, but it looks like it just clones the drive to another, but I did not see anything that said it worked on USB drives, or that it creates a file to be extracted.

Any help would be appreciated, and I do mark as helpful. I just want to get the clone time down to a reasonable time frame. Cause 36+ hours for 36GB is just way too much.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

Should work

by Saurondor In reply to Linux Drive Clone Questio ...

Linux (at least the ones I've worked with) creates a /dev/sdaX for the USB drives. Pretty much like /dev/hdaX is for your hard drives. So using dd with 'if' and/or 'of' as /dev/sdaX (where X should be replaced with the proper identifier) should work. For example:

dd if=all.img of=/dev/sda1

Would mirror the all.img file to whatever is connected on /dev/sda1 (namely your USB drive)

You can read more here:


Collapse -

that appears to be for extraction

by w2ktechman In reply to Should work

but what about to create the image? I will look more into DD in a bit, thanks so far.
Do you know if DD has the ability to create image files, or just clone and extract?

Collapse -

Just reverse the parameters

by Saurondor In reply to that appears to be for ex ...

I believe that if you reverse the parameters then the image file would be created from the contents of /dev/sda1

Collapse -

I'll give it a try

by w2ktechman In reply to Just reverse the paramete ...

Thanks. I'll post back soon.

Collapse -

More on using dd

by StephenMollett In reply to I'll give it a try

If you wanted to show off (or just save
disk space), you could even compress the
image as you create it with:

dd if=/dev/sdx | gzip -9 > disk.img.gz

(I'm guessing you're a Linux command-line
newbie so I'll explain: If you don't
specify an output file for dd, it'll write
to standard output - normally the console.
The "|" pipes the standard output to gzip
instead, which reads from standard input
and writes to standard output if you don't
give it a file to compress. The ">" sends
gzip's standard output to the file

Then you can decompress on the fly as you
restore it:

gzip -dc disk.img.gz | dd of=/dev/sdx

Of course, you can always compress existing
uncompressed images with:

gzip -v9 disk.img

or decompress them with:

gunzip disk.img.gz

It'll take rather longer to create the
compressed image, of course, but restoring
it shouldn't be that much slower (if at
all) if you've got a reasonably fast
system. It may even be faster because
you'll be reading less from the source disk
so there'll be more bandwidth available for
writing to the destination.

If you're going to compress the image, it's
worth using some kind of wiping utility on
the source disk first to zero out all the
free space - you'll save quite a bit of
space that way.

On the subject of USB disks going slowly,
maybe the slowness is something to with the
USB bandwidth allocation. I often get odd
results when I've got two fast USB disks on
the go at once, such as one stalling while
the other is being accessed. Where
possible, I try to connect one disk to my
FireWire port and the other to USB if I've
got to use two external drives, but
obviously that depends on having a choice
of interfaces on at least one of the

Collapse -

Good point

by Dumphrey In reply to More on using dd

on the 2 usb disks. The issue is probably a low budget usb controller on the mobo. I would be willing to bet most consumer boards have this same problem. Ill have to test it out and see, I have never tried to move larg data chunks from one usb disk to another. If it is the case, adding a pci USB 2 card could solve a lot of problems.

Collapse -

You could try partimage

by RevDarkman In reply to Linux Drive Clone Questio ...

I too have recently needed to create images of new systems, I ended up using partimage from the system rescue CD (www.sysresccd.org) I did not use USB disks but created a samba share on another machine, and on a gigabit LAn it created images in 30 mins or so. The CD is worth a look for the other tools as well.

Collapse -

try mondo-archive

by mc_hendriks In reply to Linux Drive Clone Questio ...

You can download and install mondo-archive this backups a complete drive to another medium cd/dvd and problably also usb-drives. Afterwords you can boot from the new image and do a mondo-restore.

Collapse -


by Dumphrey In reply to Linux Drive Clone Questio ...

is a good program I have used several times in the past. It is nice in that it can (and prefers) to send and receive images to and from a tftp server over the network. But it can also do local disk clone jobs. As for your ghost clone, I have no idea why its so slow, it should not be. I get at least 98MB/min on mine when booting off the ghost cd and cloning to a usb 2 drive. I would double check that your port is usb2, and or make a custom boot disk with the usb drivers for your machine. Ghost 2003/Corp 8 was the last good Ghost product from THEM.

Collapse -

Lots of great advice

by w2ktechman In reply to Linux Drive Clone Questio ...

Thank You all for replying. I will consider this question closed now. I have lots of things to try, but I ran into a new problem, as on 2 Linux Distros, they will not recognise the external USB drive (tried 5 drives) and Win finds them all. Some have data, some do not. The USB flash drives are all found just fine. So I need to get by this stump before I can continue with the image part.

Once again, thank you all for the help and support.

Related Discussions

Related Forums