Troubleshooting – File system Errors

This post will help you resolve the Linux file system issue that causing below errors.

Devices not found when trying to boot the system

Checking filesystems
fsck.ext3: No such file or directory while trying to open /dev/devicename [FAILED]

Superblock of file-system not found

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>

Attempt to boot the system and it failed with the error:

*** An error occurred during the file system check
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.
Give root password for maintenance (or type Control-D to continue):

Not all filesystems can be mounted by mount -a command

# mount -a  

mount: wrong fs type, bad option, bad superblock on /dev/devicename
The above error generally happens with any of following reasons :
At boot time the system runs a file-system check against all device in fstab with an fs_passno value higher than 0.
If the fsck exit code returns a value greater than 1 the server will drop to a maintenance shell so repairs can be made.

The exit code returned by fsck is the sum of the following conditions:
0    - No errors
1    - File system errors corrected
2    - System should be rebooted
4    - File system errors left uncorrected
8    - Operational error
16   - Usage or syntax error
32   - Fsck canceled by user request
128  - Shared library error
Steps to resolve the above file system Issue:

1. Identify which device is having problems from the error message on the screen
Checking filesystems
fsck.ext3: No such file or directory while trying to open /dev/devicename         [FAILED]
2. Drop to the maintenance shell by entering your root password
3. Remount the root filesystem read/write
# mount -o remount,rw /
4. Check to verify the device exists on the system
# ls -l /dev/devicename
5. Open the /etc/fstab file for editing
# vi /etc/fstab
6. Check for any typos in the file and correct them
7. If the device no longer exists remove it from the fstab or comment out the entry by adding # to the beginning of the line
# /dev/devicename    /home    ext3    defaults    1 2
8. Save the fstab file
9. If the initial error reports corruption or missing superblock, verify it is unmounted and run a filesystem check.
# umount /dev/ devicename
# fsck /dev/devicename
10. If all else fails, modify the /etc/fstab file and adjust the fs_passno value (sixth field) to 0. This will bypass the check
# /dev/devicename    /home    ext3    defaults    1 0
11. Reboot the system
# reboot


No comments:

Post a Comment

Thank You:)