Solved

CentOs disk repair

Posted on 2013-11-17
10
471 Views
Last Modified: 2013-12-02
My CentOS server was acting odd so I rebooted it.  During the boot it said

contains a file system with errors.  Check forced.  Then is says an error occurred during the file system check.  Dropping to a shell:  Give the root password for maintenance.

After putting in my root password I typed ‘fsck -a’ and hit enter.  A few lines cam up saying ‘Inode XXXXXXX was part of the orphaned in ode list. FIXED..  It seems to be running still.. Do I let it run and eventually it will ask me to reboot?

What do I do next?
0
Comment
Question by:gopher_49
10 Comments
 
LVL 19

Accepted Solution

by:
bevhost earned 500 total points
ID: 39655658
Yes, let it finish running.  It may complete ok, it may find problems that need you to do something.  Depending on the size of the disk / number of files etc it may take a while.
0
 

Author Comment

by:gopher_49
ID: 39655666
It finished and everything seems okay... I went ahead and restored my VM files to a temp drive.. And.. Got a few app level backups ready just in case something bad happens.  I have the VM on an iSCSI volume to the datacenter let me use temporarily.  I'm wondering if their iSCSI taget has issues for I've been running this VM for 2 years and never had an issue until moved it to their iSCSI target.  I'll keep an eye on it and update the ticket tomorrow.
0
 
LVL 61

Expert Comment

by:gheist
ID: 39656396
You can always have log for iscsi volume on better volume if in doubt about iscsi's quality. Then it will be log replay and no lengthy fsck in case network disappears.
0
 
LVL 6

Expert Comment

by:xeroxzerox
ID: 39658430
When ctrl+ D option show enter root password if it's not taking password then insert bootable cd of your os..and go to rescue mode...

OR

You can troubleshoot it in SINGLE USER MODE ...when you login in single user mode then
Go to
#vi /etc/fstab

Go to / line & change 0 0 last number in this line... {it show you like- 1 2 or 2 1 or 2 2 then change it to 0 0}
(change all mounting device )
save the file and restart your system..
0
 

Author Comment

by:gopher_49
ID: 39689083
I don't think it finished last time it ran.. I rebooted thinking it was hanging.  What are the correct steps to run 'fsck -a' and/or the process to detect and repair.  Don't I have to unmount the disk first?  I have a feeling if I reboot the server it will do what it did in the past...  This being to run 'fsck -a'..  But.. How do I manually run it?
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 61

Expert Comment

by:gheist
ID: 39689238
You add boot parameter "single" near the end of kernel line

Usually you get to boot parameter editor by pressing up/dpwn when it tries to boot even if you have timeout 0
Then automatic fsck processes / filesystem and you an manually check the rest...
0
 

Author Comment

by:gopher_49
ID: 39690214
So.. I press up/down during the boot process.  Then...  What's the next step?
0
 

Author Comment

by:gopher_49
ID: 39690417
Please see attached screenshot.  Is this normal?  Do I just wait?
Screen-Shot-2013-12-02-at-11.33..png
0
 

Author Comment

by:gopher_49
ID: 39690471
nevermind.. I ran it with the -y switch and everything is good now.  I just had to wait longer.
0
 

Author Closing Comment

by:gopher_49
ID: 39690777
The -y switch is the one to use.. Just be patient and let it finish.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now