running fsck out of a script; drive never shows being checked
I'm wondering if I'm missing the point of something somehow.
I have a script that fscks hdb, then mounts it and makes a backup of hda. I
run this as a nightly cron job, and it mails me a report every morning.
The associated bit of the script is:
echo running fsck on /dev/hdb partitions...
echo start time: `date`
if ! (fsck -n /dev/hdb2); then
echo "ERROR! Problem encountered running fsck on /dev/hdb2!"
echo "Abort, abort, abort!!!"
echo end time: `date`
The most recent report (and the 41 before it) claim the drive has never been
running fsck on /dev/hdb partitions...
start time: Tue Jun 8 05:00:01 EDT 2004
fsck 1.35 (28-Feb-2004)
e2fsck 1.35 (28-Feb-2004)
/dev/hdb2 has been mounted 42 times without being checked, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/hdb2: 323138/4758432 files (0.4% non-contiguous), 5654926/9516504 blocks
end time: Tue Jun 8 05:03:58 EDT 2004
(Yes, it says "partitions" even though it's only doing hdb2... hdb used to
have four partitions... I didn't bother to adjust the script.)
So I'm thinking it's some side effect of running fsck inside that if statement
I'd like the technical explanation for what and why. It doesn't seem to
actually have any adverse effect, but it's mildly annoying.
Michael McIntyre ---- Silvan <email@example.com>
Linux fanatic, and certified Geek; registered Linux user #243621