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
Steps to set GlusterFS quota limits:
- Check that quota enforcement is enabled on the volume.
$ sudo gluster volume get volume1 features.quota Option Value ------ ----- features.quota on
features.quota must be on before any quota limit is enforced.
- Create the target directory path on a mounted copy of the volume if it does not already exist.
$ 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.
- Set a hard quota limit on the target directory path.
$ 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.
- List quota entries to confirm the configured limit and available space.
$ 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.
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
