15.2. Setting Limits


Note

  • Before setting quota limits on any directory, ensure that there is at least one brick available per replica set.
    To see the current status of bricks of a volume, run the following command:
    # gluster volume status VOLNAME status
  • If the Red Hat Gluster Storage volume is mounted at /mntglusterfs and you want to perform a certain function pertaining to Quota on /mntglusterfs/dir, then the path to be provided in any corresponding command should be /dir, where /dir is the absolute path relative to the Red Hat Gluster Storage volume mount point.
A Hard Limit is the maximum disk space you can utilize on a volume or directory.
Set the hard limit for a directory in the volume with the following command, specifying the hard limit size in MB, GB, TB or PB:
# gluster volume quota VOLNAME limit-usage path hard_limit
For example:
  • To set a hard limit of 100GB on /dir:
    # gluster volume quota VOLNAME limit-usage /dir 100GB
  • To set a hard limit of 1TB for the volume:
    # gluster volume quota VOLNAME limit-usage / 1TB
A Soft Limit is an attribute of a directory that is specified as a percentage of the hard limit. When disk usage reaches the soft limit of a given directory, the system begins to log this information in the logs of the brick on which data is written. The brick logs can be fount at:
/var/log/glusterfs/bricks/<path-to-brick.log>
By default, the soft limit is 80% of the hard limit.
Set the soft limit for a volume with the following command, specifying the soft limit size as a percentage of the hard limit:
# gluster volume quota VOLNAME limit-usage path hard_limit soft_limit
For example:
  • To set the soft limit to 76% of the hard limit on /dir:
    # gluster volume quota VOLNAME limit-usage /dir 100GB 76%
  • To set the soft limit to 68% of the hard limit on the volume:
    # gluster volume quota VOLNAME limit-usage / 1TB 68%

Note

When setting the soft limit, ensure you retain the hard limit value previously created.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.