标签:font data inf time soft file 启动 个数 sof
quota磁盘配额(user)1.开启配额功能:[root@localhost /]# mount -o usrquota /dev/sda5 /mnt/2.设置用户配额:[root@localhost /]# edquota -u robin /mnt3.查询配额的使用情况[root@localhost /]# repquota -u /mnt4.启动配额:[root@localhost mnt]# quotaon /mnt/
测试:
测试空间配额
su - robin
dd if=/dev/zero of=/mnt/data bs=120M count=1
dd: 写入"/mnt/data" 出错: 超出磁盘限额
测试文件个数配额
touch /mnt/abc{1..25}.txt
group配额:
group upup
useradd -g upup king
useradd -g upup zorro
1.开启组配额
[root@localhost /]# mount -o grpquota /dev/sda5 /mnt/
2.配置组配额
[root@localhost /]# edquota -g upup
Disk quotas for group upup (gid 1002):
Filesystem blocks soft hard inodes soft hard
/dev/sda5 0 51200 102400 0 10 20
3.查询配额的使用情况
[root@localhost /]# repquota -g /mnt
4.激活组配额
[root@localhost /]# quotaon -g /mnt/
测试:
[root@localhost ~]# su - king
[king@localhost mnt]$ dd if=/dev/zero of=/mnt/data1 bs=80M count=1
[root@localhost ~]# su - zorro
[zorro@localhost ~]$ dd if=/dev/zero of=/mnt/data2 bs=80M count=1
测试配额空间为共用
设置宽限时间
[root@localhost ~]# edquota -t
Grace period before enforcing soft limits for users:
Time units may be: days, hours, minutes, or seconds
Filesystem Block grace period Inode grace period
/dev/sda5 30seconds 7days
测试:
1.开启配额功能:
[root@localhost /]# mount -o usrquota /dev/sda5 /mnt/
2.设置用户配额:
[root@localhost /]# edquota -u robin /mnt
Disk quotas for user robin (uid 1000):
Filesystem blocks soft hard inodes soft hard
/dev/sda5 0 50M 100M 0 10 20
3.查询配额的使用情况
[root@localhost /]# repquota -u /mnt
4.启动配额:
[root@localhost mnt]# quotaon /mnt/
quota磁盘配额
标签:font data inf time soft file 启动 个数 sof
原文地址:https://www.cnblogs.com/MR-ws/p/11018919.html