LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   not clean volume according to tune2fs, what's wrong though? (https://www.linuxquestions.org/questions/linux-newbie-8/not-clean-volume-according-to-tune2fs-what%27s-wrong-though-816208/)

anon091 06-24-2010 05:11 PM

not clean volume according to tune2fs, what's wrong though?
 
I did a tune2fs -l on some volumes of mine, and a few say "not clean" as the filesystem state. But how do I tell what's causing it to be not clean, or how severe it is, so i know how soon i need to schedule downtime to run a e2fsck on that volume?

syg00 06-24-2010 06:07 PM

I don't know that you can tell. Try dumpe2fs - it may tell you more. Redirect the output to a file - it'll be large, and you might need the info later ...
If it were me, I'd be scheduling that downtime.

alunduil 06-24-2010 06:17 PM

If the volume is mounted it will always have that set. That gets set when the file system is mounted so that if the system shuts down and the volume is not unmounted properly (which clears that flag) upon next boot it will know it has to check it.

Regards,

Alunduil

syg00 06-24-2010 06:39 PM

That's what a lot of doco on the net says, but isn't true (anymore). All my (mounted) ext[34] filesystems currently report "clean".
And the OP appears to have some that are indeed "clean".

onebuck 06-25-2010 07:50 AM

Hi,

I suggest that the OP take the system down then boot with a maintenance LiveCD or Install CD in single user mode. Then perform the necessary maintenance on the filesystem(s) in question.
:hattip:

anon091 06-25-2010 10:07 AM

I do have some on that same server that say clean. I was just wondering if there was a way to tell, kinda like how when you run chkdsk on a windows system, it will at least give you some inclination at to what the problems are.

onebuck 06-25-2010 11:52 AM

Hi,

Quote:

excerpt from 'man fsck';

fsck - check and repair a Linux file system SYNOPSIS

fsck [ -sAVRTNP ] [ -C fd ] [ -t fstype ] [filesys ... ] [--] [ fs-specific-options ] DESCRIPTION

fsck is used to check and optionally repair one or more Linux file systems. filesys can be a device name (e.g. /dev/hdc1, /dev/sdb2), a mount point (e.g. /, /usr, /home), or an ext2 label or UUID specifier (e.g. UUID=8868abf6-88c5-4a83-98b8-bfc24057f7bd or LABEL=root). Normally, the fsck program will try to run filesystems on different physical disk drives in parallel to reduce total amount time to check all of the filesystems. If no filesystems are specified on the command line, and the -A option is not specified, fsck will default to checking filesystems in /etc/fstab serial. This is equivalent to the -As options.
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
The exit code returned when multiple file systems are checked is the bit-wise OR of the exit codes for each file system that is checked.
In actuality, fsck is simply a front-end for the various file system checkers (fsck.fstype) available under Linux. The file system-specific checker is searched for in /sbin first, then in /etc/fs and /etc, and finally in the directories listed in the PATH environment variable. Please see the file system-specific checker manual pages for further details.
I do suggest that the OP look at some of the following links to get useful information;

Linux Documentation Project
Rute Tutorial & Exposition
Linux Command Guide
Utimate Linux Newbie Guide
LinuxSelfHelp
Getting Started with Linux
Bash Reference Manual
Advanced Bash-Scripting Guide
Linux Home Networking

:hattip:
The above links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!

anon091 06-25-2010 01:40 PM

Hey Onebuck. I have read some of those links before when you've posted them in other threads. But I can't run fsck when a volume is mounted because it would do bad things I thought I read somewhere, so i'm not entirely sure what your last post was trying to get at. I understand different exit codes mean different things. I dont see anything saying e2fsck error code in the tune2fs output either.

syg00 06-25-2010 06:30 PM

Perhaps that should be rephrased as:
"I shouldn't run fsck when a volume is mounted because it might do bad things"
If you can get to single user mode you can (generally) safely run the checks - mounted or otherwise. But why bother - reboot and force the checks; probably quicker.

And you're correct - the return codes for the tool to (hopefully) fix things don't describe the actual problem that was being fixed. In this case anyway.

onebuck 06-26-2010 07:25 AM

Hi,

Quote:

Originally Posted by rjo98 (Post 4015034)
Hey Onebuck. I have read some of those links before when you've posted them in other threads. But I can't run fsck when a volume is mounted because it would do bad things I thought I read somewhere, so i'm not entirely sure what your last post was trying to get at. I understand different exit codes mean different things. I dont see anything saying e2fsck error code in the tune2fs output either.

You asked about errors.
I do suggest that when a check of the filesystem is required then reboot with a LiveCD or InstallCD to insure single user mode. That way there will be no conflicts or potential problems when attempting repairs on the filesystem. Perform the repairs on a unmounted filesystem.

:hattip:

anon091 06-28-2010 08:01 AM

Thanks for confirming Syg. I was trying to understand what was wrong, I know I need to take it offline and check it. Thanks for the help you two.


All times are GMT -5. The time now is 09:27 AM.