
On Tue, Nov 06, 2012 at 02:05:25PM +1100, Jason White wrote:
Andrew Worsley <amworsley@gmail.com> wrote:
Is there any tool that will unmount a filesystem and fsck say once every 2-3 months to avoid having the massive slow fsck on the reboot every 6-12 months?
I avoid the problem altogether by not using ext2/3/4 as my file system.
yep, avoiding that idiocy is one of the minor benefits of using a different filesystem, like xfs (or btrfs or zfs, although zfs is probably far too resource-hungry for a little media server) however, if you want to stick with ext2 or 3 or 4, you can use tune2fs to tell ext2/3/4 not to do the stupid mount-count and/or interval based fscks. e.g. to disable both: tune2fs -i 0 -c 0 /dev/xxxx where /dev/xxxx is the device node for the filesystem you're tuning. i tend to disable both when i use ext2/3/4 because I reboot so infrequently that they cause a lengthy fsck on every reboot...which is tedious and annoying and really shouldn't be necessary (if it is necessary, then the filesystem is too broken to be worth using)
The Cron job might be your easiest solution.
maybe. depends on what files might be opened on that filesystem at the time the cron job runs. or what processes might try to open a file while the fs is unmounted. also, unless you use tune2fs to set '-c 0', every unmount and mount will increase the mount count...which will also trigger an automatic fsck at boot. craig ps: i converted my mythtv box over to zfs a few months back and it is working well...but it has a 6-core AMD Phenom-II 1090T with 8GB RAM and 4 x 2 TB drives. it doesn't do much else except record, transcode, and play DVB recordings. i mainly converted because i was tired of having myth1, myth2, myth3, and myth4 directories and having to manually shuffle files around if anything went wrong. i've effectively lost the capacity of one of the drives, but raid-z makes it easy to replace a drive if one of them dies, and will make it easier to upgrade to 3 or 4TB drives when they become cheap enough to be worth while (which, with luck, will be before the drives get old enough to need replacing anyway :) -- craig sanders <cas@taz.net.au>