LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-24-2010, 06:11 PM   #1
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Rep: Reputation: 46
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?
 
Old 06-24-2010, 07:07 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,847

Rep: Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823
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.
 
Old 06-24-2010, 07:17 PM   #3
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
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
 
Old 06-24-2010, 07:39 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,847

Rep: Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823
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".
 
Old 06-25-2010, 08:50 AM   #5
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,549
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
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.
 
Old 06-25-2010, 11:07 AM   #6
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
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.
 
Old 06-25-2010, 12:52 PM   #7
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,549
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
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


The above links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!
 
Old 06-25-2010, 02:40 PM   #8
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
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.
 
Old 06-25-2010, 07:30 PM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,847

Rep: Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823
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.
 
Old 06-26-2010, 08:25 AM   #10
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,549
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Hi,

Quote:
Originally Posted by rjo98 View Post
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.

 
Old 06-28-2010, 09:01 AM   #11
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Safe to tune2fs a mounted volume to prevent disk checks at reboot? rjo98 Linux - Newbie 6 02-06-2012 05:37 PM
Volume keys adjust wrong audio channel? Sakrag Linux - General 1 05-31-2008 02:32 PM
tune2fs -c 4 -C 3 calutateo Linux - General 2 07-06-2005 04:13 PM
tune2fs?? blackzone Linux - Newbie 1 01-07-2005 03:24 AM
LVM Problem - vgimport - wrong number of physical volumes to import volume group Anything1 Linux - Software 0 09-06-2003 08:18 PM


All times are GMT -5. The time now is 05:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration