This tutorial will explain how to enable user quotas on Atlantic.Net’s cPanel Cloud Servers. Before we get into the details, let’s do some housekeeping:
Verified on 4/28/17 for cPanel on CentOS 7.2 64-bit
- Atlantic.Net Cloud Account
- SSH Program
- Atlantic.Net cPanel Server
Click here to sign up for your free account!
Don’t have one? Follow the guides below for how to SSH:
Follow this simple guide for how to quickly create a cPanel server:
Connecting to Your cPanel Server
Now it’s time to connect to your server via SSH:
ssh [email protected][IP Address]
Once you connect to your external device, you’ll see the following which is the RSA negotiation between both devices to ensure you’re connecting to the right host:
The authenticity of host '69.28.xx.xx (69.28.xx.xx)' can't be established. RSA key fingerprint is 75:98:a9:3d:f8:e7:48:bf:05:c9:1b:ea:xx:xx:xx:xx. Are you sure you want to continue connecting (yes/no)? yes
Check if Your System Has Quotas Enabled
Find the line that says
and if there is no quota enabled, it will say
... /dev/sda1 on / type xfs (rw,relatime,attr2,inode64,noquota) ...
Edit the default Grub file
By editing the default Grub file, we can specify that the file system should have quotas enabled when the system boots up.
Edit the default Grub file with your favorite editor:
Modify the following line from:
GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/root crashkernel=auto rhgb quiet rootflags=uquota,pquota"
Note: By default, our cPanel Cloud Servers do not have swap enabled. If you have enabled it, you can prepend rd.lvm.lv=centos/swap before rd.lvm.lv=centos/root.
The resulting file should look like this:
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="rd.lvm.lv=centos/root crashkernel=auto rhgb quiet rootflags=uquota,pquota" GRUB_DISABLE_RECOVERY="true"
Generate the New Grub Configuration File
Now that we have edited the default Grub file, we must use it to generate the Grub bootloader configuration file. First, let’s make a backup of our Grub configuration:
cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg.bak
grub2-mkconfig -o /boot/grub2/grub.cfg
If done correctly, the system will let you know you generated the file successfully.
Generating grub configuration file ... Found linux image: /boot/vmlinuz-3.10.0-327.10.1.el7.x86_64 Found initrd image: /boot/initramfs-3.10.0-327.10.1.el7.x86_64.img Found linux image: /boot/vmlinuz-0-rescue-17115f95ddd92d410be8cb803e2d845d Found initrd image: /boot/initramfs-0-rescue-17115f95ddd92d410be8cb803e2d845d.img done
In order for the new changes to take effect, let’s reboot the system:
Allow a minute or two for the cPanel server to reboot. Once it has rebooted, SSH back into the server.
ssh [email protected][IP Address]
Let’s check mount again to see if quota shows up now:
mount ... /dev/sda1 on / type xfs (rw,relatime,attr2,inode64,usrquota,prjquota) ...
As we can now see, user quotas and project quotas are now enabled. You have successfully completed enabling quotas on your Atlantic.Net cPanel Cloud Server!
Your next step is to log in to your cPanel’s WHM to setup quotas: https://[your IP address]:2087. There should no longer be any notification about enabling quotas.
Note: If cPanel is telling you quotas are still not enabled for the filesystem, please run the following command in an SSH terminal:
Questions? Comments? Concerns? Let us know in the comments below or email us at [email protected]!