[OpenAFS] generating a listing of Mount points

Phil.Moore@morganstanley.com Phil.Moore@morganstanley.com
Mon, 11 Mar 2002 17:43:24 -0500

>>>>> "Derek" == Derek Atkins <warlord@MIT.EDU> writes:

Derek> You can always do something like:
Derek> find /afs/<your cell> -type d -print | xargs fs lsm | grep -v "not a mount point"

You have GOT to be kidding...

For any AFS cell of any reasonable size, you're going to run into the
length limit for command line arguments in most shells on most systems
when xargs tries to pass a bajillion directories to fs.

That simply does NOT scale.

Now, this happens to be on my list of management tools needed for AFS,
namely a mount point database.  The missing peice isn't the code to
scan the salvager output (that's very simple), but some changes needed
to the salvager itself.

Since a full salvage requires taking the fileserver down, we need to
be able to run the salvager in a passive query mode, where volumes are
opened read-only, scanned for mount points (or perhaps other
aberrations), and the resulted reported in the salvager logs.  Then,
it would be straight forward to write code that audits the mount
points in an entire AFS cell by salvaging (passively) each fileserver,
collecting the logs, and analyzing them centrally.

The design I have would do this incrementally, and only scan
individual volumes, which LastUpdate timestamp has changed, making it
cheap to keep this uptodate.

You can then analyze this database for mount point loops, fiund
unmounted volume heirarchies, multiply mounted heirarchies, and all
kinds of other interesting things, too.