[lug] Cloning / Replacing Hard disks

David L. Willson DLWillson at TheGeek.NU
Thu May 19 20:47:16 MDT 2011


I don't know anything about gddrescue, so I can't speak to that.

I seem to remember that Google thinks that SMART is pretty useless.

dd is a pretty simple utility. If you're careful, it will help you. If you're not careful, you have about a 50% chance of giving yourself a nasty cut.

If the second system is still making "wrong" noises, don't try to back it up with dd, because it's probably destroying itself as you use it. Send it to a data recovery shop, or back things up one file at a time, while booted from a CD to minimize I/O, and hope you get everything you care about before it poops out.

I think I would do something like this:

 - Boot from a CD.
 - Attach a large USB drive. Let's say it mounts at /media/BigDrive
 - dd if=/dev/sda of=/media/BigDrive/diagnostic-backup-of-box.dd bs=4M
 - if the last command fails, add "conv=noerror,null" to the command
 - shut down, replace the failing drive, boot from CD, attach the USB drive.
 - dd of=/dev/sda if=/media/BigDrive/diagnostic-backup-of-box.dd bs=4M
 - shut down, remove CD, reboot, repair file-system(s) if appropriate

----- Original Message -----
From: "Gordon Golding" <gordongoldin at aim.com>
To: lug at lug.boulder.co.us
Sent: Thursday, May 19, 2011 4:03:57 PM
Subject: [lug] Cloning / Replacing Hard disks


I'm helping out with a couple of situations with what looks like failing drives. I'm familiar with FC; one of these machines is Debian, the other is Ubuntu. 



1) One is Debian, I was sent this message about it: 




“ The hard drive on our linux box is indicating that it will fail soon, and that we should backup and restore it. The test it is failing is S.M.A.R.T., the exact failure is " status bad backup and restore ." The failure may be weeks or months away, and it hasn't actually failed yet. S.M.A.R.T. apparently is just informing us that we should really think about replacing the drive.” 

I imagine there are some "false positives" with smart, but I take it that the drive should be replaced soon. 
Anything to check? 

2) Rebuilding the system from scratch is a lot of work. Whats the easiest way to clone the hard drive? 

3) Second is Ubuntu 9.04 - " that was making some bad noises recently. " 
What's the easiest way/tool for getting a good idea if the drive in on the way out? 

4) If I decide to clone the Ubuntu drive, I notice that the Ubuntu instructions for the Ubuntu install CD's live distro mode mentions using gddrescue. AND the gddrescue instructions don't include the cfdisk -z /dev/sdb step. 
So I suppose I should make life easier and use gddrescue. 

5) I see that Debian has gddrescue, but I don't see instructions for using it - Ubuntu has lots of people posting detailed instructions. 

Any guidance, opinions are appreciated. 

Gordon Golding 

_______________________________________________
Web Page:  http://lug.boulder.co.us
Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
Join us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety



More information about the LUG mailing list