Setting quota limits on a GlusterFS volume keeps shared storage predictable by preventing a single directory tree from consuming all available capacity and forcing outages or emergency cleanup.
Quotas in GlusterFS are enforced using server-side accounting, so limits apply consistently to all clients regardless of where the volume is mounted. Limits are defined per path with gluster volume quota limit-usage, and they affect the specified directory and everything beneath it in the hierarchy.
Quota enforcement requires features.quota to be enabled on the volume, and usage values may briefly lag during initial accounting or heavy write bursts. Once a hard limit is reached, writes fail with standard filesystem quota errors, so applications and jobs that write into the limited path must handle Disk quota exceeded reliably.
Related: How to check GlusterFS logs
$ sudo gluster volume get volume1 features.quota Option Value ------ ----- features.quota on
features.quota must be on before any quota limit is enforced.
$ sudo mkdir -p /mnt/volume1/projects
Run the command on a host where the volume is mounted, and replace /mnt/volume1 with that mount point.
$ sudo gluster volume quota volume1 limit-usage /projects 500GB volume quota: success
Writes to /projects and its subdirectories fail with Disk quota exceeded once the hard limit is reached.
Paths are relative to the volume root, not the client mount point.
$ sudo gluster volume quota volume1 list Path Hard-limit Soft-limit Used Available ----------------------------------------------------------- /projects 500.0GB 0B 0B 500.0GB
Used and Available can lag briefly on busy volumes due to quota accounting updates.