LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-03-2006, 05:03 PM   #1
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
help please - "Superblock has an invalid ext3 journal"


lesson learned: don't do system admin when you're really tired. :P

I fsck'd a disk that was mounted & seriously fouled it up by doing so. (I suppose it could have gone bad on it's own... there was a reason I was fsck'ing).

In any event, I've since booted the machine off CD & run fsck, but now I get:

# fsck.ext3 /dev/hda3
e2fsck 1.38 (30-Jun-2005)
Couldn't find ext2 superblock, trying backup blocks...
Superblock has an invalid ext3 journal (inode 8).
Clear<y>?


If at all possible, I need to get some data (lots of data, actually) off of this disk. If I "Clear" like it's asking me, is there any chance of recovering any data? This machine is pretty critical - it's the system drive on my NIS/queue manager/software license server. It *was* running an old copy of RH9 - pretty much out of the box - no updates, 2.4 kernel, etc.

Any ideas?
 
Old 07-03-2006, 07:42 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
AFAIK deleting the journal only means the system won't have been updated since the last journal commit. The first thing I would do is make sure to never mount the drive in write mode but read-only and make a dd copy just in case.

If you think you can get away with copying off data just try it I'd say. If it bombs out then you could run fsck with the "check only" option which should give you a clue how large the damage is. If it spits out a list of inodes then you can query what file is attached using "debugfs -c /dev/hda3; ncheck inode_number" to determine if repair is worth it or necessary. If you have a lot of inodes to check, get them in a list and run like
for inode in $list; do /sbin/debugfs -R "ncheck ${i}" -c /dev/hda3; done
 
Old 07-11-2006, 07:20 PM   #3
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Original Poster
Rep: Reputation: 51
Quote:
Originally Posted by unSpawn
AFAIK deleting the journal only means the system won't have been updated since the last journal commit. The first thing I would do is make sure to never mount the drive in write mode but read-only and make a dd copy just in case.

If you think you can get away with copying off data just try it I'd say. If it bombs out then you could run fsck with the "check only" option which should give you a clue how large the damage is. If it spits out a list of inodes then you can query what file is attached using "debugfs -c /dev/hda3; ncheck inode_number" to determine if repair is worth it or necessary. If you have a lot of inodes to check, get them in a list and run like
for inode in $list; do /sbin/debugfs -R "ncheck ${i}" -c /dev/hda3; done
very good info.

for future reference, if anyone comes across this thread...

I dd'd the whole disk over to a larger disk (just because I had one lying around). Then ran fsck & answered yes to *everything* - took quite a while.

The root of the driectory structure was lost, so nothing was where it was supposed to be, but whole chunks of data were able to be recovered once found in the newly created "lost+found" directory... things like /var were in lost+found, but had been renamed to something like #163487... but inside there was a completly intact www/html - which is really what I was after. Have to learn to put php code into cvs. :P
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"apply journal on ext3 filesystem" - how? kpachopoulos Linux - General 1 02-10-2006 06:56 AM
Cedega from Fat32 (Invalid path "." given for "--use-dos-cwd") bdox Linux - Software 0 03-30-2005 11:24 AM
Cedega and Fat32 (Invalid path "." given for "--use-dos-cwd") bdox Linux - Games 0 03-26-2005 02:48 AM
"Microsoft Journal Viewer" linux equivalent? 95se Linux - Software 4 01-12-2005 11:13 AM
Assertion failure in journal_bmap() at journal.c:636: "ret != 0" meshcurrent Linux - Hardware 2 05-21-2003 08:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration