Quotas do not work with AlmaLinux and XFS file system (Solved)

IT_Architect

Verified User
Joined
Feb 27, 2006
Messages
1,088
When I added a user, I received the quota error. Quotas do not work with AlmaLinux and XFS file system. I followed the instructions to get it going at: How to enable quota support on XFS but I ended up with an unbootable VM so I had to rollback to the previous snapshot.

Environment:
- ESXi
- GPT, VHD
- Separate /home partition
- directadmin.conf
- The disk is GPT, and I did mount the /home in fstab nosuid as recommended, and this is an ESXi environment.
- use_xfs_quota=1 is set in directadmin.conf

Steps to replicate:
1. Create a user and you get the error that it cannot do quotas so I deleted the user to fix that first.
2. I do have a /home partition so when
# mount | grep ' /home '
- I receive the message:
/dev/sda8 on /home type xfs (rw,nosuid,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota)
- It says to edit /etc/default/grub and add:
rootflags=uquota,pquota
however it already shows:
GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_DEFAULT} rootflags=uquota,pquota systemd.unified_cgroup_hierarchy=1 psi=1"
so I moved on to the next step
# cp /boot/efi/EFI/almalinux/grub.cfg /boot/efi/EFI/almalinux/grub.cfg.orig
*So far I've edited nothing.
- Next I run this command:
# grub2-mkconfig -o /boot/efi/EFI/almalinux/grub2/grub.cfg
# reboot
- The OS hangs right at the beginning of the boot process.


Thanks!
 
I figured it out. I read the instructions from another site, which was essentially the same as here but I caught on I was mixing the instructions for when /home is not a separate partition. That still should not have smoked the OS but I don't care why it does anymore because I don't need to do the:
# grub2-mkconfig -o /boot/efi/EFI/almalinux/grub2/grub.cfg
to make quotas work

I just needed to:
1. edit /etc/fstab and add: ,usrquota,grpquota to fstab

UUID=2d6d3561-7787-417d-9679-8f8986bdf16e /home xfs defaults,usrquota,grpquota,nosuid 0 0
2. # reboot

Now when I run:
# mount | grep ' /home '
it returns::
/dev/sda8 on /home type xfs (rw,nosuid,relatime,attr2,inode64,logbufs=8,logbsize=32k,usrquota,grpquota)
and when I add users, I no longer get the error message but instead:
?nix User created successfully

User's System Quotas set
User's data directory created successfully
Domains directory created successfully
Domains directory created successfully in user's home
Domain Created Successfully
 
Back
Top