LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   FileSystems errors at boot time (https://www.linuxquestions.org/questions/linux-newbie-8/filesystems-errors-at-boot-time-4175447714/)

Muhammad Hamid Ashraf 01-29-2013 12:02 PM

FileSystems errors at boot time
 
I am using centOS 6.3 and recently installed it. From 2 to 3 days i am facing some filesystem errors at boot time which give the following message:

/dev/sda2 contains a file with errors, check forced
Unattached inode 262524

/dev/sda2: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY
(i-e ., without -a or -p options)

Warning--SELinux is active
Run 'sentenforce1' to reenable


Now i actually don't know whats the problem and what should i do?

jpollard 01-29-2013 12:11 PM

It sounds like the system was just turned off rather than shutdown. Doing that leaves the filesystem in an inconsistent state, which requires an fsck run to repair it. The more applications are active, the more likely that will happen.

TB0ne 01-29-2013 12:11 PM

Quote:

Originally Posted by Muhammad Hamid Ashraf (Post 4880006)
I am using centOS 6.3 and recently installed it. From 2 to 3 days i am facing some filesystem errors at boot time which give the following message:

/dev/sda2 contains a file with errors, check forced
Unattached inode 262524

/dev/sda2: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY
(i-e ., without -a or -p options)

Warning--SELinux is active
Run 'sentenforce1' to reenable
Now i actually don't know whats the problem and what should i do?

Well, did you read the screen?? It tells you what to do:
  • Run setenforce1 as it tells you
  • Run fsck manually on the damaged file system, as it tells you. That is, "fsck /dev/sda2".
And if your system has been down for 3 DAYS now, have you tried to run the commands the system is telling you to run??? Problems like this are usually caused by improper shutdowns.

Muhammad Hamid Ashraf 01-29-2013 12:21 PM

Quote:

Originally Posted by jpollard (Post 4880012)
It sounds like the system was just turned off rather than shutdown. Doing that leaves the filesystem in an inconsistent state, which requires an fsck run to repair it. The more applications are active, the more likely that will happen.

I used the system yesterday and i had shut it down properly. Even today i have tried couple of times by giving proper reboot command after i had performed fsck but it still gives the same message.

Muhammad Hamid Ashraf 01-29-2013 12:23 PM

Quote:

Originally Posted by TB0ne (Post 4880014)
Well, did you read the screen?? It tells you what to do:
  • Run setenforce1 as it tells you
  • Run fsck manually on the damaged file system, as it tells you. That is, "fsck /dev/sda2".
And if your system has been down for 3 DAYS now, have you tried to run the commands the system is telling you to run??? Problems like this are usually caused by improper shutdowns.

Yes! I have tried not only once but more than one time but still receive the same error messages.

TB0ne 01-29-2013 01:29 PM

Quote:

Originally Posted by Muhammad Hamid Ashraf (Post 4880022)
Yes! I have tried not only once but more than one time but still receive the same error messages.

Then either you're not correcting ALL of the errors with fsck, or you have bad hardware. You say you're shutting things down correctly...what commands are you using to reboot and to shutdown??

Note that you have to correct ALL of the file system errors, not just a few. I know it says to run fsck manually, but if you have thousands of errors, you may want to just run "fsck -a /dev/sda2", and let it finish. And if its giving you any errors on other file systems, you have to correct those as well.

Muhammad Hamid Ashraf 01-30-2013 08:39 AM

Quote:

Originally Posted by TB0ne (Post 4880060)
Then either you're not correcting ALL of the errors with fsck, or you have bad hardware. You say you're shutting things down correctly...what commands are you using to reboot and to shutdown??

Note that you have to correct ALL of the file system errors, not just a few. I know it says to run fsck manually, but if you have thousands of errors, you may want to just run "fsck -a /dev/sda2", and let it finish. And if its giving you any errors on other file systems, you have to correct those as well.

I had just used reboot command after the fsck....and yes you were right i didn't corrected all the errors. Its not giving the error...but i know it will give after 2 or 3 boots.

TB0ne 01-30-2013 08:47 AM

Quote:

Originally Posted by Muhammad Hamid Ashraf (Post 4880682)
I had just used reboot command after the fsck....and yes you were right i didn't corrected all the errors. Its not giving the error...but i know it will give after 2 or 3 boots.

How do you know it will?? Has this pattern repeated itself?? Also, if you were in the habit of NOT fixing all the errors and ran your system that way, it's not surprising that you got errors on each boot.

And the "reboot" command is ok..for rebooting. What did you use to SHUT DOWN the system? Unless you shut down correctly, you will get errors. Again, if you shut down correctly and get errors, you probably have a piece of hardware going bad.

Muhammad Hamid Ashraf 01-31-2013 01:39 PM

Quote:

Originally Posted by TB0ne (Post 4880694)
How do you know it will?? Has this pattern repeated itself?? Also, if you were in the habit of NOT fixing all the errors and ran your system that way, it's not surprising that you got errors on each boot.

And the "reboot" command is ok..for rebooting. What did you use to SHUT DOWN the system? Unless you shut down correctly, you will get errors. Again, if you shut down correctly and get errors, you probably have a piece of hardware going bad.

No it is not repeating now...all is going well after running fsck and by fixing all the errors...:) Thank you for response :-)


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