On Oct 18, 2001  03:33 +0400, Hans Reiser wrote:
> I have had a change of heart in this regard.  I now feel that it is just
> fine to run reiserfsck and we should have it do nothing except print
> sponsorship messages when passed the usual flags that boot scripts not
> designed for reiserfs use.  I think it is quite amusing to do this.
> 
> Thanks Andreas for helping us to find this solution.

Well... It wasn't my goal to do ONLY that.  Rather, I think this is an
important first step in making reiserfs more "hands off" in terms of
maintenance.  Even if FOR NOW it doesn't do anything at boot time, it
SHOULD at least do some checking of the superblock (e.g. status field and
journal header) to make sure they are sane.  This will take all of about
one millisecond and can let users know they have a problem right away.

> > You should run reiserfsck --check regularly manually. I guess once per 2
> > weeks is reasonable for the beginning. Note that you can run it on
> 
> I think most users are too busy for this.  I run reiserfsck only when
> something breaks, which has so far been only when I LVM'd my root partition
> by accident while upgrading the OS.

What would be nice (e.g. feature idea for the future) is to have different
"levels" of reiserfsck checks on the filesystem.  The very basic one
(always run) would be to recover the journal and verify the superblock has
no error marked there.  Next might be a simple traversal of the directories,
or checking bitmaps (don't know the specifics of reiserfs enough to know
what is "fast").  Basically, say every 2^level*period you run a more
"expensive/extensive" check for consistency.

Maybe the checks only run for a few seconds each, but that may be enough to
at least give you some confidence about the state of the fs.  Maybe on some
checks you only check 1/N entries in each directory, or you keep some state
and "resume" the check at a later run.

As we have seen in the past, and we will see in the future, there are always
bad kernels, or bad hardware, or whatever, so I don't think people mind 1
or 2 seconds for each fs at boot (not a full fsck).

> On the other hand, if you have ever used one of the highly unstable kernels
> (e.g. 2.4.3), or engaged in other unsafe behavior, running reiserfsck --check
> is probably something I would do.
> 
> Frankly, with respect to fsck I think laziness is the way to go.  If you have
> an important client with a mission critical server that isn't used on
> weekends, I can understand running reiserfsck --check while it is mounted
> read only, it constitutes doing the little bit extra.  

What is really useful is to do an LVM snapshot and run a read-only fsck on the
snapshot.  This at least lets you know if there is a problem on a server that
rarely gets shut down.  With something like this in cron, it could email the
admin to schedule an outage to fix up the problem.

Cheers, Andreas
--
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert

Reply via email to