LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-09-2008, 09:10 PM   #1
ubyt3m3
Member
 
Registered: Apr 2008
Distribution: Slackware64 13.37, Solaris 10, RHEL5/6
Posts: 92

Rep: Reputation: 19
file system (superblock) corrupted?


Hi,

I saw a strange thing in my /home directory. When I did #ls -l mp3, it returned many ?s in the places for the file permissions, owners, size, and date. so, all directories looked something like this:

d?????? ? ???? ???? ??? ???????????? jazz
d?????? ? ???? ???? ??? ???????????? pops
...

I thought my filesystem was corrupted, so I unmounted the /home directory and tried to run fsck on /dev/hdb2. Then it returned this message:

[snip]---
bash-3.1# fsck /dev/hdb2
fsck 1.40.8 (13-Mar-2008)
e2fsck 1.40.8 (13-Mar-2008)
/sbin/e2fsck: Filesystem revision too high while trying to open /dev/hdb2
The filesystem revision is apparently too high for this version of e2fsck.
(Or the filesystem superblock is corrupt)

The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
---[snip]

I did mke2fs to look for alternative superblock and ran:

#e2fsck -f -b 98304 /dev/hdb2

Then it returned this message:

[snip]---
e2fsck 1.40.8 (13-Mar-2008)
e2fsck: Device or resource busy while trying to open /dev/hdb2
Filesystem mounted or opened exclusively by another program?
---[snip]

How come? I did umount on /home and /dev/hdb2 and nothing should be accessing the filesystem. fuser doesn't return anything either.

Could you help me to run fsck on /dev/hdb2 at least so that I can go forward investigating the problem? /dev/hdb2 should be ext3 as described in /etc/fstab

/dev/hdb2 /home ext3 defaults 1 2

Thanks in advance,
gibb
 
Old 06-09-2008, 09:40 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Linux Mint 18
Posts: 7,844

Rep: Reputation: 306Reputation: 306Reputation: 306Reputation: 306
Quote:
Originally Posted by ubyt3m3 View Post

Could you help me to run fsck on /dev/hdb2 at least so that I can go forward investigating the problem? /dev/hdb2 should be ext3 as described in /etc/fstab

/dev/hdb2 /home ext3 defaults 1 2
/dev/hdb2 is ext3 and you have been running e2fsck. It is possible that you made things worse. You also said that you ran mke2fs. If so then you wiped out the file system.

The first thing to do is run:

fsck -y -t ext3 /dev/hdb2

against a umounted /dev/hdb2. If you need to try a superblock other than the first then try:

fsck -b 32768 -y -t ext3 /dev/hdb2

------------------
Steve Stites
 
Old 06-09-2008, 09:48 PM   #3
ubyt3m3
Member
 
Registered: Apr 2008
Distribution: Slackware64 13.37, Solaris 10, RHEL5/6
Posts: 92

Original Poster
Rep: Reputation: 19
Thank you for your reply jailbait.
At first, I ran fsck.ext3 and I got the same message as I ran fsck /dev/hdb2, suggesting me to try with e2fsck -b 8193 <device>.

After reading your post, I ran the commands with -t ext3 option but I got the same result. Does this mean it's really messed up and not recovable?

I don't know why it keeps telling me that /dev/hdb2 is busy. I executed the cmd in single-user mode and no luck.

Any idea?

Thanks in advance,
gibb
 
Old 06-09-2008, 10:16 PM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,685
Blog Entries: 27

Rep: Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028
Hi,

You did boot into single? You could use your Slackware 12.1 install cd/dvd to insure that there won't be conflicts.

Code:
excerpt from 'man e2fsck';

 e2fsck  is  used to check a Linux second extended file system (ext2fs).
       E2fsck also supports ext2 filesystems containing a journal,  which  are
       also sometimes known as ext3 filesystems, by first applying the journal
       to the filesystem before  continuing  with  normal  e2fsck  processing.
       After  the  journal  has  been  applied,  a filesystem will normally be
       marked as clean.  Hence, for ext3 filesystems, e2fsck will normally run
       the  journal  and  exit,  unless  its superblock indicates that further
       checking is required.

       device is  the  device  file  where  the  filesystem  is  stored  (e.g.
       /dev/hdc1).

       Note  that  in general it is not safe to run e2fsck on mounted filesys-
       tems.  The only exception is if the -n option is specified, and -c, -l,
       or  -L  options  are not specified.   However, even if it is safe to do
       so, the results printed by e2fsck are not valid if  the  filesystem  is
       mounted.    If e2fsck asks whether or not you should check a filesystem
       which is mounted, the only correct answer is ``no''.  Only experts  who
       really know what they are doing should consider answering this question
       in any other way.
