Quota in Gfarm file system
2010.3.29

* Description

Administrators in the gfarmadm group can limit the capacity to use
and/or the number of files to create for a user or a group.  These
limits can be specified for files and for file replicas.  The limit
for file replicas is called the physical limit.  There are soft limit
and hard limit.  The soft limit can be exceeded within the specified
grace period.

These limits are checked at file opening.  Note that it is not
possible to create a file if some limits are exceeded, but it is
possible to append data beyond the capacity limit to an already opened
file.

* Usage

** gfedquota - edit the limit

Usage: gfedquota [-P path] -u username | -g groupname [options]

Options:
  -P,--path=NAME        Gfarm pathname to specify a metadata server
  -u,--user=NAME        username to edit the limit
  -g,--group=NAME       groupname to edit the limit
  -G,--grace=SECOND     grace period in second for soft limits
  -s,--softspc=BYTE     soft limit of file space in byte
  -h,--hardspc=BYTE     hard limit of file space in byte
  -m,--softnum=NUM      soft limit of file number
  -n,--hardnum=NUM      hard limit of file number
  -S,--physoftspc=BYTE  soft limit of physical space in byte incl replicas
  -H,--phyhardspc=BYTE  hard limit of physical space in byte incl replicas
  -M,--physoftnum=NUM   soft limit of physical number incl replicas
  -N,--phyhardnum=NUM   hard limit of physical number incl replicas
  -?,--help     this help message

gfedquota edits the limit for a user or a group.  Each limit can be
specified by one of above options.  Setting 'disable' or -1 indicates
unlimited.  If no option for limits is specified, no quota is imposed.
This command can be executed by an administrator in the gfarmadm
group.  The quota is enabled after executing the gfquotacheck command.

** gfquotacheck - build a table of current usage and enable the quota check

Usage: gfquotacheck [-P path]

Options:
  -P,--path=NAME        Gfarm pathname to specify a metadata server

gfquotacheck builds a table of the current usage for users and groups
whose quota are edited by gfedquota, and enables the quota check.
This command can be executed by an administrator in the gfarmadm
group.

** gfquota - display the current usage and limits

Usage: gfquota [-q] [-P path] [-u username | -g groupname]

Options:
  -q                    do not display the current usage and limits.
  -P,--path=NAME        Gfarm pathname to specify a metadata server
  -u,--user=NAME        username to display
  -g,--group=NAME       groupname to display

gfquota displays the current usage and the limits.  An administrator
in the gfarmadm group can specify a user or a group to display.

** gfusage - display the current usage

Usage: gfusage [-P path] [-g] [name]

Options:
  -P,--path=NAME        Gfarm pathname to specify a metadata server
  -g                    display the current usage for groups

gfusage displays the current usage for users.  If name is specified,
it displays only the specified user.  With the -g option, it displays
the current usage for groups.  The current usage is available for
users or groups after building a table of the current usage by
gfedquota and gfquotacheck.
