#Un*x <> Amigados Query
24-Feb-91 09:33:20
Sb: #7850-#Un*x <> Amigados Query
Fm: Marlene Zenker/SYSOP 76701,250
To: Edwin Wiles 72017,1136
Are you running BSD, or SYSV? If you're running BSD, you've already got
it. It's the "-p" option. (You have to set up a few more thing than
that….you'll have to check the man pages). In SYSV (at least the
versions before V.4…I'm not sure about V.$), it doesn't exist. I added
that to our (the company I work for) implementation of fsck. If you do
have SYSV, check for a program called dfsck (I think that's what it's
called). The dfsck command let's you run two fsck's in parallel. The
implementation I put together doesn't have that restriction. I think we
run four or five at a time.
There are a couple things to watch out for: 1) Don't run so many in
parallel that you start swapping. The whole point of this is to get
through the fsck phase as fast as possible, and if you start swapping it
defeats the purpose. 2) Only run 1 fsck per disk at one time. If you try
and run fsck on two partitions that are on the same disk, you'll end up
taking extra time because of extra disk head movement. Since you have two
disks, you'd be restricted to two fsck's at a time (Assuming you've got
enough memory).
There's a bit more involved (handling REALLY large partions that use
scratch files instead of a lot of memory, how to optimally arrange the
order of disk checking, collating the output from multiple processes), but
that's the basic drift. If you've got source for fsck (and you're daring)
you can do what I did and add it to the fsck program itself, but I'd say
that armed with a program that can check the dirty bit on a partition and a
well written shell script, you would be able to roll your own parallel
fsck.
Steve