| ||
| ||
The xfs file system is different than the previous ext3/ext4 file systems. This guide will be closely related to the standard quota setup guide, except that xfs may have a few extra steps that require more manual intervention. If you need quotas setup on the /home partition, then the guide should be very similar to the standard quota setup guide. However, if you need quotas setup on /, where / uses use an XFS partition (/home is only a directory under /), then extra steps are required. As well, we replace the grpquota with pquota (project quotas), which will allow DA to setup directoy quotas, for things like enforcement of per-domain disk quotas. To confirm what setup you have, run the df commmand, eg: [root@es7-64 ~]# df -h 0) Next confirm that / is actually using the xfs file system: [root@es7-64 ~]# mount | grep ' / ' If you don't see noquota, then you should be able to follow the standard quota setup guide, but adding uquota,pquota to the /etc/fsab, after the default option. If you see "noquota" in the xfs mount options for the / partition 1) Because "noquota" is a default kernel mounting option, we must change it in the kernel boot options. Edit the file: /etc/default/grub 2) Find the line with the variable "GRUB_CMDLINE_LINUX", that might look like this (it may not look exactly the same, don't worry): GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos/root crashkernel=auto vconsole.keymap=us rhgb quiet" 3) We're going to put a "rootflags=" variable at the end of the line - And add uquota,pquota as the values It might look something like this: 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" 4) Now, based on that setup, we'll backup, then create a new grub.cfg file: cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg.orig /boot/efi/EFI/centos/grub.cfg 5) Lastly, we must reboot the box in order for the kernel to see these new options reboot 6) We keep our fingers crossed that the box comes back, and login again. Go back to step 0) to check the mounting options to ensure that "noquota" is gone, eg: [root@es7-64 ~]# mount | grep ' / ' If you don't see, them, then add them to the / partition with the standard quota setup guide. 7) Ensure that DirectAdmin has xfs quotas enabled in the directadmin.conf: cd /usr/local/directadmin 8) If there are already Users created in DA, then you'll also want to reset their quota limits: echo "action=rewrite&value=quota" >> /usr/local/directadmin/data/task.queue to ensure their upper disk usage limits are enforced.CloudLinux / DigitalOceanReport that /etc/default/grub may be ignored for these setups. The file /etc/rc.d/init.d/kexec applies instead (untested): https://docs.cloudlinux.com/index.html?digitalocean.html where you'd add the rootflags=uquota,pquota to the end of the line that start with kexec -l | ||
Related Helpfiles | ||
Disk Usage is showing 0.00 or is too low | ||
xfs_quota: cannot set limits: Function not implemented |
© 2018 JBMC Software, Suite 173 3-11 Bellerose Drive, St Albert, AB T8N 1P7 Canada. Mon-Fri 9AM-5PM MST