Disk Quota Management in CentOS 7#
Excluding root users, for regular users
Experimental Steps#
- Add a new hard drive (partition, format, mount)
- Edit the
/etc/fstabfile to configure automatic mounting (rw, usrquota, grpquota) - Install quota tool:
yum -y install quota - Create quota file:
quotacheck -ug /media/disk - Edit user quotas or group quotas:
edquota -u useroredquota -g group
blocks: Limits based on file size
inodes: Limits based on the number of files
soft: Soft limit (warning)
hard: Hard limit (restriction)
-
Enable quota:
quotaon -ug /media/diskDisable quota:
quotaoff -ug /media/disk -
Verify with the user mike (ensure write permissions):
Disk quota is a feature of the ext4 file system