Dailydave mailing list archives
Re: [nylug-talk] The Small Company's Guide to Hard Drive Failure and Linux
From: alex () pilosoft com
Date: Thu, 18 Nov 2004 09:59:41 -0500 (EST)
On Thu, 18 Nov 2004, Dave Aitel wrote:
One might think you could use dd to duplicate your drive. I initially tried this, and my results were not good. I did remember to use dd if=/dev/hda of=/dev/hdc conv=noerror (the noerror flag is important). However, this takes forever and a day. Basically it'll take all night. So be prepared for that, even on a small drive and a fast system. They sell devices that can do it faster, I think, but you don't have one, do you?
You need to do: dd if=/dev/hda of=/dev/hdc conv=sync,noerror bs=16384 default blocksize of 512 is too small - doing read/write in 512 byte increments is very inefficient. increasing blocksize will however increase the size of "bad block", if there's a bad sector anywhere in 8192 byte block, you'll get zeros on the output. If there are no bad blocks, dd will be flyin' - much faster than any other method, assuming your disk is mostly full. If disk is <50% full, dd is slower than tar/untar.
The other issue with dd is that typically replaces every sector on the disk. So you'll need a disk EXACTLY the same size as the previous disk. My disk was one meg smaller (40.0 Meg instead of 40.9 Meg). This was an annoying problem.
Since you didn't put sync, noerror means "skip bad blocks on input" - that means on output, that block will be missing (and thus filesystem all f'd up).
One thing my lilo did that was weird was rewrite the fstab to use "LABEL=/" instead of /dev/hda1. If you happen to be hosted at Pilosoft (or another co-lo that is run by someone on the local linux users group list - very good idea!) they might jump in and save your butt when you load it up and it doesn't work and you're too tired to figure out why.
You are welcome :)
It's not uncommon for a linux machine not to work properly when you reboot. This is because it's probably been a few years since you rebooted, and you probably redid a lot of libraries in the meantime, some of which arn't in the right places. So after you do all this, it's good to test out all your services and make sure they are, in fact, doing what you think they are. Your co-lo (whom you bought the computer from, most likely) often provides a guarantee of hard drives (Pilosoft does). Don't save the 50 bucks by taking them up on this, since that bad hard drive still has all your corporate data on it. You should be getting swamped with email now, since your mail was down and now it's up and the interweb is resending things for you.
I have a policy of rebooting boxes every 6 months for this exact reason. It is much better to realize that I forgot to put in something into startup scripts when I'm ready to troubleshoot the problems, not right after an accidental reboot or power loss event. -alex _______________________________________________ Dailydave mailing list Dailydave () lists immunitysec com https://lists.immunitysec.com/mailman/listinfo/dailydave
Current thread:
- The Small Company's Guide to Hard Drive Failure and Linux Dave Aitel (Nov 18)
- Re: [nylug-talk] The Small Company's Guide to Hard Drive Failure and Linux alex (Nov 18)
- Re: Re: [nylug-talk] The Small Company's Guide to Hard Drive Failure and Linux Paul Wouters (Nov 18)
- Re: The Small Company's Guide to Hard Drive Failure and Linux Paul Wouters (Nov 18)
- Re: The Small Company's Guide to Hard Drive Failure and Linux Frank Berger (Nov 18)
- Re: The Small Company's Guide to Hard Drive Failure and Linux Derek Vadala (Nov 18)
- Re: The Small Company's Guide to Hard Drive Failure and Linux Dave Aitel (Nov 18)
- Re: The Small Company's Guide to Hard Drive Failure and Linux miah (Nov 18)
- Re: The Small Company's Guide to Hard Drive Failure and Linux Anthony.zboralski (Nov 18)
- Re: The Small Company's Guide to Hard Drive Failure and Linux Derek Vadala (Nov 18)
- Re: The Small Company's Guide to Hard Drive Failure and Linux Anthony.zboralski (Nov 18)
- Re: The Small Company's Guide to Hard Drive Failure and Linux Derek Vadala (Nov 18)
- Re: [nylug-talk] The Small Company's Guide to Hard Drive Failure and Linux alex (Nov 18)