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.

26 total posts (Page 2 of 3)   Prev   01 | 02 | 03   Next
Thread display: Collapse - | Expand +

All Answers

Collapse -


by Dumphrey In reply to Lots of great advice

removing them from the Win machine, use the safely remove hardware option. This is sometimes needed if NTFS does not "shut down cleanly" linux will not mount it. But, if its fat32 file systems linux is not seeing, im not sure. When you plug the device in, do you get any messages in dmesg?

Collapse -

no message, nothing happens but

by w2ktechman In reply to Before

the drive spins up.
When reading about DD it states to only have the drive on "free space" so I removed everything including the partition on one of them.
Then I tried mounting it and it stated that there was no entry in /etc/fstab. I browsed around google for a bit and found what needed to be changed. After the change and a command to mount it, I lost the ability to read usb flash drives, and the HDD still could not be mounted.
I can pull up what I did later.

I am going to try it on a SUSE 10.2 system today. Also though, I might be avoiding the USB drive anyway (for now) as I have downloaded a few images for boot cd's and read up on running it through the network. This way I will not need to pull the HDD from the system to clone it.
More testing, little time. But this is the fun part.

Collapse -


by Dumphrey In reply to no message, nothing happe ...

should not be needed for either a usb hard disk or a usb flash drive. I stick mine in the slot, and it loads, mounts, and puts an icon on the desktop (Ubuntu 6.10). But, it will also do this in fedora and gentoo (tested them in the past). It sounds like maybe you need to set your removable media access in the system preferences. In linux, as in windows and mac, USB just works. Linux is a little more picky about clean mount and unmount though.

Collapse -

Honestly, I had no problems with the USB

by w2ktechman In reply to FSTAB

until I tried getting it to read the HDD via USB. That is when I ran into problems. After searching through a dozen links from google, I had found several articles stating that problems with HDD's over 8GB can happen via USB and that extra config was needed. That is why I changed the file. But now I need to 'undo' the change so that my flash drive can work again.
no biggie, it took only a few minutes for the edit

Collapse -

It may very well be that

by w2ktechman In reply to Honestly, I had no proble ...

In SUSE, it is mostly stock, I have not fiddled too much with it. In PCLinuxOS, I have changed around many things, mainly to test out or learn. I could have screwed something up without realizing it. I just got my disk back, so maybe it is time for a reload...
And, before you ask it, yes, I tweaked everything from being logged in as root (and I do know better). But it was a 'test' machine, so I thought it easier this way.

Thanks for everything so far.

Collapse -

I still log

by Dumphrey In reply to It may very well be that

in as root occasionaly. I use to do it all the time, but as I made some serious blunders and learned from them, I started using su and sudo more and more. I managed to override some warnings in a gentoo emerge that created a situation where the login and session deamons were "gone". I had to boot from a rescue cd and basicly rebuild the base system =\ If I had not been root, it would have been more difficult to over ridethat warning. But, as they say, the best way to learn a new town is to get lost. The best way to learn a new OS is to break it and fix it.

Collapse -

Interesting Developemnet

by w2ktechman In reply to Before

In PClinuxOS I just could not get it to detect the USB drive, but I plugged it into SUSE 10.2, and it came up no problem.

But I have found several times in the past that what does not work in some distros, seems to work in SUSE. Except some common command line instructions (such as ifconfig).

Collapse -

Very true

by Dumphrey In reply to Interesting Developemnet

But its odd that PCLinux didnt detect it right away. Its the only distro that gives me WPA and a wireless driver on my laptop right off the install. Anyway, it did seem odd to be having problems with USB disks, I have a 500GB and a 400GB that I use back and forth between Ubuntu and Windows with no issues at all.

Collapse -

Ok, I am impressed with DD

by w2ktechman In reply to Very true

and that is not a double D as in bra size either, although those can be impressive as well.

Ok, what I meant to do was clone USB disk 1 to USB disk 2. Easy enough. The command should have been
dd if=dev/sda of=sdb
for a full clone. But, since I had not had coffee yet, and I was busy I had mis-typed and did not notice it. Here was the command
dd if=/dev/hda of=/dev/sdb
oops, see where it is going?
Instead of copying USB1 to USB2, I was copying my notebook HDD (SUSE install) to USB2. I continued to use the OS all day. Then I looked and the clone was done, that is when I noticed the mistake. Oops, it could not have cloned the OS while I was using it (I told myself). But out of curiosity, I decided to swap the drive and to my amazement, it booted up to my desktop....
Although it seemed slow, it booted to my desktop...
Ok, I would have assumed (incorrectly) that it would not have been able to mount the disk, or that it would not have been able to copy some obscure OS file or something while the OS was in use. How wrong was that (too many years of Windows I guess).
Ok, it was starting to really dog on me though, so something was wrong. I assumed that since it also cloned the swap partition, that I needed to clear it out or something, but how....lets try a reboot...
It worked.
I am using the cloned drive right now, and stowed the original for now. How cool is that, low performance hit, clone drive while using OS, and so far everything is working...

I am truly amazed at the dd command. Sometime by next week I will need to start creating and extracting image tests with it.

Collapse -

That is good to know !

by Dumphrey In reply to Ok, I am impressed with D ...

Now if only we could find a way to make DD do differential backups to an existing image =) It would be a source for consistant backups off of a live machine.

Back to Hardware Forum
26 total posts (Page 2 of 3)   Prev   01 | 02 | 03   Next

Related Discussions

Related Forums