Skip to main content
Version: 5.11.0

Quotas

LeilFS supports quotas on both disk space (bytes) and inode count (number of files and directories). Quotas can be applied per user, per group, or per directory subtree, and are managed from any mounted client with leil setquota and leil repquota.


Quota limits

Each quota defines two thresholds for both space and inodes:

  • Soft limit — may be exceeded temporarily; crossing it is reported but not blocked.
  • Hard limit — cannot be exceeded; writes that would cross it fail.

A user/group quota therefore takes four numeric limits: SOFT and HARD bytes, followed by SOFT-INODES and HARD-INODES.


Setting quotas

# Per-user quota (uid 1001): soft 90 GiB, hard 100 GiB, soft 900k inodes, hard 1M inodes
leil setquota -u 1001 96636764160 107374182400 900000 1000000 /mnt/client

# Per-group quota (gid 2000)
leil setquota -g 2000 483183820800 536870912000 4500000 5000000 /mnt/client

The trailing PATH must be a path inside the LeilFS mount; the quota applies to the whole filesystem represented by that mount.

note

Set a limit to 0 to leave that dimension unlimited. Space limits are given in bytes100 GiB = 107374182400.


Checking quotas

# Report every quota defined on the filesystem
leil repquota -a /mnt/client

# Report the quota for a single user
leil repquota -u 1001 /mnt/client

# Report the quota for a single group
leil repquota -g 2000 /mnt/client

Add -h to print the byte figures in human‑readable units (KiB/MiB/GiB) instead of raw bytes.


Quick reference

TaskCommand
Set user quotaleil setquota -u UID SOFT HARD SOFT-INODES HARD-INODES PATH
Set group quotaleil setquota -g GID SOFT HARD SOFT-INODES HARD-INODES PATH
Report all quotasleil repquota -a PATH
Report one user/groupleil repquota -u UID PATH / leil repquota -g GID PATH

See the CLI reference for the full command set.