yum -y install quota-* //安装磁盘配额工具
useradd mail1 //
passwd 123456
mount -o usrquota,grpquota /dev/md0 /var/spool/mail //以支持配额的方式挂载分区
setenforce 0 //临时关闭selinux
quotacheck -cug /var/spool/mail //生存配额文件
edquota -u mail1 //编辑mail1用户配额设置
repquota -v /var/spool/mail //查看目录配额情况
quotaon -ugv /var/spool/mail //启动配额功能
su mail1 //切换到mail1添加文件测试配额是否成功
quota -u mail1
cd /var/spool/mail
dd if=/dev/zero of=file1 bs=1M count=10 //添加一个10M的文件,名为file1
vi /etc/fstab
/dev/md0 /var/spool/mail ext4 default,usrquota,grpquota 0 0 开机自动挂载支持配额功能
quotaoff -u zhangsan 停用磁盘配额!