управлять использованием квоты в файловых системах XFS (manage use of quota on XFS filesystems)
DIRECTORY TREE QUOTA
The project quota mechanism in XFS can be used to implement a
form of directory tree quota, where a specified directory and all
of the files and subdirectories below it (i.e. a tree) can be
restricted to using a subset of the available space in the
filesystem.
A managed tree must be setup initially using the -s
option to the
project
command. The specified project name or identifier is
matched to one or more trees defined in /etc/projects, and these
trees are then recursively descended to mark the affected inodes
as being part of that tree. This process sets an inode flag and
the project identifier on every file in the affected tree. Once
this has been done, new files created in the tree will
automatically be accounted to the tree based on their project
identifier. An attempt to create a hard link to a file in the
tree will only succeed if the project identifier matches the
project identifier for the tree. The xfs_io
utility can be used
to set the project ID for an arbitrary file, but this can only be
done by a privileged user.
A previously setup tree can be cleared from project quota control
through use of the project -C
option, which will recursively
descend the tree, clearing the affected inodes from project quota
control.
Finally, the project -c
option can be used to check whether a
tree is setup, it reports nothing if the tree is correct,
otherwise it reports the paths of inodes which do not have the
project ID of the rest of the tree, or if the inode flag is not
set.
Option -d
can be used to limit recursion level (-1 is infinite, 0
is top level only, 1 is first level ... ). Option -p
adds
possibility to specify project paths in command line without a
need for /etc/projects to exist. Note that if projects file
exists then it is also used.