Root Filesystem Quotas

I’m attempting to enable quotas in the root filesystem (i.e. /) on Rocky Linux 10. My root filesystem is XFS.

I had been doing this successfully in el9, el8, and probably el7 with the following procedure:

  1. Edit /etc/default/grub; add rootflags=pquota,uquota to the GRUB_CMDLINE_LINUX line.
  2. Run grub2-mkconfig -o /boot/grub2/grub.cfg
  3. Reboot
  4. (Root filesystem now has quota support.)

But I have had no success with this on Rocky 10.

I think I’m partway there and hopefully on the right track.

There are some .conf files under /boot/loader/entries that have the kernel command line that was actually used (i.e. the rootflags argument is missing). The info I’m finding says files are supposed to be updated with grubby.

First, the kernel cmdline option management did change already in RHEL 9.3, so it is not new to el10.
The current (two) ways are described in Chapter 4. Configuring kernel command-line parameters | Managing, monitoring, and updating the kernel | Red Hat Enterprise Linux | 9 | Red Hat Documentation

That is, if using mkconfig:

grub2-mkconfig -o /boot/grub2/grub.cfg --update-bls-cmdline

The grubby way:

grubby --update-kernel=ALL --args="rootflags=pquota,uquota"

Second, If you would add the pquota,uquota to /etc/fstab for /, would they not affect? Do they have to be on the cmdline options?

Thank you, especially for the relevant documentation link.

I tried the grub2-mkconfig command and the quota options were applied successfully.

Adding the quota options for / to /etc/fstab hasn’t worked to enable quotas (at least for XFS on elx) for quite some time. It’s a peculiarity of the root filesystem – the /etc/fstab options work fine for everything else. I didn’t dig up the original explanation I found, but my notes show that I first ran into this back in 2017, so it would have definitely been CentOS 7.

The initramfs ought to have copy of fstab, but yes, the root ain’t like everything else.

I have seen (CentOS 7?) cloud images, where the /etc/fstab said “xfs”, but the actual filesystem was something else, so clearly fstab was there “more what you’d call ‘guidelines’ than actual rules”.

1 Like