LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:57 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration