LPIC 104.4 Manage disk quotas

Weight: 1

Description: Candidates should be able to manage disk quotas for users.

Key Knowledge Areas:

  • Set up a disk quota for a filesystem
  • Edit, check and generate user quota reports

Terms and Utilities:

  • quota
  • edquota
  • repquota
  • quotaon

  • use yum install quota to install quota package
  • not set quotas on root(/) filesystem
  • quotas are filesystem(partition) based

Quota Concepts

  • soft limit - a limit can be exceeded which results warnings
  • hard limit - higher than soft limit and cannot be exceeded
  • grace period - 宽限期

Configuring Quotas

  • Edit the /etc/fstab file and add usrquota and grpquota mount options.
  • Remount partition to take effect mount –o remount,rw /data
  • Verify new options are available from mount command output mount | grep quota
  • Update(generate) the aquota.* files with the command quotacheck -avugc
  • Set quota for user edquota -u user
  • Set quota for group edquota -g group
  • Set grace period for partition edquota -t
  • Set grace period for user edquota -T user
  • View quota reports repquota -a