Category: Enabling Quotas in CentOS7

Share this post...Tweet about this on TwitterShare on Google+0Share on Facebook0

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

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

Generate the new grub configuration:

grub2-mkconfig -o /boot/grub2/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)
Dec 30, 2014, 12:57 pmBy: InterWorx
Enabling Quotas in CentOS7
44 votes, 1.45 avg. rating (29% score)
(0) Comments

Leave a Reply
Surround code blocks with <pre>code</pre>

Your email address will not be published.

Comments

Broken Link