XFS writes are limited by quota even though exceeding neither the hard limit nor the grace time

Solution Verified - Updated -

Issue

If we set the quota on XFS, writes are limited if exceeding the soft limit but not exceeding either the hard limit or the grace time as follows:

    $ sudo mount /dev/loop1 /mnt/xfs -o usrquota
    $ sudo xfs_quota -x -c "limit -u bsoft=1m bhard=550m quota_test" /mnt/xfs
    $ sudo xfs_quota -x -c "timer -u 6d" /mnt/xfs
    $ dd bs=1100k count=1 if=/dev/zero of=/mnt/xfs/test1
    1+0 records in
    1+0 records out
    1126400 bytes (1.1 MB, 1.1 MiB) copied, 0.0015697 s, 718 MB/s
    $ sudo xfs_quota -x -c 'report -h' /mnt/xfs
    User quota on /mnt/xfs (/dev/loop1)
                          Blocks
    User ID      Used   Soft   Hard Warn/Grace
    ---------- ---------------------------------
    root           4K      0      0  00 [0 days]
    quota_test   1.1M     1M   550M  01 [------]  <---

    :
    $ dd bs=1100k count=1 if=/dev/zero of=/mnt/xfs/test6
    dd: failed to open '/mnt/xfs/test6': Disk quota exceeded  <---
    $ sudo xfs_quota -x -c 'report -h' /mnt/xfs
    User quota on /mnt/xfs (/dev/loop1)
                           Blocks
    User ID      Used   Soft   Hard Warn/Grace
    ---------- ---------------------------------
    root           4K      0      0  00 [0 days]
    quota_test   5.4M     1M   550M  05 [6 days]  <---

Environment

  • Red Hat Enterprise Linux (RHEL) 8.5 or later
  • xfs
  • quota

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content