Re: How often should I fsck my ext3 partition?



On Wed, 05 Apr 2006, Mike McCarty wrote:

Ali Milis wrote:
Johannes Wiedersich wrote:

The debian default of my sarge installations is that the ext3-FS are
fsck'ed about every 30 mounts or 180 days (whatever comes first).

This is just my Euro 0.01 opinion:

180 days is reasonable for new disks.
Perhaps you would like to lower it when your disk goes old.
[ . . . ]

A related question is how to do it without taking the machine down
uncleanly or fiddling an arcane file somewhere. I've thought about
perhaps doing...

$ mount -o remount -o ro /dev/hda5
$ fsck /dev/hda5
$ mount -o remount -o rw /dev/hda5

(I have /dev/hda5 mounted as / on my machine.) Is there any
exposure in this? I'm pretty leery of running fsck on a
r/w file system.

Running fsck on a r/w file system is a Bad Plan(TM). (I don't think fsck
will even do it without a force flag.)

One convenient option is to use the clock-time based check interval for
ext2/3. For example,
tune2fs -i 60d -c 0
will force a fsck on the first reboot every 60 days (and disable the 'every
n mount-counts' interval).

Regarding Johannes' question about filesystem errors getting rsynced to
backups. Yes, that is very possible (had it happen to me once). You can
greatly reduce the likelihood by using rsync's '--checksum' option, at the
cost of a (much) longer backup time...

-- Brad


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • SV: SV: Vinum, and poweroutage... HELP!
    ... Do you know why fsck are not able to scan the disk? ... And should a -b 32 fix the prob? ... >Network manager, NM Net ApS ... >>To unsubscribe, send any mail to ...
    (freebsd-questions)
  • Re: sshfs installation error
    ... home machine with dynamic IP that's not 24/7 on the net. ... Another possible cause for disappearing files is file system corruption, ... /lost+found is empty and fsck says okay. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: Downgrade FreeBSD 5.1 or 5.2 -> 4.9
    ... It helps to use UFS1 file systems. ... Probably have UFS issues, but I don't ... the way -CURRENT's fsck left things. ... I do not "unsubscribe" from email "services" to which I have not explicitly ...
    (freebsd-current)
  • Re: "recovering journal" at every system boot
    ... fsck 1.40-WIP ... sda1 filesystem was made by standard installer ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ... Trouble? ...
    (Debian-User)
  • Re: Problems on start of my system
    ... fstab: /etc/fstab:0: No such file or directory ... UNEXPECTED ICONSISTENCY; RUN fsck MANUALLY ... >> 0.4% fragmentation) ... To unsubscribe, ...
    (freebsd-questions)