11
查看配额
[root@localhost ~]# repquota -au
*** Report for user quotas on device /dev/sda3
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
root -- 24 0 0 3 0 0
zxw -- 32 0 0 8 0 0
vbird1 -- 32 8000 10000 8 0 0
vbird2 -- 32 8000 10000 8 0 0
vbird3 -- 32 8000 10000 8 0 0
vbird4 -- 32 8000 10000 8 0 0
vbird5 -- 32 8000 10000 8 0 0
12
开始测试
[vbird1@localhost ~]$ ll -h
total 7.6M
-rw-rw-r--. 1 vbird1 vbird1 1.7M Dec 2 14:01 cont.txt
-rw-r--r--. 1 root root 49K Dec 2 13:59 install.log
-rw-rw-r--. 1 vbird1 vbird1 5.8M Dec 2 14:02 v.txt
[vbird1@localhost ~]$
vb1写文件到达到软限制
[vbird1@localhost ~]$ nl cont.txt >> v.txt
sda3: warning, user block quota exceeded.
达到软限制,警告
[vbird1@localhost ~]$ ll -h
total 9.5M
-rw-rw-r--. 1 vbird1 vbird1 1.7M Dec 2 14:01 cont.txt
-rw-r--r--. 1 root root 49K Dec 2 13:59 install.log
-rw-rw-r--. 1 vbird1 vbird1 7.7M Dec 2 14:02 v.txt
vb1写文件到达到硬限制
[vbird1@localhost ~]$ nl cont.txt >> v.txt
sda3: write failed, user block limit reached.
nl: write error: Disk quota exceeded
达到硬限制,报错
[vbird1@localhost ~]$
[vbird1@localhost ~]$ ll -h
total 9.8M
-rw-rw-r--. 1 vbird1 vbird1 1.7M Dec 2 14:01 cont.txt
-rw-r--r--. 1 root root 49K Dec 2 13:59 install.log
-rw-rw-r--. 1 vbird1 vbird1 8.1M Dec 2 14:03 v.txt
vb1再写就不让写了
[vbird1@localhost ~]$ nl cont.txt >> v.txt
nl: write error: Disk quota exceeded
[vbird1@localhost ~]$ ll -h
total 9.8M
-rw-rw-r--. 1 vbird1 vbird1 1.7M Dec 2 14:01 cont.txt
-rw-r--r--. 1 root root 49K Dec 2 13:59 install.log
-rw-rw-r--. 1 vbird1 vbird1 8.1M Dec 2 14:03 v.txt