The problem "xfs_quota: cannot set limits: Function not implemented"

MOHAMMAD026

New member
Joined
Mar 22, 2016
Messages
1
Hello!
I attempted to create accounts in DirectAdmin 1:50, but I was faced with the following error:

---------------------------------
Unix User created successfully
Error with system Quotas
xfs_quota: cannot set limits: Function not implemented
Debug Guide
User's data directory created successfully
Domains directory created successfully
Domains directory created successfully in user's home
Domain Created Successfully


--------------------------------
How can I fix this error I?
run centos 7 - directadmin 1.50
 
If you use no XFS for partitions, xfs=0 should be set in directadmin.conf.
 
Bash:
da config-set xfs 0
Error with the current values:
Cannot find 'xfs' in the directadmin.conf

Found that there is https://docs.directadmin.com/directadmin/general-usage/all-directadmin-conf-values.html is xfs_on_domains

So attempted it:
Bash:
da config-set xfs_on_domains 0
xfs_on_domains=0

Also found on https://docs.cloudlinux.com/shared/cloudlinux_os_kernel/#file-system-quotas, that I should do echo 1 > /proc/sys/fs/xfs/cap_res_quota_disable

So attempted that and it seem to work, but not sure how it should be done properly when cloudlinux is used. No docs regarding directadmin on cloudlinux documentation pages, same with directadmin documentation pages.

But still get with cloudlinux-limits --json
JSON:
{"cageFS": "enabled", "errors": {"quota": "Quotas not activated on this system"}, "items": 2, "mySqlGov": "enabled", "quota": "error", "resellers": [], "result": "success", "timestamp": 1708610839.720276, "users": [{"cageFS": "enabled", "domain": "lithosting.lt", "id": 1005, "limits": {"cpu": {"all": "100", "mysql": "400"}, "ep": "20", "io": {"all": "1024", "mysql": "1953124"}, "iops": "1024", "nproc": "100", "pmem": "1073741824", "vmem": "0"}, "mySqlGov": "watched", "mySqlRestricted": "unrestricted", "package": "user1", "reseller": "proweb", "username": "host1lt"}, {"cageFS": "disabled", "domain": "-", "id": 0, "limits": {"cpu": {"all": "100", "mysql": "400"}, "ep": "20", "io": {"all": "1024", "mysql": "1953124"}, "iops": "1024", "nproc": "100", "pmem": "1073741824", "vmem": "0"}, "mySqlGov": "watched", "mySqlRestricted": "unrestricted", "package": "default", "reseller": "-", "username": "-"}]}
 
Hi,

Bash:
df -h -T
Filesystem     Type      Size  Used Avail Use% Mounted on
devtmpfs       devtmpfs  4.0M     0  4.0M   0% /dev
tmpfs          tmpfs      15G  400K   15G   1% /dev/shm
tmpfs          tmpfs     5.9G   25M  5.8G   1% /run
tmpfs          tmpfs     4.0M     0  4.0M   0% /sys/fs/cgroup
/dev/sda3      xfs       893G   19G  874G   3% /
none           tmpfs      15G  6.5M   15G   1% /var/lve/dbgovernor-shm
/dev/sda1      xfs       960M  299M  662M  32% /boot
tmpfs          tmpfs     3.0G  4.0K  3.0G   1% /run/user/0

repquota -a returns nothing
Bash:
repquota -a

Bash:
cat /proc/mounts
proc /proc proc rw,nosuid,nodev,noexec,relatime,gid=1000,hidepid=invisible 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
devtmpfs /dev devtmpfs rw,nosuid,size=4096k,nr_inodes=3811121,mode=755,inode64 0 0
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev,inode64 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfs rw,nosuid,nodev,size=6105364k,nr_inodes=819200,mode=755,inode64 0 0
tmpfs /sys/fs/cgroup tmpfs rw,nosuid,nodev,noexec,size=4096k,nr_inodes=1024,mode=755,inode64 0 0
cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd 0 0
pstore /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0
bpf /sys/fs/bpf bpf rw,nosuid,nodev,noexec,relatime,mode=700 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
cgroup /sys/fs/cgroup/hugetlb cgroup rw,nosuid,nodev,noexec,relatime,hugetlb 0 0
cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0
cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0
cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0
cgroup /sys/fs/cgroup/rdma cgroup rw,nosuid,nodev,noexec,relatime,rdma 0 0
cgroup /sys/fs/cgroup/pids cgroup rw,nosuid,nodev,noexec,relatime,pids 0 0
cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
cgroup /sys/fs/cgroup/misc cgroup rw,nosuid,nodev,noexec,relatime,misc 0 0
cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
/dev/sda3 / xfs rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=26,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=22698 0 0
hugetlbfs /dev/hugepages hugetlbfs rw,relatime,pagesize=2M 0 0
mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,nosuid,nodev,noexec,relatime 0 0
tracefs /sys/kernel/tracing tracefs rw,nosuid,nodev,noexec,relatime 0 0
none /var/lve/dbgovernor-shm tmpfs rw,nosuid,nodev,relatime,mode=777,inode64 0 0
none /run/credentials/systemd-sysctl.service ramfs ro,nosuid,nodev,noexec,relatime,mode=700 0 0
fusectl /sys/fs/fuse/connections fusectl rw,nosuid,nodev,noexec,relatime 0 0
configfs /sys/kernel/config configfs rw,nosuid,nodev,noexec,relatime 0 0
none /run/credentials/systemd-tmpfiles-setup-dev.service ramfs ro,nosuid,nodev,noexec,relatime,mode=700 0 0
/dev/sda1 /boot xfs rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
none /run/credentials/systemd-tmpfiles-setup.service ramfs ro,nosuid,nodev,noexec,relatime,mode=700 0 0
tmpfs /run/user/0 tmpfs rw,nosuid,nodev,relatime,size=3052680k,nr_inodes=763170,mode=700,inode64 0 0
/dev/sda3 /usr/share/cagefs-skeleton xfs rw,nosuid,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
devpts /usr/share/cagefs-skeleton/dev/pts devpts rw,nosuid,relatime,gid=5,mode=620,ptmxmode=000 0 0
/dev/sda3 /usr/share/cagefs-skeleton/lib xfs ro,nosuid,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
/dev/sda3 /usr/share/cagefs-skeleton/lib64 xfs ro,nosuid,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
/dev/sda3 /usr/share/cagefs-skeleton/opt xfs rw,nosuid,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
/dev/sda3 /usr/share/cagefs-skeleton/usr/include xfs ro,nosuid,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
/dev/sda3 /usr/share/cagefs-skeleton/usr/lib xfs ro,nosuid,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
/dev/sda3 /usr/share/cagefs-skeleton/usr/lib64 xfs ro,nosuid,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
/dev/sda3 /usr/share/cagefs-skeleton/usr/local/lsws xfs rw,nosuid,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
/dev/sda3 /usr/share/cagefs-skeleton/usr/share/i360-php-opts xfs ro,nosuid,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
/dev/sda3 /usr/share/cagefs-skeleton/usr/share/l.v.e-manager/cl.nodejs xfs rw,nosuid,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
/dev/sda3 /usr/share/cagefs-skeleton/usr/share/l.v.e-manager/cl.python xfs rw,nosuid,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
/dev/sda3 /usr/share/cagefs-skeleton/usr/share/locale xfs ro,nosuid,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
/dev/sda3 /usr/share/cagefs-skeleton/usr/share/man xfs ro,nosuid,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
/dev/sda3 /usr/share/cagefs-skeleton/usr/share/terminfo xfs ro,nosuid,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
/dev/sda3 /usr/share/cagefs-skeleton/usr/share/vim xfs ro,nosuid,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
/dev/sda3 /usr/share/cagefs-skeleton/usr/share/zoneinfo xfs ro,nosuid,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
/dev/sda3 /usr/share/cagefs-skeleton/var/imunify360/files/sigs xfs ro,nosuid,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
/dev/sda3 /usr/share/cagefs-skeleton/var/lib/mysql xfs rw,nosuid,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
/dev/sda3 /usr/share/cagefs-skeleton/var/lib/proxyexec/cagefs.sock xfs rw,nosuid,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
/dev/sda3 /usr/share/cagefs-skeleton/var/passenger xfs rw,nosuid,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
tmpfs /usr/share/cagefs-skeleton/run/dbus tmpfs rw,nosuid,size=6105364k,nr_inodes=819200,mode=755,inode64 0 0
tmpfs /usr/share/cagefs-skeleton/run/imunify360_user tmpfs rw,nosuid,size=6105364k,nr_inodes=819200,mode=755,inode64 0 0
/dev/sda3 /usr/share/cagefs-skeleton/var/spool/at xfs rw,nosuid,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
/dev/sda3 /usr/share/cagefs-skeleton/var/www/cgi-bin xfs rw,nosuid,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
/dev/sda3 /usr/share/cagefs-skeleton/var/www/html xfs rw,nosuid,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
/dev/sda3 /usr/share/cagefs-skeleton/var/lve/lveinfo.ver.cagefs xfs ro,nosuid,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
tmpfs /usr/share/cagefs-skeleton/run/systemd/journal/dev-log.cagefs tmpfs rw,nosuid,size=6105364k,nr_inodes=819200,mode=755,inode64 0 0
proc /usr/share/cagefs-skeleton/proc proc rw,nosuid,relatime,gid=1000,hidepid=invisible 0 0
systemd-1 /usr/share/cagefs-skeleton/proc/sys/fs/binfmt_misc autofs rw,nosuid,relatime,fd=26,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=22698 0 0
 
I followed official guide by DA on xfs: https://docs.directadmin.com/operat...uotas.html#how-to-enable-quota-support-on-xfs

And still I end up having noquota after reboot. And grub /boot/grub2/grub.cfg contains additional: rootflags=uquota,pquota

My GRUB_CMDLINE_LINUX=, looks like this:
Bash:
# This section was generated by a script. Do not modify the generated file - all changes
# will be lost the next time file is regenerated. Instead edit the BootLoaderSpec files.
#
# The blscfg command parses the BootLoaderSpec files stored in /boot/loader/entries and
# populates the boot menu. Please refer to the Boot Loader Specification documentation
# for the files format: https://systemd.io/BOOT_LOADER_SPECIFICATION/.

# The kernelopts variable should be defined in the grubenv file. But to ensure that menu
# entries populated from BootLoaderSpec files that use this variable work correctly even
# without a grubenv file, define a fallback kernelopts variable if this has not been set.
#
# The kernelopts variable in the grubenv file can be modified using the grubby tool or by
# executing the grub2-mkconfig tool. For the latter, the values of the GRUB_CMDLINE_LINUX
# and GRUB_CMDLINE_LINUX_DEFAULT options from /etc/default/grub file are used to set both
# the kernelopts variable in the grubenv file and the fallback kernelopts variable.
if [ -z "${kernelopts}" ]; then
  set kernelopts="root=UUID=3f0a1176-e16b-4e2a-8d2a-5136974fde21 ro crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M resume=UUID=4460efc2-e248-4bd1-8987-0b648480bbd0 systemd.unified_cgroup_hierarchy=0 rootflags=uquota,pquota
systemd.unified_cgroup_hierarchy=1 psi=1 rootflags=uquota,pquota"
fi

Seems like quota lines were already there by default.
Bash:
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=1G-4G:192M,4G-64G:256M,64G-:512M resume=UUID=4460efc2-e248-4bd1-8987-0b648480bbd0 systemd.unified_cgroup_hierarchy=0 rootflags=uquota,pquota"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true
GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_DEFAULT} rootflags=uquota,pquota systemd.unified_cgroup_hierarchy=1 psi=1"

FYI: my distro is cloudlinux 9.3
Code:
/proc/version
Linux version 5.14.0-362.18.1.el9_3.x86_64 ([email protected]) (gcc (GCC) 11.4.1 20230605 (Red Hat 11.4.1-2), GNU ld version 2.35.2-42.el9) #1 SMP PREEMPT_DYNAMIC Mon Jan 29 07:05:48 EST 2024

And fstab contains different uquota,gquota params, the gquota is different:
Code:
cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Thu Feb 15 10:15:51 2024
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
UUID=3f0a1176-e16b-4e2a-8d2a-5136974fde21            /            xfs    defaults,uquota,gquota    0 0
UUID=636204ca-50c3-419c-831e-188cd7707fcd /boot                   xfs     defaults        0 0
UUID=4460efc2-e248-4bd1-8987-0b648480bbd0 none                    swap    defaults        0 0

But I still get error:
Bash:
cloudlinux-limits --json
JSON:
{"cageFS": "enabled", "errors": {"quota": "Quotas not activated on this system"}, "items": 5, "mySqlGov": "enabled", "quota": "error", "resellers": [{"limits": {}, "name": "reselleris"}], "result": "success", "timestamp": 1708791718.5128517, "users": [{"cageFS": "enabled", "domain": "lithosting.lt", "id": 1005, "limits": {"cpu": {"all": "100", "mysql": "400"}, "ep": "20", "io": {"all": "1024", "mysql": "1953124"}, "iops": "1024", "nproc": "100", "pmem": "1073741824", "vmem": "0"}, "mySqlGov": "watched", "mySqlRestricted": "unrestricted", "package": "user1", "reseller": "proweb", "username": "host1lt"}, {"cageFS": "enabled", "domain": "lithost.lt", "id": 1007, "limits": {"cpu": {"all": "100", "mysql": "400"}, "ep": "20", "io": {"all": "1024", "mysql": "1953124"}, "iops": "1024", "nproc": "100", "pmem": "1073741824", "vmem": "0"}, "mySqlGov": "watched", "mySqlRestricted": "unrestricted", "package": "Domains", "reseller": "reselleris", "username": "reselleris"}, {"cageFS": "enabled", "domain": "xxxxxx.xxx", "id": 1010, "limits": {"cpu": {"all": "100", "mysql": "400"}, "ep": "20", "io": {"all": "1024", "mysql": "1953124"}, "iops": "1024", "nproc": "100", "pmem": "1073741824", "vmem": "0"}, "mySqlGov": "watched", "mySqlRestricted": "unrestricted", "package": "user1", "reseller": "proweb", "username": "judu33"}, {"cageFS": "enabled", "domain": "atsargines-dalys.lt", "id": 1011, "limits": {"cpu": {"all": "100", "mysql": "400"}, "ep": "20", "io": {"all": "1024", "mysql": "1953124"}, "iops": "1024", "nproc": "100", "pmem": "1073741824", "vmem": "0"}, "mySqlGov": "watched", "mySqlRestricted": "unrestricted", "package": "user1", "reseller": "proweb", "username": "parking"}, {"cageFS": "disabled", "domain": "-", "id": 0, "limits": {"cpu": {"all": "100", "mysql": "400"}, "ep": "20", "io": {"all": "1024", "mysql": "1953124"}, "iops": "1024", "nproc": "100", "pmem": "1073741824", "vmem": "0"}, "mySqlGov": "watched", "mySqlRestricted": "unrestricted", "package": "default", "reseller": "-", "username": "-"}]}
 
Check the file /etc/default/grub for the following line:
Code:
GRUB_ENABLE_BLSCFG= true
Then run :
Code:
grubby --args="rootflags=uquota,pquota" --update-kernel=ALL

and restart your server

This is what I use on my Alma/Rocky Linux 9 servers without any problems.
Note that I am not responsible if the server fails to restart.
 
Hey thank you very much, it helped. How did you figured it out? :) Would be nice to know the thought, search and read flow you wen't through to figure this out :)
 
Back
Top