= saunafs-repquota(1)

== NAME

saunafs-repquota, saunafs-setquota - retrieves and sets quotas for specified
users and groups

== SYNOPSIS

[verse]
*saunafs repquota* [*-nhH*] (*-u* 'UID' | *-g* 'GID')+ 'MOUNTPOINT-ROOT-PATH'

[verse]
*saunafs repquota* [*-nhH*] -a 'MOUNTPOINT-ROOT-PATH'

[verse]
*saunafs repquota* [*-nhH*] -d 'DIRECTORY-PATH'

[verse]
*saunafs setquota* (*-u* 'UID' | *-g* 'GID') 'SOFT-LIMIT-SIZE' 'HARD-LIMIT-SIZE'
              'SOFT-LIMIT-INODES' 'HARD-LIMIT-INODES' 'MOUNTPOINT-ROOT-PATH'

[verse]
*saunafs setquota* -d 'SOFT-LIMIT-SIZE' 'HARD-LIMIT-SIZE'
              'SOFT-LIMIT-INODES' 'HARD-LIMIT-INODES' 'DIRECTORY-PATH'

== OPTIONS

*-u* 'UID'::
Quota for the user with uid 'UID'.

*-g* 'GID'::
Quota for the group with gid 'GID'.

*-a*::
Quota for all users and groups.

*-d*::
Quota for directory.

== DESCRIPTION

Quota mechanism can be used to limit inodes usage and space usage for users and
groups. Once hard limit for inodes or space is reached, no new files can be
created for specified user (or group) as long as the quota is not raised or
some data is deleted. Also, if hard limit for size is reached, user cannot
extend existing files by adding new chunks to them.

In general quotas can be set only by a superuser, but there is a workaround
available - one can set SESFLAG_ALLCANCHANGEQUOTA in sfsexports.cfg file. A
user can only retrieve a quota of his own (and of his primary group).

*repquota* prints a summary of the limits that were set and inode/space usage
for specified user/group (or all of them) in the following format:

....
# User/Group ID/Inode; Bytes: current usage, soft limit, hard limit; Inodes:
# current usage, soft limit, hard limit;
'User/Group/Inode' 'ID' '(`+`/-)(`+`/-)' 'USED-BYTES' 'SOFT-LIMIT-BYTES'
'HARD-LIMIT-BYTES' 'USED-INODES' 'SOFT-LIMIT-INODES' 'HARD-LIMIT-INODES'
....

'`+`' indicates that the soft was exceeded or the hard limit was reached. '-'
indicates otherwise. The first '`+`' or '-' corresponds to bytes limit, while
the second one to inodes.

*setquota* sets quotas for a user or a group on SaunaFS. The quotas are not
strict, i.e. it is possible to exceed hard limits a bit, mostly by appending
data to existing files, but only to certain level (new chunks cannot be
created).

== REPORTING BUGS

Report bugs to the GitHub repository <https://github.com/leil-io/saunafs> as an
issue.

== COPYRIGHT

Copyright 2008-2009 Gemius SA

Copyright 2013-2019 Skytechnology sp. z o.o.

Copyright 2023-2024 Leil Storage OÜ

SaunaFS is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation, version 3.

SaunaFS is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with
SaunaFS. If not, see <http://www.gnu.org/licenses/>.

== SEE ALSO

saunafs(1)
