【Solaris】Solaris檔案系統管理6 磁碟配額管理
Solaris檔案系統管理6
磁碟配額管理
1 UFS檔案系統磁碟配額使用
1.1 使檔案系統支援配額功能
編輯/etc/vfstab檔案,在/export/home 掛載選項增加rq標記
[root@solaris188:/]#cp /etc/vfstab /etc/vfstab.bak
[root@solaris188:/]#vi /etc/vfstab
/dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /export/home ufs 2 yes rq
[root@solaris188:/]#cat /etc/vfstab | grep rq
重新掛載檔案系統
[root@solaris188:/]#mount -o remount /export/home
1.2 在檔案系統根目錄建立配額檔案
使用root使用者,在/export/home下建立名為quotas的檔案,該檔案所有者為root,其他使用者不能對它進行寫操作。
[root@solaris188:/]#cd /export/home
[root@solaris188:/export/home]#touch quotas
[root@solaris188:/export/home]#chmod 600 quotas
1.3 對使用者做配額限制
編輯tom使用者配額項,使用i節點做限制
[root@solaris188:/]#edquota tom
fs /export/home blocks (soft = 0, hard = 0) inodes (soft = 10, hard = 15)
檢視tom的配額限制
[root@solaris188:/]#quota -v tom
對檔案系統開啟配額功能 (關閉使用quotaoff)
[root@solaris188:/]#quotaon -av /export/home
同步檔案系統配額,再次檢視tom配額情況
[root@solaris188:/export/home]#quotacheck -av /export/home
[root@solaris188:/export/home]#quota -v tom
當前檔案6,軟限制10,硬限制15
1.4 tom使用者建立新檔案
[tom@solaris188:/export/home/tom]$touch file1
[tom@solaris188:/export/home/tom]$touch file2
[tom@solaris188:/export/home/tom]$touch file3
[root@solaris188:/]#quota -v tom
即將達到軟限制,繼續建立檔案
[tom@solaris188:/export/home/tom]$touch file4
建立檔案達到軟限制時,會顯示warning,但仍可以繼續建立檔案。
[root@solaris188:/]#quota -v tom
繼續建立檔案,達到應限制時報錯,不能建立
[tom@solaris188:/export/home/tom]$touch file5
[tom@solaris188:/export/home/tom]$touch file6
[tom@solaris188:/export/home/tom]$touch file7
[tom@solaris188:/export/home/tom]$touch file8
[tom@solaris188:/export/home/tom]$touch file9
[root@solaris188:/]#quota -v tom
1.5 複製磁碟配額設定
將tom配置複製給bob
[root@solaris188:/]#edquota -p tom bob
[root@solaris188:/]#quota -v bob
檢視檔案系統上使用者配額使用情況
[root@solaris188:/]#repquota -av
修改預設計時器 (不會影響當前的配額違反者)
[root@solaris188:/]#edquota -t
fs /export/home blocks time limit = 2 weeks, files time limit = 16 day
bob使用者建立檔案超過軟限制
[bob@solaris188:/export/home/bob]$touch file1 file2 file3 file4 file5
[root@solaris188:/]#repquota -av
1.6 關閉磁碟配額
[root@solaris188:/]#quotaoff -av /export/home
刪除配額檔案
[root@solaris188:/export/home]#rm quotas
2 開啟/關閉 ZFS磁碟配額
檢視當前檔案系統
[root@solaris188:/]#zfs list
檢視磁碟配額屬性
[root@solaris188:/]#zfs get quota
設定testpool/home/sandy配額為300m
[root@solaris188:/]#zfs set quota=300m testpool/home/sandy
[root@solaris188:/]#zfs list
[root@solaris188:/]#zfs get quota
取消對testpool/home/sandy的配額限制
[root@solaris188:/]#zfs set quota=none testpool/home/sandy
[root@solaris188:/]#zfs list
[root@solaris188:/]#zfs get quota
呂星昊
2016.1.8
?
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29475508/viewspace-1973841/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【Solaris】Solaris檔案系統管理2 SWAP交換分割槽管理
- 【Solaris】Solaris檔案系統管理1 UFS檔案系統的建立
- 【Solaris】Solaris檔案系統管理3 ZFS檔案系統的建立
- Solaris 檔案系統管理(轉)
- solaris11調整檔案系統配額
- 【Linux】Linux檔案系統管理7 磁碟配額管理Linux
- 【Solaris】Solaris檔案系統管理4 ZFS檔案系統備份、刪除與恢復
- 【Solaris】Solaris檔案系統管理5 ZFS檔案系統擴充套件池與檢查池套件
- 【Solaris】Solaris10作業系統 SMF服務管理作業系統
- 『學了就忘』Linux檔案系統管理 — 63、磁碟配額介紹Linux
- 系統管理指南:Oracle Solaris Containers-資源管理和 Oracle Solaris ZonesOracleAI
- 磁碟管理與檔案系統
- 【Solaris】solairs 磁碟大於1TB管理AI
- 『學了就忘』Linux檔案系統管理 — 64、磁碟配額的配置步驟Linux
- 檔案系統操作與磁碟管理
- Solaris 程式管理(轉)
- HP-UX磁碟管理與檔案系統UX
- K8S-磁碟配額管理-整理K8S
- 在Linux中,如何管理磁碟配額?Linux
- Linux磁碟管理與檔案系統(關於磁碟方面)Linux
- Solaris 軟體包管理(轉)
- Linux 磁碟分割槽及檔案系統管理Linux
- 安裝及使用quota管理磁碟配額(轉)
- Solaris 系統命令(轉)
- solaris系統中有關 TCP/IP配置的檔案與命令TCP
- Solaris 10下根檔案系統滿的處理方法
- LVM與磁碟配額管理 so easy come onLVM
- Linux—磁碟配額,管理LVM邏輯卷LinuxLVM
- 檔案系統&&磁碟管理(六)–swap分割槽、迴環裝置、檔案系統配置檔案fstab
- AIX,HP-UX,LINUX,SOLARIS磁碟與卷管理常用命令AILinux
- Solaris 更改系統語言
- R檔案系統管理
- 檔案管理系統 (轉)
- Linux Centos系統 磁碟分割槽和檔案系統管理 (深入理解)LinuxCentOS
- Solaris使用與管理之實踐(Day 1)
- solaris網路管理基礎培訓(轉)
- 【Solaris】Solaris10作業系統 修改ip地址、主機名作業系統
- Solaris 10 系統維護(轉)