On Thu, Mar 25, 2010 at 12:55:50AM -0700, Elliott Mitchell wrote: > > Which is why I wasn't writing about the mount count. I was writing about > the check interval/check time. With systems that reboot less than once a > month, the mount count will never be reached. Instead it will be the > check interval and worse yet, with infrequent reboots, *all* of the check > intervals will expire at once (even if they start spaced out, they will > tend to merge together).
Well, fsck (which is the program which runs e2fsck for each partition) is no longer something I maintain (it's been moved to util-linux-ng, which is maintainer by Karel Zak). Granted, fsck would need some way of telling e2fsck not to do time- or mount-based check if some other check has taken a long time already, but at least part of the functionality would have to be done in fsck --- and that's not no longer my problem. :-) Quite frankly, I can't get terribly excited about this problem, since if you have file systems on separate disk spindles, the file system checks are done in parallal anyway. And if you are using LVM, the right answer is to use an snapshots, and then schedule the checks using cron during periods of low usage, maybe once a month. - Ted #!/bin/sh # # e2croncheck -- run e2fsck automatically out of /etc/cron.weekly # # This script is intended to be run by the system administrator # periodically from the command line, or to be run once a week # or so by the cron daemon to check a mounted filesystem (normally # the root filesystem, but it could be used to check other filesystems # that are always mounted when the system is booted). # # Make sure you customize "VG" so it is your LVM volume group name, # "VOLUME" so it is the name of the filesystem's logical volume, # and "EMAIL" to be your e-mail address # # Written by Theodore Ts'o, Copyright 2007, 2008, 2009. # # This file may be redistributed under the terms of the # GNU Public License, version 2. # VG=ssd VOLUME=root SNAPSIZE=100m email=sysad...@example.com TMPFILE=`mktemp -t e2fsck.log.XXXXXXXXXX` OPTS="-Fttv -C0" #OPTS="-Fttv -E fragcheck" set -e START="$(date +'%Y%m%d%H%M%S')" lvcreate -s -L ${SNAPSIZE} -n "${VOLUME}-snap" "${VG}/${VOLUME}" if nice logsave -as $TMPFILE e2fsck -p $OPTS "/dev/${VG}/${VOLUME}-snap" && \ nice logsave -as $TMPFILE e2fsck -fy $OPTS "/dev/${VG}/${VOLUME}-snap" ; then echo 'Background scrubbing succeeded!' tune2fs -C 0 -T "${START}" "/dev/${VG}/${VOLUME}" else echo 'Background scrubbing failed! Reboot to fsck soon!' tune2fs -C 16000 -T "19000101" "/dev/${VG}/${VOLUME}" if test -n "$RPT-EMAIL"; then mail -s "E2fsck of /dev/${VG}/${VOLUME} failed!" $EMAIL < $TMPFILE fi fi lvremove -f "${VG}/${VOLUME}-snap" rm $TMPFILE -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org