[AFS3-std] Quota for max. number of files per volumes

Alf Wachsmann alfw@slac.stanford.edu
Mon, 13 Jul 2009 14:26:45 -0700 (PDT)


Hi,

Included in Hartmut Reuter's RXOSD patch is a small set of changes that
implement a quota for the maximum number of files a volume can contain.

File quotas are useful in order to enforce a class of service depending
on the storage backend.
Certain AFS operations don't scale with the amount of data in a volume
but with the number of files per volume (salvage is one example).
To allow large AFS volumes without a huge number of files, a quota
needs to be set.

Storage backends that profit from the possibility of enforcing file quotas
are large SATA disks and tape storage (HSM). In fact, file quotas are a
necessity for tape storage.


In order to store a file quota in the on-disk volume header, the currently
unused MinQuota field is used. This makes a patched file server compatible
with an unpatched one. Of course, the unpatched server does not enforce
the quota.


A UI needs to be able to set and display a file quota.
For this to work, the MinQuota field is used to transmit a new file quota
from the AFS client to the file server.
To fetch and display a file quota propperly, two values have to be
transmitted from a file server to the AFS client: the quota and the number
of currently used files. Unfortunately, MinQouta provides only one 32 bit
valued field that is currently transmitted. Hartmut's patch bit-shifts the two 
numbers and transmits both inside the MinQuota field.


I would like to open the discussion about these changes since they
will have to be dealt with for the RXOSD changes anyway but provide
by themselves already a very useful feature.


A prototype implementation of these changes can be found either as a
patch against openafs-1.4.11pre3 in
 	http://www.slac.stanford.edu/~alfw/openafs-1.4.11pre3-filequota.patch
or included in the RXOSD code at
 	https://svnsrv.desy.de/viewvc/openafs-osd/trunk/openafs

-- Alf.

-----------------------------------------------------------------------
   Alf Wachsmann                       | e-mail: alfw@slac.stanford.edu
   SLAC - Scientific Computing         | Phone:  +1-650-926-4802
   2575 Sand Hill Road, M/S 97         | FAX:    +1-650-926-3329
   Menlo Park, CA 94025, USA           | Office: Bldg. 50/323
-----------------------------------------------------------------------
                 http://www.slac.stanford.edu/~alfw (PGP)
-----------------------------------------------------------------------