A shared GlusterFS volume can run out of usable space before every workload has used its share. Enabling volume quotas turns on quota accounting so directory limits can be added before one path fills the volume for everyone.
GlusterFS enables quotas per volume with the gluster volume quota command. The enable action prepares accounting and exposes the features.quota option, but it does not create a disk limit by itself. A separate limit-usage rule is still required before writes are blocked on a directory path.
Quota accounting can take time to settle on volumes that already contain data, and it adds metadata work while clients write files. Run the change from a trusted-pool node during lower write activity, verify the volume is started first, and treat an empty quota list as expected until a directory limit is configured.
Related: How to set GlusterFS quota limits
Related: How to list GlusterFS volume options
Related: How to check GlusterFS logs
Steps to enable GlusterFS volume quotas:
- Open a terminal on a trusted-pool node.
- List GlusterFS volumes to confirm the target name.
$ sudo gluster volume list volume1
Replace volume1 in later commands with the volume to protect.
- Confirm the target volume is started.
$ sudo gluster volume info volume1 Volume Name: volume1 Type: Replicate Status: Started Number of Bricks: 1 x 2 = 2 Brick1: node1:/srv/gluster/brick1 Brick2: node2:/srv/gluster/brick1 ##### snipped #####
Do not enable quotas as a substitute for starting or repairing a stopped volume; fix the volume state first.
Related: How to check GlusterFS volume status
- Enable quotas for the volume.
$ sudo gluster volume quota volume1 enable volume quota: success: quota enabled for volume volume1
Quota accounting can add overhead while initial usage is calculated on existing data.
- Verify the quota option is enabled.
$ sudo gluster volume get volume1 features.quota Option Value ------ ----- features.quota on
- List quota entries to confirm the quota subsystem responds.
$ sudo gluster volume quota volume1 list No quota configured
No quota configured means quota accounting is enabled but no directory hard limit has been set yet.
Related: How to set GlusterFS quota limits
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.