As for the recovery of '/home', you could try 'test-disk'.
 
Old 06-09-2008, 11:00 PM   #5
ubyt3m3
Member
 
Registered: Apr 2008
Distribution: Slackware64 13.37, Solaris 10, RHEL5/6
Posts: 92

Original Poster
Rep: Reputation: 19
Hi onebuck,

I booted up with the slackware installation cd and ran #fsck -f -t ext3 /dev/hdb2.

#fsck -f -t ext3 /dev/hdb2
fsck 1.40.8 (13-Mar-2008)
fsck: fsck.ext4: not found
fsck: Error 2 while executing fsck.ext4 for /dev/hdb2

hmm... it's recognizing the filesystem as ext4 while the /etc/fstab says ext3. Is this because /dev/hdb2 is about 150GB in size?

I'm more interested in fixing/recovering this un-mountable filesystem than inn recovering the data in it. I just don't understand why the system keeps telling me the filesystem is busy while it is unmounted and no services should be accessing it. Or is there any way to find out?

I can just format/recreate the partition and get going but I really would like to know how to fix this type of problem.

Any suggestion is welcome.

Thanks in advance,
gibb
 
Old 06-09-2008, 11:10 PM   #6
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,685
Blog Entries: 27

Rep: Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028
Hi,

Once you boot the install cd/dvd. Do the 'e2fsck -b 8192 /dev/your_device'. What happens?
 
Old 06-10-2008, 12:18 AM   #7
ubyt3m3
Member
 
Registered: Apr 2008
Distribution: Slackware64 13.37, Solaris 10, RHEL5/6
Posts: 92

Original Poster
Rep: Reputation: 19
Hi,

I executed the command after booting up with the installation cd and got the same result:

e2fsck 1.40.8 (13-Mar-2008)
e2fsck: Device or resource busy while trying to open /dev/hdb2
Filesystem mounted or opened exclusively by another program?

hmm... why???

thanks in advance,
gibb
 
Old 06-10-2008, 12:40 AM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,424

Rep: Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017
From the CD, what do these produce ???
Code:
fdisk -l
file -sL /dev/hdb2
(might need root)
 
Old 06-10-2008, 02:31 AM   #9
ubyt3m3
Member
 
Registered: Apr 2008
Distribution: Slackware64 13.37, Solaris 10, RHEL5/6
Posts: 92

Original Poster
Rep: Reputation: 19
Hi,

Code:
bash-3.1# fdisk -l

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x4b3f4b3e

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1        2491    20008926   83  Linux
/dev/hda2            2492        2741     2008125   82  Linux swap
/dev/hda3            2742        6477    30009420   83  Linux
/dev/hda4            6478        9729    26121690    5  Extended
/dev/hda5            6478        9729    26121658+  83  Linux

Disk /dev/hdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xfc6e07b9

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               1         125     1004031   82  Linux swap
/dev/hdb2             126       19457   155284290   83  Linux
bash-3.1#
I booted up with the cd, mounted /dev/hda1 to /a, and ran the file command, but there was an error about libmagic.so.1 not being found. Am I doing something wrong?

so here is the output from the konsole:

Code:
bash-3.1# file -sL /dev/hdb2
/dev/hdb2: Linux rev 16777473.256 ext3 filesystem data (needs journal recovery) (errors) (large files)
bash-3.1#
Would this help?

Thanks in advance,
gibb
 
Old 06-10-2008, 10:52 PM   #10
ubyt3m3
Member
 
Registered: Apr 2008
Distribution: Slackware64 13.37, Solaris 10, RHEL5/6
Posts: 92

Original Poster
Rep: Reputation: 19
uhmm... after rebooting the system, I lost the partition table for /dev/hdb. fdisk -l tells me "Disk /dev/hdb doesn't contain a valid partiton table." I think this drive is pretty messed up.

I'm going to rebuild this derive and start over. Thank you all for your help!

gibb
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Root file system check and superblock now corrupt rooman Linux - Newbie 4 03-14-2008 02:20 AM
Corrupted ext2 file system theunixwizard Linux - Software 4 02-18-2008 01:12 PM
md0 ext3 superblock file system destroyed! cirogl Linux - Enterprise 0 04-26-2006 11:32 PM
Corrupted superblock lnb Linux - Newbie 3 05-06-2004 05:29 AM
corrupted file system limiter Linux - General 6 10-06-2003 10:06 PM


All times are GMT -5. The time now is 01:06 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration