LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 06-22-2007, 11:49 AM   #1
sharptech
Member
 
Registered: Nov 2006
Posts: 104

Rep: Reputation: 15
Best way to clone hard drive to server


Hello,

I want to clone some Hard drives (20GB) and place them on our new 80GB drives.

We have a server where all the images are placed.

I tried to do a dd if=/dev/hdc of=/bootserver/hdc.img - however that did not work.

I also tried to use Ghost for Linux and put the image on a USB drive - however it did not start transferring.

Any suggestions -

Thanks
 
Old 06-22-2007, 12:13 PM   #2
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian 4.0 Etch
Posts: 1,349

Rep: Reputation: 49
Here's a simple how-to for using dd to migrate everything from one hard drive to a bigger one:

http://justlinux.com/forum/showthread.php?t=149328

Doing "dd if=/dev/hdc of=/bootserver/hdc.img" should have "worked", but of course all it does is create an image file. You'd need to run another dd command to copy from the image file to the new hard drive. (Naturally, you shouldn't have any partitions on hdc mounted when doing any of this.)
 
Old 06-22-2007, 12:19 PM   #3
sharptech
Member
 
Registered: Nov 2006
Posts: 104

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by IsaacKuo
Here's a simple how-to for using dd to migrate everything from one hard drive to a bigger one:

http://justlinux.com/forum/showthread.php?t=149328

Doing "dd if=/dev/hdc of=/bootserver/hdc.img" should have "worked", but of course all it does is create an image file. You'd need to run another dd command to copy from the image file to the new hard drive. (Naturally, you shouldn't have any partitions on hdc mounted when doing any of this.)
Thanks I will take a look at the site -

When I tried the dd command it gave me an input-output error and only did the first 3 gigs of the 20GB HD.
 
Old 06-22-2007, 12:44 PM   #4
sharptech
Member
 
Registered: Nov 2006
Posts: 104

Original Poster
Rep: Reputation: 15
Exact error is:

dd: reading '/dev/hda': Input/Output error

3GB copied -

There is plenty of space where I am copying - happens to any disk I try to clone.
 
Old 06-22-2007, 01:45 PM   #5
kav
Member
 
Registered: May 2006
Location: USA
Distribution: FreeBSD Ubuntu Debian
Posts: 137

Rep: Reputation: 15
It looks like the drive you are copying from has errors on it. If that is the case I wouldn't want to run off of it or a copy of it until you fix them (asuming they are fixable). Check the filesystem and the surface of the disks for bad blocks. How to do this depends on the filesystem.

Here is an excellent article on using dd: http://wiki.linuxquestions.org/wiki/Dd

It also talks about recovering media with errors on it. Note that it tells you to use 'conv=noerror' to keep copying even if you encounter errors. I would recommend against trying that until you first try to fix the errors because when dd encounters an error it fills the rest of the block the error was on with zeros. Who knows what kind of damage that could do.
 
Old 06-23-2007, 08:18 AM   #6
Wp2
LQ Newbie
 
Registered: Apr 2005
Distribution: Mepis
Posts: 26

Rep: Reputation: 15
Have you used partimage? You will need the space to place the compressed image before transferring though.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using dd to clone my hard drive Tommo Linux - Hardware 15 05-20-2007 03:49 PM
Bigger Hard Drive - Clone? Snump Mandriva 14 11-21-2006 08:37 AM
I need to clone a laptop hard drive mike160 Linux - Laptop and Netbook 9 04-23-2006 05:23 PM
Clone a hard drive twantrd Solaris / OpenSolaris 10 02-05-2005 02:15 AM
Easy way to clone linux installed hard drive mobassir Linux - Software 6 01-12-2004 05:34 PM


All times are GMT -5. The time now is 11:45 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration