Home Domain Name DirectAdmin quota error on xfs file system

DirectAdmin quota error on xfs file system

0
DirectAdmin quota error on xfs file system

Wondering how to fix DirectAdmin quota error on xfs file system? We can help you.

Often DirectAdmin users may see the error “You don’t seem to have quotas enabled on the system” on their file system.

Here at Bobcares, we get requests from our customers to handle similar errors as a part of our Server Management Services. Today we will see how our Support Engineers do this for our customers.

How to fix DirectAdmin quota error on xfs file system

Setting up disk quotas is a bit different in xfs file system. If we follow the standard procedure on such systems it can lead to this error.

For quotas setup on the /home partition, the procedure may seem very similar to the standard quota setup.

However, if we wish to set up quotas on /, where / uses use an XFS partition (/home is only a directory under /), then we must follow some extra steps.

For confirming what setup we have we can run the following df command:

[root@hostname]# df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   14G  2.3G   12G  17% /
devtmpfs                 915M     0  915M   0% /dev
tmpfs                    921M   24K  921M   1% /dev/shm
tmpfs                    921M  8.5M  912M   1% /run
tmpfs                    921M     0  921M   0% /sys/fs/cgroup
/dev/sda1                497M  125M  372M  26% /boot
[root@hostname]#

From the output, we can see that, /home is not a partition, so it falls under the / partition. Therefore we must ensure that quotas are functional on the / partition.

To confirm this we can use the following command:

# mount | grep ' / '

Output:

/dev/mapper/centos-root on / type xfs (rw,relatime,attr2,inode64,noquota)

Once we see the “noquota” option we can confirm that there is a quota error.

Steps to fix this error

Following are the steps to fix this error:

1. Since “noquota” is a default kernel mounting option, we must change it in the kernel boot options.

This can be done by editing the following file:

/etc/default/grub

In the line with the variable GRUB_CMDLINE_LINUX and add the following:

GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos/root crashkernel=auto  vconsole.keymap=us rhgb quiet rootflags=uquota,pquota"

2. Now, based on the setup, we will take a backup and create a new grub.cfg file.

This can be done using the following:

cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg.orig
grub2-mkconfig -o /boot/grub2/grub.cfg

3. Finally, we must reboot the server using the following:

reboot

4. After rebooting once the server is up we must check the mount again as given below:

# mount | grep ' / 'rebooting we will check the mount
/dev/mapper/centos-root on / type xfs (rw,relatime,attr2,inode64,usrquota,prjquota)
#

Once it’s gone, we want to see usrquota,prjquota(or uquota,pquota).

5. For this we will ensure that DirectAdmin has xfs quotas enabled in the directadmin.conf.

We can do this with the following commands:

cd /usr/local/directadmin
./directadmin c | grep use_xfs_quota

6. If there are already Users created in DA, we will have to reset their quota limits. This can be done with the following command:

echo "action=rewrite&value=quota" >> /usr/local/directadmin/data/task.queue

[Need assistance? We can help you]

Conclusion

In short, we saw how our Support Techs fix DirectAdmin quota error on xfs file system for our customers.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = “owonCMyG5nEQ0aD71QM”;

LEAVE A REPLY

Please enter your comment!
Please enter your name here