Disk quota configuration
Achieve disk quota
1. Enable the disk quota mount option under the home home directory
Vim / etc/fstab
# you can call UUID through ringing blkid / dev/sdb1 under vim
UUID= "3dfbe3a8-6264-4ceb-a835-abebe14f3eaf" / home ext4 usrquota,grpquota 0 0
# use in boot mode
Mount / dev/sdb1 / home/
# if the fstab configuration file is modified, you can use:
Mount-o remount / dev/sdb1 / home/
Centos7 needs to be mounted or restarted like [root@centos7] # mount-o usrquota,grpquota / dev/sdb1 / home/
2. Create a user disk quota database
Quotacheck-cug / home / / if there is a permission problem, you can execute getenforce to check whether selinux is closed, and if it is on, execute setenforce 0 to close it.
Setenforce 0 / / centos 6 needs to be closed. Centos7 is closed by default.
3. Enable the database
Quotaon-p / home to see if the database is enabled
Quotaon / home enable database
4. Configure quota entries
Edquota wang
# edquota-p wang mage / / copy the hard disk quota configuration of wang users to mage users
Setquota tom 100000 150000 00 / home / / set tom user capacity 100m alarm up to 150m, if not enough to modify the configuration capacity
5. Test
Quota wang / / View disk quotas for wang users
Repquota / home / / View disk quotas for all users under home