• Pricing
  • Features
    • InterWorx
    • Clustering
    • Developers
  • Support
    • Overview
    • Blog
    • Documentation
    • InterWorx Forums
    • Version History
    • Help Desk
    • FAQ’s
  • Company
    • End User License Agreement
    • Privacy Policy
    • Our Brand
    • Contact Us
  • My Account
How to: Generate / Delete an API Key
November 15, 2012
Where are the InterWorx log files located?
March 18, 2015

Enabling Quotas in CentOS7

Published by InterWorx

The release of EL7 marks the shift from Ext4 to XFS as the default filesystem for RHEL-based distros like CentOS. While XFS brings many improvements and features to the OS, user and group quotas are no longer enabled by default on the root ('/') partition.

While quotas are an optional feature, they are recommended to get the full InterWorx experience. Follow these steps from the command line to enable quotas:

Enabling quotas requires restarting the server, which will cause downtime on production systems. If you plan to use quotas, it is recommended to enable them BEFORE installing InterWorx.

First, check if quotas are enabled:


mount | grep ' / '
You should see 'noquota' if quotas are disabled, for example:
# /dev/mapper/centos_el7-root on / type xfs (rw,relatime,attr2,inode64,noquota)
Next, edit /etc/default/grub:
vi /etc/default/grub[/code] Find the line beginning with GRUB_CMDLINE_LINUX and append the following:
rootflags=usrquota,grpquota
The line should end up looking something like this:
GRUB_CMDLINE_LINUX="rd.lvm.lv=centos_el7/root vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos_el7/swap crashkernel=auto  vconsole.keymap=us rhgb quiet rootflags=usrquota,grpquota"

Backup the grub configuration:
cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg.orig

For servers using EFI, the grub.cfg file is listed here:
 /boot/efi/EFI/centos/grub.cfg

Generate the new grub configuration:
grub2-mkconfig -o /boot/grub2/grub.cfg

For EFI, use this command:

grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
Reboot:
reboot
Verify success:
mount | grep ' / '
You should see quotas are now enabled:
/dev/mapper/centos_el7-root on / type xfs (rw,relatime,attr2,inode64,usrquota,grpquota)

Share
0

Related posts

December 6, 2019

Cloudflare partners plugin and Real Visitor IP Logging


Read more
August 12, 2019

How to Change the Primary IP Address from the Command Line


Read more
June 10, 2019

How to Set Individual/Per-Domain php.ini Configurations for PHP-FPM


Read more
© 2019 Interworx, LLC. All Rights Reserved.
      We use cookies to understand how you interact with our site, to personalize and streamline your experience, and to tailor advertising. By continuing to use our site, you accept our use of cookies and accept our Privacy Policy.