Nội dung
Overview of error “xfs_quota: cannot set limits: Function not implemented DirectAdmin”
The error xfs_quota: cannot set limits: Function not implemented on DirectAdmin may appear when you adjust a user’s usage capacity or initialize the first user.
First, you need SSH into your VPS/Server. If you don’t know how to SSH into your VPS/Server, you can refer to the following tutorial:
The cause of this error is that the partition on your VPS/Server does not have a /home
partition, you can see it using the df -h
command. For example, my VPS below doesn’t have a /home
partition:
Filesystem | Size | Used | Avail | Use% | Mounted on |
devtmpfs | 1.9G | 0 | 1.9G | 0% | /dev |
tmpfs | 1.9G | 24K | 1.9G | 1% | /dev/shm |
tmpfs | 1.9G | 17M | 1.9G | 1% | /run |
tmpfs | 1.9G | 0 | 1.9G | 0% | /sys/fs/cgroup |
/dev/mapper/centos_sv3-root | 28G | 4.3G | 24G | 16% | / |
/dev/sda1 | 1014M | 193M | 822M | 19% | /boot |
tmpfs | 379M | 0 | 379M | 0% | /run/user/0 |
Fix the error: xfs_quota: cannot set limits: Function not implemented Directadmin
Before handling the error, you need to check that your filesystem
is in EXT4
or XFS
format, you can use the following command to check:
mount | grep ' / '
After running this command, you will be able to determine which format you use.
Your VPS/Server will be in 1 of 2 cases below:
Trường hợp 1: /dev/sda3 on / type ext4 (rw,usrquota,grpquota) Trường hợp 2: /dev/mapper/centos-root on / type xfs (rw,relatime,attr2,inode64,noquota)
Case 1 is your system using ext4 format and case 2 is xfs
. Depending on each case, you choose the corresponding method.
If is EXT4:
In the case of ext4
, the solution is quite simple, you just need to run the following 4 commands:
cd /usr/sbin mv setquota setquota.old touch setquota chmod 755 setquota
So you have solved the “xfs_quota: cannot set limits: Function not implemented Directadmin” error for systems using EXT4
format.
For XFS system
For xfs
system, it will be different from ext3/ext4
. But first, you should double-check to be sure.
Step 1: Check the partition on Linux
We will recheck with the df -h
command to see the current partitions:
Filesystem | Size | Used | Avail | Use% | Mounted on |
devtmpfs | 1.9G | 0 | 1.9G | 0% | /dev |
tmpfs | 1.9G | 24K | 1.9G | 1% | /dev/shm |
tmpfs | 1.9G | 17M | 1.9G | 1% | /run |
tmpfs | 1.9G | 0 | 1.9G | 0% | /sys/fs/cgroup |
/dev/mapper/centos_sv3-root | 28G | 4.3G | 24G | 16% | / |
/dev/sda1 | 1014M | 193M | 822M | 19% | /boot |
tmpfs | 379M | 0 | 379M | 0% | /run/user/0 |
As we can see /home
is not a partition as it is not visible on this table. Because it’s on the inside /
. Next we go to step 2.
Step 2: Confirm that / is indeed using the XFS file system
We use the following command again to determine if the /
partition is using the xfs
file format
mount | grep ' / '
We will have the result as below:
[root@sv3 ~]# mount | grep ' / ' /dev/mapper/centos_sv3-root on / type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
If you see the option “noquota”, you need to skip to step 3 below.
If you don’t see “noquota“, then you can follow these DirectAdmin instructions:
Step 3: Fix “xfs_quota: cannot set limits: Function not implemented Directadmin” error with xfs system
Since “noquota” is the default kernel mount option, we have to change it in the kernel boot options.
To change, we use the following command:
vi /etc/default/grub
You will see a few lines of kernel system configuration, maybe each system is different but doesn’t worry. Here is the file content on my VPS:
GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL_OUTPUT="console" GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=centos_sv3/root rd.lvm.lv=centos_sv3/swap rhgb quiet" GRUB_DISABLE_RECOVERY="true"
More illustrations for you to imagine:
Here you find the line “GRUB_CMDLINE_LINUX“, as mine is line number 6.
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=centos_sv3/root rd.lvm.lv=centos_sv3/swap rhgb quiet"
Let’s start moving the “quote” to the end of this line, but don’t pass the double quote (“).
Here, you press “i” to proceed to edit the line and add the text “rootflags=uquota,pquota“. Below is a before and after comparison when editing.
Trước: GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=centos_sv3/root rd.lvm.lv=centos_sv3/swap rhgb quiet" Sau : GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=centos_sv3/root rd.lvm.lv=centos_sv3/swap rhgb quiet rootflags=uquota,pquota"
More illustrations for you to imagine:
After changing, remember to save it. Then we continue with the following two commands:
cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg.orig grub2-mkconfig -o /boot/grub2/grub.cfg
Explanation of the above commands:
Command 1: Back up the file “grub.cfg” to a new file named “grub.cfg.orig“.
Command 2: Regenerate the grub configuration file.
For some other OS, the path may change to:
/boot/efi/EFI/centos/grub.cfg
Here are results of my VPS:
Next, restart your VPS or Server with the “reboot” command.
After logging back into your VPS/Server, check again with the old command to see if the “noquota” option is still available.
mount | grep ' / '
Below is results of my VPS:
The “noquota” option is no longer visible. Next, check if the option to use “xfs” is enabled in the DirectAdmin configuration, you can use the following two commands to check:
cd /usr/local/directadmin ./directadmin c | grep use_xfs_quota
Explanation of the two commands above:
- Command 1: Move to the location of the DirectAdmin configuration file
- Command 2: Check which parameters Directadmin use_xfs_quota is configuring
The result as below, you can proceed to the last step.
use_xfs_quota=1
The last step is to restore the space usage quota for the users that have been initialized:
echo "action=rewrite&value=quota" >> /usr/local/directadmin/data/task.queue
Check if the error “xfs_quota: cannot set limits: Function not implemented DirectAdmin” still exists.
To check, try changing the capacity size of a user and then click “Save“. After clicking Save, you will see that the error is no longer displayed and the saving process is complete.
So you have completed the steps to solve the “xfs_quota: cannot set limits: Function not implemented DirectAdmin” error.
Wishing you success.
- Hotline 247: 028 888 24768 (Ext 0)
- Ticket/Email: You use the email to register for the service and send it directly to: support@azdigi.com