LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 05-29-2010, 12:34 PM   #1
clifford227
Member
 
Registered: Dec 2009
Distribution: Slackware 14
Posts: 282

Rep: Reputation: 64
fscheck needed for ext3 filesystem?


Hello,

fscheck is quite annoying, since it usually occurs when I reboot my system performing administration tasks.

do I actually need fscheck if Im using the ext3 file system? if not how would I extend the period between checks or just turn it off altogether?
 
Old 05-29-2010, 12:38 PM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
the file check period is handled by your bootloader. Please edit your profile to show your distro and location - it helps us to help you.

You can set it to check after a time period or after a set number of boots, or never.
You realise, of course, that you should be performing these checks regularly anyway?
 
Old 05-29-2010, 01:25 PM   #3
clifford227
Member
 
Registered: Dec 2009
Distribution: Slackware 14
Posts: 282

Original Poster
Rep: Reputation: 64
Thanks Simon.

It just always seems to happen when Im in the middle of something and need to reboot. I've got a 250gb harddrive and it takes an age to complete.

I think ,if I remember, fsck runs after every 16 mounts on Slackware, but I never seem to have a problem with corrupt file systems.
 
Old 05-29-2010, 02:22 PM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
... but I never seem to have a problem with corrupt file systems.
Most of us don't, most of the time. I haven't had the scheduled fsck (on ext3) find a fault for years, but I can understand that it's a good idea.

You can tune this fsck behaviour from mountcounts (16 might be a little low if you frequently reboot) to an interval in days, and if you get your timing right, it'll only kick off on (for example) a Sunday, when you do not care as you are too busy making croissants and mixing Bloody Mary's to notice that it boots slowly as it does its fsck.

Now I am moving to ext4, I think it's probably a very good idea, whilst this apparently robust, but still being tested filesystem evolves.

See man tune2fs which AFAIK also applies to ext3 and ext4 filesystems to fine-tune the fsck scheduling.
 
Old 05-29-2010, 05:10 PM   #5
clifford227
Member
 
Registered: Dec 2009
Distribution: Slackware 14
Posts: 282

Original Poster
Rep: Reputation: 64
Tredegar,

Thanks for the tune2fs info, I have now set my max_mount_count to 40

You broadend my view there a little too, I didnt think about fsck's usefulness as regards newer filesystems.
 
Old 05-30-2010, 02:11 AM   #6
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
I ran into this on Ubuntu just today - seems the disk-check is set for time rather than number of mounts so I got a forced check on this machines second reboot. (I boast about gnu/linux uptimes ... but I think we reboot more often these days no?)

I see the check as a reminder - I can get out of it with a keypress but it tells me its time to check things are OK. I have old laptops, and some of their drives have started to fail. Its like keeping a fire extinguisher in your kitchen - you'll almost never need it ... but the day you need one, you really need one.
 
Old 05-30-2010, 07:14 AM   #7
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
Keep your / partition relatively small and it'll check faster. 40GB for mine, but that is because I keep sources in /home/ and audacity needs a lot of /tmp space when doing edits on large files. fsck-ing can be a long time commitment if your root takes all of a 1TB HDD.

ext3 is ext2 with a journal. You shouldn't need to check it as the journal handles most boot / reboot issues. Regardless most ext2 tools work as is with ext3. tune2fs, e2fsck, even e2defrag. You can also disable checking in your /etc/fstab. Those # # at the tail end of entries... Not recommended, but an option. Worst case scenario, you might need to regen a journal, or switch to ext2 to cope with an issue. Fortunately the filesystem is ext2 from a certain POV. Just a few options, probably best to keep the defaults. Less risk. Other ways to deal with it, if you setup a routine to beat it to the draw and manually fsck it every Sunday. That should reset it's timer / counter. Having a second distro installed for that purpose helps simplify the process.
 
Old 05-30-2010, 09:45 AM   #8
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
These forced fscks are the reason I've always avoided ext2/3/4. I used to use reiserfs (and still do for /boot) but now use btrfs (everywhere else).
 
Old 05-30-2010, 12:02 PM   #9
clifford227
Member
 
Registered: Dec 2009
Distribution: Slackware 14
Posts: 282

Original Poster
Rep: Reputation: 64
Quote:
Originally Posted by Shadow_7 View Post
Keep your / partition relatively small and it'll check faster. 40GB for mine, but that is because I keep sources in /home/ and audacity needs a lot of /tmp space when doing edits on large files. fsck-ing can be a long time commitment if your root takes all of a 1TB HDD.
My root partition is 10gb, with a full Slackware 12.2 install and user packages theres just under 2gb of free space left.

Actually, when I set fsck to check every 40 mounts, I'd only set that for hda3, which is my home partition (200gb), I totally forgot about root! but I have now set fsck for / to 30, and /home to 45.


Thanks for your help guys

Last edited by clifford227; 05-30-2010 at 12:03 PM.
 
Old 05-30-2010, 12:49 PM   #10
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
In theory you should set the number of times to a prime number, so all your partitions are less likely to get fsck'd at the same time.

I have one on reiserfs. When it crashes and needs to be checked, it's worse. I have to boot a completely different distro to check it. So I have to reboot twice and do the check manually. Plus all of the horror stories of certain upgrades completely wiping reiserfs partitions. I'll stick with ext3 for now. It only took me half a decade to switch to it.
 
  


Reply



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
ext3 filesystem limits poblano Red Hat 14 02-12-2008 04:41 PM
Confusing USB Filesystem Problem (Can't Wipe Ext3 Filesystem) dkaplowitz Linux - Hardware 3 04-14-2007 06:30 PM
ext3 filesystem recovery prozac Linux - General 9 02-18-2007 12:56 AM
What is the best filesystem? (mainly xfs vs ext3) calimer Linux - Software 16 03-02-2005 12:07 AM
New kernel and ext3 filesystem Thymox Linux - Software 3 12-03-2001 08:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:48 AM.

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
Open Source Consulting | Domain Registration