March 8, 2009
How to: Configure disk quotas on CentOS 5
Quota is installed by default.
To check if quota is enabled in the kernel, run this command:
# grep CONFIG_QUOTA /boot/config-`uname -r`
if quota is enabled, then the result is
CONFIG_QUOTA=y CONFIG_QUOTACTL=y
To check if quota is installed
# rpm -q quota
To configure quota to user1 on /home having 80000M for soft and 100000M for hard
- Add usrquota and grpquota to the home directory in fstab
# vi /etc/fstab
- Add the following line:
/dev/hda10 /home ext3 defaults,usrquota,qrpquota 1 2
- Reboot the system or run this command
# mount -o remount /home
- Create quota files
# quotacheck -cugm /home
- Set disk quotas for user1
# edquota -u user1
- Under the soft and hard columns, change the 0 to 80000 and 100000, respectively.
To set the grace period
# edquota -t
To display quotas
# repquota -aRHCE Red Hat Certified Engineer Linux Study Guide (Exam RH302) (Certification Press)


