熱搜:win11繞過硬件限制安裝 一鍵重裝Win10系統(tǒng) 最干凈的u盤啟動盤 真正純凈版的win7系統(tǒng)
時間:2015-02-10 17:54:22 作者:qipeng 來源:系統(tǒng)之家 1. 掃描二維碼隨時看資訊 2. 請使用手機(jī)瀏覽器訪問: https://m.xitongzhijia.net/xtjc/20150210/37985.html 手機(jī)查看 評論 反饋
8、查找、安裝 quota
[root@localhost ~]# find / -name qutoacheck
。踨oot@localhost ~]#
[root@localhost ~]# rpm -qa | grep quota
quota-3.17-20.el6.x86_64
安裝
。踨oot@localhost ~]# yum -y install quota-3.17-20.el6.x86_64
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
base | 3.7 kB 00:00
base/primary_db | 4.6 MB 00:29
extras | 3.4 kB 00:00
extras/primary_db | 29 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 910 kB 00:05
Setting up Install Process
Nothing to do
。踨oot@localhost ~]#
9、開啟限制,生成用戶和組限制文件
。踨oot@localhost ~]# quotacheck -avug
quotacheck: Your kernel probably supports journaled quota but you are not using it. Consider switching to journaled quota to avoid running quotacheck after an unclean shutdown.
quotacheck: Scanning /dev/sda3 [/home] done
quotacheck: Cannot stat old user quota file /home/aquota.user: No such file or directory. Usage will not be substracted.
quotacheck: Cannot stat old group quota file /home/aquota.group: No such file or directory. Usage will not be substracted.
quotacheck: Cannot stat old user quota file /home/aquota.user: No such file or directory. Usage will not be substracted.
quotacheck: Cannot stat old group quota file /home/aquota.group: No such file or directory. Usage will not be substracted.
quotacheck: Checked 33 directories and 18 files
quotacheck: Old file not found.
quotacheck: Old file not found.
[root@localhost ~]# quotaon -avug
/dev/sda3 [/home]: group quotas turned on
/dev/sda3 [/home]: user quotas turned on
10、增加配額限制
[root@localhost ~]# edquota -u vbird1
Disk quotas for user vbird1 (uid 501):
Filesystem blocks soft hard inodes soft hard
/dev/sda3 32 8000 10000 8 0 0
單位是KB
。踨oot@localhost ~]# edquota -u vbird2
。。。
。踨oot@localhost ~]# edquota -p vbird1 vbird2 vbird3 vbird4 vbird5
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
。踲bird1@localhost ~]$
vb1寫文件到達(dá)到軟限制
。踲bird1@localhost ~]$ nl cont.txt 》》 v.txt
sda3: warning, user block quota exceeded.
達(dá)到軟限制,警告
。踲bird1@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寫文件到達(dá)到硬限制
[vbird1@localhost ~]$ nl cont.txt 》》 v.txt
sda3: write failed, user block limit reached.
nl: write error: Disk quota exceeded
達(dá)到硬限制,報錯
。踲bird1@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
。踲bird1@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
上面就是CentOS 6修改磁盤配額限制的方法介紹了,本文主要介紹的是CentOS增加磁盤配額限制方面的修改,如果你需要減少磁盤配額限制不可使用本文方法進(jìn)行修改。
發(fā)表評論
共0條
評論就這些咯,讓大家也知道你的獨(dú)特見解
立即評論以上留言僅代表用戶個人觀點(diǎn),不代表系統(tǒng)之家立場