Re: ack! help!!!! something went dreadfully wrong!

Shawn Willden <[email protected]> Sat, 10 Jan 2004 15:08:26 -0700
Newsgroups gmane.linux.debian.kde.cvs
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 09 January 2004 02:20 am, Aditya Sengupta wrote:
> I have to agree with Tobi, you are just living on borrowed time (in true
> 
 cliched fashion!). I would certainly recommend doing an fsck, but the
> best thing would be to get a new hd. Format it ReiserFS, move your /home
> (and any other data directories) as well as your /etc to the new hd. If
> nothing goes wrong with your old hd, well, you have some extra space
> lying around. 

I had a drive start to give me funny errors a while back, and I did 
something similar, but a bit nicer.  I bought and installed a new drive 
but left the old one in place and set the pair of them up in mirrored 
configuration with Linux software RAID.  That way, if the old drive really 
is in bad shape, you won't lose any data when it finally dies (and the 
RAID software will e-mail you to tell you about the problem -- that's good 
because otherwise you might not notice!).  On the other hand, if the drive 
really is okay, you now have insurance against failures on the new drive.  
Even if the old drive is likely to be flaky, the odds that it and the new 
drive both die at the same time are lower than the odds that the new drive 
by itself takes a fall.  Either scenario is much more reliable than 
running on a suspected-dying drive.

Since you need to buy a new drive to be safe anyway, mirroring costs you 
nothing beyond a few minutes to set it up (took me about 20 minutes to 
read the HOWTO and about five minutes to build it) and a little bit of 
electricity to run two drives instead of one.  Well, it can also cost some 
write performance -- not too bad if you put the drives on different IDE 
controllers, though.  OTOH, I believe it can actually improve read 
performance.  I don't notice any difference with reads or writes, 
personally.

Oh, the new drive is likely to be larger than the old one, but that's not a 
problem.  Just make a partition on the new one that is the same size as 
(or just a tiny bit larger than) your existing hdb1 partition, and then 
you can mirror that with hdb1.  You can then partition the remainder of 
the new drive and use it for other data, which of course won't have the 
dubious benefit of being duplicated up on a probably-flaky drive.

In my case, my old drive had a failure about three months after I set up 
the RAID.  raidtools automatically dropped it out of the mirrored config 
and kept running with one disk.  I fscked it, ran some tests and when 
everything appeared to be fine put it back into the RAID; raidtools 
automatically updated it to match the other.  I've had no problems with 
either drive for over a year now.  I'm not really sure what happened, but 
I have a pretty high level of confidence that short of a house fire or a 
massive power surge that kills both drives, my photos are safe (I burn 
DVDs and give them to my parents to address that possibility).

Oh, and it's cool ;-)

Keep in mind that RAID is a way to increase the reliability of your disks; 
it's not a replacement for backups -- particularly not off-site backups.

	Shawn.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAAHfkp1Ep1JptinARAk/RAJ0TFLcJpqOlOKHZSs0ODZoER0gBQACdG8Dy
PNwqGoVTElc10mrHb2qVwVg=
=fMjM
-----END PGP SIGNATURE-----