forced fsck (again?)

Matt Bernstein mb--ext3 at dcs.qmul.ac.uk
Thu Jan 31 16:27:48 UTC 2008


On Jan 22 Theodore Tso wrote:

> #!/bin/sh
> #
> # e2croncheck
>
> VG=closure
> VOLUME=root
> SNAPSIZE=100m
> EMAIL=tytso at mit.edu

[snip]

> Well, this isn't a complete solution, because a lot of people don't
> use LVM

Please forgive my late noticing of this. The idea is good, and will work 
fine in 99% of cases.

I'd love to snapshot (for rsync as well as fsck) my large filesystems, 
which have external journals which in turn are in a different VG.

I suspect that if I were to naïvely run your script, really interesting 
things would be likely to happen ;)

So.. I'd love to atomically make two snapshots, but I guess that is Hard 
(or would at least require a very coarse lock). I suppose in the meantime 
I could "tune2fs -O ^has_journal" the snapshot volume, but I'm too scared 
even to do that.

So.. maybe I could request that you either include a Big Fat Disclaimer, 
or code based on the following (untested, you can probably do better)?

if (tune2fs -l /dev/${VG}/${VOLUME}|egrep -q "Journal device")
then
 	echo "Cowardly refusing to play with external journals."
 	echo "There be dragons!"
 	exit 1
fi


More information about the Ext3-users mailing list