Skip to contentSkip to conversation

Forcing fs checks on ext3

DISCUSSION Marco Calistri 2 participants 2 messages May 12, 2002

lore
Share & tools
lore
#0 lore raw

Hello I'm using RHL-7.2 with ext3 journalled file system,it works fine, however I wonder issue an automated fs check let'say every 20 system's boots, is there a file to set to accomplish this?

TIA

#1 lore raw
Quoted 3 lines

Hello I'm using RHL-7.2 with ext3 journalled file system,it works fine, however I wonder issue an automated fs check let'say every 20 system's boots, is there a file to set to accomplish this?

ext{2,3} superblocks contain a field indicating how many times they can be safely mounted without fscking, and a maximum interval between fscks. To get at this data, go

tune2fs -l /dev/hda1

replacing hda1 with the device which stores the filesystem. To set the maximal mount count, go

tune2fs -c 20 /dev/hda1

whilst the maximum time between fscks is set with

tune2fs -i <time> /dev/hda1

Time can be specified in days as 30d, weeks as 4w, or months as 1m. man tune2fs for more details. Also, you shouldn't really do this while the filesystem's in use. I don't normally bother unmounting it, but strictly speaking you probably should.

Steven Smith,
[email protected].