View Single Post

   
  #4 (permalink)  
Old 01-19-2008, 06:14 AM
Ant
 
Posts: n/a
Default Re: Accidently ran fsck on a mounted HDD and made problems! What to do?

> > I did something stupid earlier. I accidently ran fsck command on a mounted
> > HDD in Debian. I quickly ctrl-c'ed to get out of it. Now, I am having HDD
> > problems and I can't seem to recover/undo what I did. I rebooted and my box
> > didn't come back (can't check the box since I am at work and doing it via
> > SSH).


> > dmesg showed this after I before I rebooted it remotely with shutdown -r
> > now at: http://pastebin.ca/672751


> [sample from that paste follows]


> > EXT3-fs error (device hda1): ext3_free_blocks_sb: bit already cleared for block 228823
> > Remounting filesystem read-only
> > EXT3-fs error (device hda1): ext3_free_blocks_sb: bit already cleared for block 228824
> > EXT3-fs error (device hda1): ext3_free_blocks_sb: bit already cleared for block 228825

> [ditto for 228827 to 228830, 228832]
> > EXT3-fs error (device hda1): ext3_readdir: bad entry in directory #2: rec_len is smaller than minimal - offset=0, inode=2553887680, rec_len=0, name_len=0
> > EXT3-fs error (device hda1): ext3_readdir: bad entry in directory #2: rec_len is smaller than minimal - offset=0, inode=2553887680, rec_len=0, name_len=0
> > EXT3-fs error (device hda1): ext3_readdir: bad entry in directory #2: rec_len is smaller than minimal - offset=0, inode=2553887680, rec_len=0, name_len=0
> > EXT3-fs error (device hda1): ext3_readdir: bad entry in directory #2: rec_len is smaller than minimal - offset=0, inode=2553887680, rec_len=0, name_len=0


> Ouch.


> It looks like some objects were updated while fsck was running, and fsck has
> consequently overwritten newer metadata with older. Your ^C may well have
> prevented further damage...


Oh good.


> > Then, I decided to reboot and nothing came back (can't SSH back in). I
> > think it got stuck somewhere?


> When fsck failed, I expect; if so, you should see a root password prompt on
> the console.


OK. I hope it is there now.


> > If it indeed stuck, how do I fix this after I get home to see the console?


> Logging in & re-running fsck should be fine, but you should take that advice
> about using a CD and making a copy (consider "belt & braces"). (The Debian
> install CD will be fine for this.)


I have KNOPPIX v4.1 CD so I hope that's enough. I always have this CD
and the latest versions for emergencies for like this one!


> If you do log in and run fsck directly, you should find that the damaged
> partition is either mounted read-only or not yet mounted.


Do I just run fsck /dev/hda and it let run with defaults?
--
"He who cannot pick up an ant, and wants to pick up an elephant will
some day see his folly." --African
/\___/\
/ /\ /\ \ Ant @ http://antfarm.ma.cx (Personal Web Site)
| |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net
\ _ / Please remove ANT if replying by e-mail.
( )
Reply With Quote