104.4 Manage Disk Quotas
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.
Disk quotas allow system administrators to allocate the maximum amount of disk space a user or group's files and data may take up on a machine. This functionality can be crucial on a Linux machine that is used as a file server to prevent the hard disks from filling up and causing system instability.
The quota tools allow administrators to set up quotas without having to reboot. Here are the steps.
Edit /etc/fstab and add usrquota to the options
Remount the partition:
# mount -o remount <device>
Start the quota stats:
# quotacheck -ca
The preliminary aquota.user database file is generated at the top of the directory.
Editing and Quota Reporting
Edit quotas for each user:
# edquota -u <user>
Here a soft/hard limit must be set for both the number of blocks and inodes available for each user.
The system will allow the user to exceed the soft limit during a certain grace period. After the grace period has expired the soft limit will be enforced as a hard limit.
Start enforcing quotas:
# quotaon -a
Users can query the quota status with quota. The system administrator can generate reports with repquota or quotastats.
Used files, terms and utilities: