XFS quota not working RAID 1

On a cPanel server with RAID 1, the quota was disabled on the / file system even after it was enabled in /etc/fstab

[root@server48 ~]# mount | grep "/ "
/dev/md3 on / type xfs (rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota)
[root@server48 ~]# 

It says noquota.

xfs_quota -x -c 'report -h'

Returned empty result.

In /etc/fstab, the quota was enabled properly

UUID=30c3c244-1e7c-4cc5-babd-d6cf8eee8ac5 / xfs defaults,uquota,usrquota 0 1

/etc/default/grub has the following GRUB_CMDLINE_LINUX line

GRUB_CMDLINE_LINUX="crashkernel=auto rd.auto nomodeset rootflags=uquota"

The problem was caused due to grub.cfg read from the wrong drive.

[root@server48 ~]#  grep boot /etc/fstab
UUID=f2edd8de-2161-482b-b27f-9d399eed1abe	/boot	xfs	defaults	0	0
/dev/nvme1n1p1       /boot/efi       vfat    defaults        0       1
[root@server48 ~]# 

The server is using EFI and /dev/nvme1n1p1 is mounted as /boot/efi, Since we are using RAID 1, we have 2 EFI partitions

[root@server48 ~]# blkid | grep EFI
/dev/nvme0n1p1: SEC_TYPE="msdos" LABEL="EFI_SYSPART" UUID="6B1C-67AC" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="primary" PARTUUID="a26b50cd-357f-4a93-b0c7-41f89bd4e038"
/dev/nvme1n1p1: SEC_TYPE="msdos" LABEL="EFI_SYSPART" UUID="6B59-E668" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="primary" PARTUUID="b24738fb-f7fd-4354-a35a-af9f3fac9b77"
[root@server48 ~]# 

In /etc/fstab, we are using /dev/nvme1n1p1, when server is booting, it is using the other EFI partition.

The Solution

Update grub on the other EFI partition. Update /etc/fstab to use the partition as /boot/efi

mount /dev/nvme0n1p1 /mnt/

Regenerate grub.cfg in the 2nd EFI partition that is mounted as /mnt/

cp /mnt/EFI/almalinux/grub.cfg{,.backup}
grub2-mkconfig -o /mnt/EFI/almalinux/grub.cfg

Edit /etc/fstab

vi /etc/fstab

Find

/dev/nvme1n1p1       /boot/efi       vfat    defaults        0       1

Replace with

/dev/nvme0n1p1       /boot/efi       vfat    defaults        0       1

Reboot the server

reboot

After reboot, the mount command shows quota enabled for / partition.

xfs filesystem quota on raid1

Back to quota

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *