Viewing: lfs-setquota.1

.TH LFS-SETQUOTA 1 2026-03-19 "Lustre" "Lustre User Utilities"
.SH NAME
lfs-setquota \- set quota limits or grace time for users, groups or projects.
.SH SYNOPSIS
.SY
.RB "lfs setquota  {" -u | --user | -g | --group | -p | --projid "} " \fI ID
.RB [ --pool
.IR POOL_NAME ]
.RS 1.2i
.RB [ -b | "--block-softlimit \fIBLOCK_SOFTLIMIT" [ KMGTPE ]]
.br
.RB [ -B | "--block-hardlimit \fIBLOCK_HARDLIMIT" [ KMGTPE ]]
.br
.RB [ -i | "--inode-softlimit \fIINODE_SOFTLIMIT" [ KMGTPE ]]
.br
.RB [ -I | "--inode-hardlimit \fIINODE_HARDLIMIT" [ KMGTPE "]] " \fIMOUNT_POINT
.RE
.SY
.BR "lfs setquota " { -U | --default-usr " | "
.BR -G | --default-grp " | " -P | --default-prj }
.RS 1.2i
.RB [ --pool
.IR POOL_NAME ]
.RB [ -b | "--block-softlimit \fIBLOCK_SOFTLIMIT" [ KMGTPE ]]
.br
.RB [ -B | "--block-hardlimit \fIBLOCK_HARDLIMIT" [ KMGTPE ]]
.br
.RB [ -i | "--inode-softlimit \fIINODE_SOFTLIMIT" [ KMGTPE ]]
.br
.RB [ -I | "--inode-hardlimit \fIINODE_HARDLIMIT" [ KMGTPE ]] " \fIMOUNT_POINT
.RE
.SY
.BR "lfs setquota " { -D | --default "} " \c
.RB { -u | --user " | " -g | --group " | " -p | --projid "} " \c
.RB [ --pool
.IR POOL_NAME ]
.I ID MOUNT_POINT
.SY
.BR "lfs setquota --delete " \c
.RB { -u | --user " | " -g | --group " | " -p | --projid "} " \c
.I ID MOUNT_POINT
.SY
.BR "lfs setquota " { -t | --times "} {" -u | -g | -p "} [" "--pool " \c
.IR POOL_NAME ]
.RS 1.2i
.RB [ -b | "--block-grace \fIBLOCK_GRACE_TIME" ]
.br
.RB [ -i | "--inode-grace \fIINODE_GRACE_TIME" "] " \fIMOUNT_POINT
.RE
.SY
.BR "lfs setquota --reset " { -u | --user | -g | --group | -p | --projid "} " \c
.I ID MOUNT_POINT
.YS
.SH DESCRIPTION
.TP
.BR "lfs setquota " { -u | -g | -p "} ..."
Command sets the filesystem quotas for the specified user, group, or project
.I ID
respectively.
.PP
Quota limits should be configured large enough so that each OST and MDT in
the filesystem can allocate multiple of the minimum block and inode units.
If the limits are set too low, applications may see EDQUOT (quota exceeded)
errors before they can use a meaningful portion of their assigned quota
due to fragmentation of the quota units across multiple targets.
.PP
Quota block limit enforcement is not strict, especially with cached writes,
and as such minimum quota limits are recommended to be GiB in size to ensure
the limit enforcement error is not a significant fraction of the quota itself.
.TP
.BR "lfs setquota " { -U | -G | -P "} ..."
Set the filesystem default limits for user, group, project quota type.
If set, users/groups/projects without specific quota limits will use the
default quota limits automatically.
.TP
.BR "lfs setquota --default " ...
Change the specified user, group, or project
.I ID
to use the default quota limits instead of explicitly specified limits.
Such ID inherits new default quota limits, if they are changed.
.TP
.BR "lfs setquota --delete " ...
Delete the unused user, group, or project
.I ID
from the quota database so that it is no longer reported.
.TP
.BR "lfs setquota --reset "
Recalculate the quota accounting for the specified user, group, or project
.I ID
in case of inconsistencies in the aggregate quota stored in the main
quota database.
.TP
.BI "lfs setquota --times " ...
Set the filesystem quota grace time for all users, groups, or projects
for the block and inode limits.
This is intended to allow users to exceed the quota limit for a short time to
complete their work without having to grant each user a larger quota limit.
.SH OPTIONS
.TP
.BR -b ", " --block-softlimit " " \fIBLOCK_SOFTLIMIT
Specify block softlimit, zero means unlimited.
Block limits unit is kilobyte (1024) by default, and block limits are always
kilobyte-granular (even if specified in bytes). Block limits can be specified
with a
.BR K ", " M ", " G ", " T ", " P ", or " E
suffix to specify units of 2^10, 2^20, 2^30, 2^40, 2^50 and 2^60 bytes
respectively.
.TP
.BR -B ", " --block-hardlimit " " \fIBLOCK_HARDLIMIT
Specify block hardlimit, zero means unlimited. The block hardlimit should be
greater than the block softlimit if it is being specified.
.TP
.BR -b ", " --block-grace " {" notify | \fIBLOCK_GRACE_TIME }
Specify grace time for block quota in seconds, when used with
.B --times
option.  The
.I BLOCK_GRACE_TIME
is a global value that can take two forms:
.RS 1.2i
.TP
.I BLOCK_GRACE_TIME
indicates the time in seconds that the soft quota limit can be exceeded
before users are prevented from creating new files or consuming more space.
This is intended to allow users to exceed the quota limit for a short time to
complete their work without having to grant each user a larger quota limit.
.TP
.B notify
informs users that are exceeding their soft quota limit
.RB (' * '
in the quota output) that they are nearing their hard quota limit,
but does not block new writes until the hard quota limit is reached.
The soft quota state is reset once the user, group,
or project reduces their space usage or file count below the soft quota limit.
Grace time is specified in "XXwXXdXXhXXmXXs" format or as an integer seconds
value.  The maximum is 2^48 - 1 seconds.
.RE
.TP
.BR --delete
Delete the unused user, group, or project
.I ID
limit from the quota database.
.TP
.BR -D ", " --default
Set the specified user/group/project
.I ID
to use the default quota limits.
.TP
.BR -g ", " --group " " \fIGROUPNAME | \fIGID
Set group quota for name
.I GROUPNAME
or numeric
.IR GID .
.TP
.BR -G ", " --default-grp
Set default group quota limit.
.TP
.BR -h ", " --help
Print usage message.
.TP
.BR -i ", " --inode-softlimit " " \fIINODE_SOFTLIMIT
Specify inode softlimit, zero means unlimited.
It is recommended to specify inode limits in multiples of 1024.
.TP
.BR -I ", " --inode-hardlimit " " \fIINODE_HARDLIMIT
Specify inode hardlimit, zero means unlimited. The inode hardlimit should be
greater than inode softlimit when it's being specified.
.TP
.BR -i ", " --inode-grace " {" notify | \fIINODE_GRACE_TIME }
Specify grace time for inode quota in seconds, when used with
.B --times
option.  See the
.B --block-grace-time
option for a detailed description of the
.I INODE_GRACE_TIME
argument.
.TP
.BR -p ", " --projid " " \fIPROJECT_NAME | \fIPROJID
Set project quota for
.I PROJECT_NAME
(from the
.BR /etc/projid (5)
file) or the numeric
.IR PROJID .
.TP
.BR -P ", " --default-prj
Set default project quota limit.
.TP
.BR --pool " " \fIPOOL_NAME
Set quota per OST pool
.IR POOL_NAME .
.TP
.BR -r ", " --reset
Reset the internal quota data of the user|group|project quota.
It can be used to fix quota in an inconsistent database (such as quota grant).
.TP
.BR -t ", " --times
Set quota grace times.
.TP
.BR -u ", " --user " " \fIUSERNAME | \fIUID
Set user quota for
.I USERNAME
or numeric
.IR UID .
.TP
.BR -U ", " --default-usr
Set default user quota limit.
.SH EXAMPLES
Set quotas of user `bob': 8 TiB block hardlimit and 6 TiB block softlimit:
.EX
.B # lfs setquota -u bob --block-softlimit 6T --block-hardlimit 8T /mnt/lustre
.EE
.PP
Set quotas of user `bob' to use default quota setting:
.EX
.B # lfs setquota -u bob --default /mnt/lustre
.EE
.PP
Set system default user quota 64 GiB block softlimit and 80 GiB block hardlimit:
.EX
.B # lfs setquota -U --block-softlimit 64G --block-hardlimit 80G /mnt/lustre
.EE
.PP
Set grace times for user quotas: 36000 seconds for block quotas, 1 week and 4
days for inode quotas:
.EX
.B # lfs setquota -t -u --block-grace 36000 --inode-grace 1w4d /mnt/lustre
.EE
.PP
Set hard block limit 1 TiB for user 'ivan' per pool 'flash_pool':
.EX
.B # lfs setquota -u ivan --pool flash_pool -B 1T /mnt/lustre
.EE
.PP
Set grace time 10000 seconds for block quotas per pool 'flash_pool':
.EX
.B # lfs setquota -t -u --block-grace 10000 --pool flash_pool /mnt/lustre
.EE
.PP
Delete unused user 'jack':
.EX
.B # lfs setquota -u jack --delete /mnt/lustre
.EE
.PP
Reset the quota usage for user 'chad' that is having problems:
.EX
.B # lfs setquota -u chad -r /mnt/lustre
.EE
.SH AVAILABILITY
The
.B lfs setquota
command is part of the
.BR lustre (7)
filesystem package since release 1.5.0.
.\" predates Git history, added in jumbo b1_5 merge.
.SH SEE ALSO
.BR lfs (1),
.BR lfs-project (1),
.BR lfs-quota (1),
.BR mdt.enable_chprojid_gid (4)