fsck on backup drive?
I have a partition on a second hard drive that I use for backup. I backup through rsync and cron.
I listed info through tune2fs /dev/sdb1 and got this:
Filesystem created: Sat Sep 13 09:12:56 2008
Last mount time: Mon May 9 10:03:21 2011
Last write time: Mon May 9 10:03:21 2011
Mount count: 390
Maximum mount count: 23
Last checked: Thu Apr 8 11:28:03 2010
Check interval: 15552000 (6 months)
Next check after: Tue Oct 5 11:28:03 2010
This drive was backed up every night except the last month, but the max count is 23 and the last check shows Thu Apr 8 11:28:03 2010. Can someone explain this? I want this partition to be checked at regular intervals when it gets mounted for backup.
How are you mounting the partition?
I am not mounting it on boot up, but through a script that I run through Crontab; it mounts the partition when it backs up to it then umounts.
Originally Posted by Jonathan183
Checking man tune2fs - 390 times filesystem has been mounted. so far . Since its greater value than the max-mount-counts parameter set by the -c option (23) , will check the filesystem at the next reboot.
Originally Posted by JoeS
Since its a secondary disk - i don't think you will be rebooting everyday.Better idea is to use " interval-between-checks " which performs fsck based on time interval rather than using mount counts and reboot.
If I'm not wrong -
should run fsck everyday.
tune2fs -i 1d /dev/sdb1
I'd be tempted to add an entry in /etc/fstab to mount read only and check the filesystem, then modify the script to remount rw when you take a backup and let it unmount after the backup is taken.
Other than that I'd either fsck the partition before mounting or start looking at the boot process and implement the equivalent of mount which is done during boot ... example
... someone else may have a more elegant solution for you :cool: