From owner-freebsd-questions Wed Dec 10 14:12:31 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id OAA23919 for questions-outgoing; Wed, 10 Dec 1997 14:12:31 -0800 (PST) (envelope-from owner-freebsd-questions) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id OAA23911 for ; Wed, 10 Dec 1997 14:12:29 -0800 (PST) (envelope-from julian@whistle.com) Received: (from daemon@localhost) by alpo.whistle.com (8.8.5/8.8.5) id OAA04008; Wed, 10 Dec 1997 14:07:52 -0800 (PST) Received: from UNKNOWN(), claiming to be "current1.whistle.com" via SMTP by alpo.whistle.com, id smtpd004001; Wed Dec 10 14:07:49 1997 Message-ID: <348F121F.28CC1042@whistle.com> Date: Wed, 10 Dec 1997 14:05:19 -0800 From: Julian Elischer Organization: Whistle Communications X-Mailer: Mozilla 3.0Gold (X11; I; FreeBSD 2.2-CURRENT i386) MIME-Version: 1.0 To: Jeremy Nelson CC: freebsd-questions@FreeBSD.ORG Subject: Re: Figuring out why my filesystems spontaneously broke References: <199712101713.LAA04378@nemesis.acronet.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Jeremy Nelson wrote: > > After doing a non-component related hardware maintanance (replaced the > fan in my power supply), i booted up the machine. It booted ok, I logged > in, started X windows and pppd. At an xterm, i 'cd'd into a subdirectory, > and did an 'ls'. The machine froze for about 15 seconds and rebooted. That's probably while the disk was having a hernia. what is your layout? (disklabel/fdisk) output.. > > So i move the harddrive to another machine that i know is working ok. > The harddrive appears to have lost its primary superblock. No problem, i'll > use a backup superblock. Fsck emits hundreds of DUP and BAD errors, and > a few various errors about "EXCESSIVE DUP BLKS", "INCORRECT BLOCK COUNT", > After making it through pass 1, pass 2 says that a few first-level directories > are empty. It then dies when it cant find an inode. Both the / partition > (partition a) and the /usr partition (partition e) have the exact same damage > signature. sounds like one of: (in increasing order of likelyhood) 1/ the drive remapped a whole bunch of blocks 2/ the drive FORGOT that it had remapped a whole bunch of blocks. 3/ the drive was writing bad data on every write you asked it to do. > > All of the file data is still there ('dd' has no problem finding it on the > raw devices), and disklabel(8) shows that the disk label is still intact. > Since *both* of the fs's went down and since all the data still seems to > be there, that would indicate that it wasnt a hardware failure. Nevertheless, > as someone on #freebsd suggested, my filesystems are toast. > > This then is a two part question: > 1) Is there any "easy" way to recover the data without having to resort to > my backups which i have to confess are probably a bit older than they > should be? we can maybe do some tests using un-used sectors and see if you can write to them. (simple C program.. open raw disk lseek to free block (e.g. block 2?) write pattern.. close device, check if pattern is on device.. > 2) What might have happened? Is there something i can do to avoid having > it happen again? no idea.. > > System specifics: > * 486/66, 40 megs of ram, a Conner CFS1621A IDE drive, generally the rest of > my system componants are unspectacular (built from parts). > * FreeBSD 2.2.2 (built from CD sources) The machine has been in contiuous > service since 1994 through a variety of harddrives and systems. This > particular harddrive has been running FreeBSD happily for about 18 months > now. I do not mount my drives async. > > Thanks to anyone who might be willing to offer help or suggestions. > Thanks to everyone for their hard work. I (and lots of others) appreciate it. > > Jeremy Nelson