Linux磁盘配额(xfs)
这是在上篇磁盘管理下完成的
配置开机自启配置配额权限
/dev/sdb2 /part-xfs xfs defaults,uquota,gquopa 0 0
创建用户
[root@localhost ~]# useradd tom
设置配额
[root@localhost ~]# xfs_quota -x -c "limit bsoft=8M bhard=10M isoft=2 ihard=3 tom" /part-xfs/
设置用户权限
[root@localhost ~]# chmod 1777 /part-xfs/
验证
[tom@localhost part-xfs]$ ll -h total 0 [tom@localhost part-xfs]$ dd if=/dev/zero of=/part-xfs bs=11M count=1 dd: failed to open ‘/part-xfs’: Is a directory [tom@localhost part-xfs]$ dd if=/dev/zero of=/part-xfs/test bs=11M count=1 dd: error writing ‘/part-xfs/test’: Disk quota exceeded 1+0 records in 0+0 records out 8388608 bytes (8.4 MB) copied, 0.426546 s, 19.7 MB/s [tom@localhost part-xfs]$
作者:冘冗
-------------------------------------------
个性签名:独学而无友,则孤陋而寡闻。
如果觉得这篇文章对你有小小的帮助的话,记得在右下角点个“推荐”哦,博主在此感谢!