• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 6264
  • Last Modified:

How do I resolve this 'superblock could not be read' problem?

On my Dell PowerEdge 2850 running Red Hat Enterprise Linux 4  2.6.9-55.0.12
This Error message was on the console yesterday morning.
-------------------------------------------------------------------------------------------------------------------
Setting hostname Servername.domain            [ok]
your system appears to have shut down uncleanly
press y within 5 seconds to force filesystem integrity check &
checking root filesystem
WARNING: couldnt open /etc/fstab: No such file or directory
fsck.ext2 : Is a directory /:
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>

while trying to open /                        [FAILED]

*** An error occurred during the file system check.
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.
*** WARNING- SELinux is active
*** Disabling security enforcement for system recovery.
*** Run setenforce 1 to reenable.

Give root password for maintenance.
(or type Control-D to continue): <root password> <Enter>

Brought back:  
bash: id: Command not found
bash: id: Command not found
bash: id: Command not found
bash: [ : too many arguments
bash: dircolors: command not found
bash: id: Command not found
bash: [ : =: unary operator expected
(Repair filesystem) 1 #
-------------------------------------------------------------------------------------------------------------------
My Sunday Logwatch report contains:
--------------------- Kernel Begin ------------------------
WARNING:  Kernel Errors Present
   EXT3-fs error (device sda8): e...:  1 Time(s)
 ---------------------- Kernel End -------------------------

Re booted from install disk.
Entered: linux rescue
Entered: mke2fs n /dev/sda8
Brought back:   Superblock backupsstored on blocks:
                         32768, 98304, 163840, 229376

Entered: fsck b 32768
Brought back:  WARNING: Couldnt open /etc/fstab: no such file or directory
---------------------------------------------------------------------------------------------
Would like to recover this server without reinstalling.  It contains two development Oracle databases.
Have contacted Dell support but have gotten nowhere at this point.
Please help.

0
slcoit
Asked:
slcoit
1 Solution
 
torimarCommented:
It's not quite clear from your description to what extent you are still able to access that system. But if it gives you a command line and root privileges, you may want to try and run Testdisk: http://www.cgsecurity.org/wiki/TestDisk

In most systems it is installed by default. If you find your system lacking it, a simple "yum install testdisk" should do the trick.

Be sure to read the documentation under the link I gave above, see the "Using TestDisk" section there.
0
 
eagerCommented:
It isn't clear from the messages which partition encountered the failure.  It appears to be the root file system.  

When you got the "Repair system" prompt, or booted from a rescue disk, you wanted to run "fsck /dev/<partition>" to repair the file system.  (This is what the message at the top of your post suggests that you to do.)  

Most likely, once you ran "mke2fs /dev/sda8" you lost whatever data was on the partition.  mke2fs reformats the partition.  If that was your root partition, then you will need to re-install. If your oracle db was on /dev/sda8, you will need to restore from a backup.  Depending on how you organized your system, your data may be on other partitions.  You should back these up ASAP, before you attempt other recovery.  
0
 
lak444Commented:
have you tried to boot using the superblock mentioned in the error message?

"
the superblock is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck b 8193 <device>
"

Try running command,
e2fsck -b 8193  /dev/sda8
0
 
slcoitAuthor Commented:
Thanks for the suggestions.  I did attempt all the above but was unable to get around the problem.  With guidance from Dell support, I ended up doing a rebuild of my raid 5 device.  That wiped out all my data.  I was then unable to boot successfully.  I then did a rebuild of my raid 1 device which contained the O/S and misc other files.  So at this point I had a fresh clean system.  I then reinstalled the O/S.  Recovered data from backups and then successfully rebooted.   The system has now been successfully running for over a week.  I never found out exactly what the problem was but all is well at this point.
Thanks again.
0
 
lak444Commented:
There can be two reason

reason 1:
You below message mentioned - system was not properly shutdown.

"your system appears to have shut down uncleanly
press y within 5 seconds to force filesystem integrity check &"

So fdisk is initiated by kernel.

reason 2:
Normally fdisk will be ran at specific after number mount or boots.

So you time is arrived to run auto fdisk.

fdisk found problem with superblock and asked you to check with next superblock in the disk.


if you are using ext2.then iI would suggest you to use ext3 file system,since it uses journaling,it will avoid crashes like this .


 
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now