[OpenAFS] Listing all volume mount points
Thu, 24 Feb 2011 19:20:14 -0500
On Thu, Feb 24, 2011 at 05:09:33PM -0700, Thomas Smith wrote:
> I am looking for a way to monitor quota usage in order to address
> quota or disk space issues before they become problems.
> fs listq <dir> provides the information that I need, but I have been
> unable to determine a way to script this without knowing every mount
> point beforehand.
> Is this possible (to determine mount points without knowing the mount
> points beforehand)?
> ~ Tom
It is not possible to determine mount points without knowing the
mount points beforehand, or without doing something to traverse
all of the space you care about --- mount points can be created
at will by anyone with write permissions in a directory and are
not stored in any database of any kind.
That said, it is entirely possible to determine how much space
is used by every volume, if you know the volume name you can
get the quota used by that volume (and the quota limit in that
volume) from `vos examine'. And, you can also get a list of
every volume in your cell as well with `vos listvldb'.
Now, that only tells you quota for a particular volume, you
still need some way to determine where that volume is if
you, say, want the quota on a particular volume to be
translated to "how do I get to this volume in afs". I know
of a handful of places off hand that have a local setup
that does the actual volume creation and keeps an idea
of a canonical mount point for volumes, and even places
that don't do this often have a convention for volume
names and where they appear. But none of that is enforced
or kept track of by afs, and those local setups or
conventions are just that, local.
Thomas L. Kula | firstname.lastname@example.org | http://kula.tproa.net/