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/fstab
file 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 user
oredquota -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/disk
Disable quota:
quotaoff -ug /media/disk
-
Verify with the user mike (ensure write permissions):
Disk quota is a feature of the ext4 file system