This week's book giveaway is in the Testing forum.
We're giving away four copies of Practical Unit Testing with TestNG and Mockito and have Tomek Kaczanowski on-line!
See this thread for details.
The moose likes Linux / UNIX and the fly likes File system error Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Reply Bookmark "File system error" Watch "File system error" New topic
Author

File system error

Renu, Vairagade
Greenhorn

Joined: Feb 02, 2001
Posts: 21
Help needed urgently!
Hi,
I use Red Hat 6.2 Linux. Recently, after sudden shutdown due to an unexpected power failure my machine failed to start Linux properly. The boot process halts after showing the following error message:
Setting hostname dexter
Checking root file system
/dev/hda3 contains a file system with errors, check forced.
/dev/hda3 :
Directory inode 35302, block 0, offset 0 : directory currupted.
/dev/hda3 : UNEXPECTED INCONSISTANCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
[FAILED]
***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 for normal startup) :

Here I logged in giving root password and then ran fsck. But it didn't correct the file system error. And Control-D doesn't give normal startup. What should I do to solve this problem? Please help.


V Renu
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6913
I've had this. It usually means that something has corrupted more than just the file system, but has bounced the heads on the disk surface and corrupted one or more actual disk blocks.
The long term solution is to get a power-conditioner of some sort; I bought an APS battery-backed power unit after a power-outage bounced my servers, and it has saved my hide at least once since then.
The immediate action is to run a check of the disk using the little-known "badblocks" command and hope that nothing vital was lost. For a bit more detail, search the web, but a starting example is here.
Good luck!


A Convergent Visionary ~ Frank's Punchbarrel Blog ~ LinkedIn profile
Guy Allard
Ranch Hand

Joined: Nov 24, 2000
Posts: 776
Hi - Several possibilities with a power failure.
1) Like Frank said the heads came down hard, and the data on the partition my not be recoverable under any circumstances. The disk is trashed.
2) The heads came down pretty hard, but not hard enough to damage the media and/or the heads - you can recalim the space my formatting the partition, but you do not get your files back.
3) The heads came down really easy - when you run 'e2fsck' it should ask you if you want to repair. Did it? Did you say 'yes'? If so, what happened then? If this process works well, you could get most of the data in the partition back, with only the loss of 1 or 2 files.
4) There may be other solutions, with less standard command line utilities.
HTH, Guy
[ March 05, 2002: Message edited by: Guy Allard ]
Renu, Vairagade
Greenhorn

Joined: Feb 02, 2001
Posts: 21
Feedback : Error fixed
Hi Frank & Guy,
Thanks for helping me out. Special thanks to Guy for the ‘detailed explanation’ on impact of ‘heads coming down’ 8-).
For the record, e2fsck did the job (heads came down really easy 8-) ). I logged in as root and gave the following command:
$e2fsck /dev/hda3
Then it asked many questions about repairing and fixing inodes, and I kept answering them with ‘yes’. In the end I got this message:
/dev/hda3: ***FILE SYSTEM WAS MODIFIED***
/dev/hda3: 59266/235200 files (0.2% non-contiguous), 229723/469893 blocks.
Then I rebooted the system, and it started without any errors.
Thanks again to both of u.
 
 
subject: File system error
 
Threads others viewed
File system error
Hard disk mystery
Problem booting Linux 7 plzzzzzzzzz help
FileSystem error
Newbee Question On Linux
IntelliJ Java IDE