Inode: #1569 (5 blocks, 5 extents)
#
上面四行
明的是
project
并未支持
Blocks grace time: [7 days 00:00:30]
#
底下
grace time
Inodes grace time: [7 days 00:00:30]
Realt
ime Blocks grace time: [7 days 00:00:30]
在默认的情况下,
xfs_quota
report
指令会½支持的
user/group/prject
相关数据列出来,如果只
是想要某个特定的项目,
例如我们上面要求½列出用户的数据时,就在
report
后面加上
-u
即可喔!
这样就能够观察目前的相关设定信息了。
要注意,限制的项目有
block/inode
同时可以针对每个项
目来设定
soft/hard
喔!½下来实际的设定看看吧!
14.1.5
实作
Quota
流程
-3
:限制值设定方式
确认文件系统的
quota
支持顺利启用后,也能够观察到相关的
quota
限制,½下来就是要实际的给
予用户
/
群组限制啰!
回去瞧瞧,我们需要每个用户
250M/300M
的容量限制,群组共
950M/1G
容量限制,同时
grace time
设定为
14
天喔!
实际的语法与设定流程来瞧瞧:
[root@study ~]#
xfs_quota
-
x
-
c "limit [
-
ug] b[soft|hard]=N i[soft|hard]=N name"
[root@study ~]#
xfs_quota
-
x
-
c "timer [
-
ug] [
-
bir] Ndays"
选项
参数
limit
实际
限制的
目,可以
针对
user/group
限制,限制的
目有
bsoft/bhard : block
soft/hard
限制值,可以加
isoft/ihard : inode
soft/hard
限制值
name :
就是用
/
的名
啊!
timer
:用
来设
grace time
目喔,也是可以
针对
user/group
以及
block/inode
范例一:
定好用
户们
block
限制值
(
目中
有要限制
inode
啦!
)
[root@study ~]#
xfs_quota
-
x
-
c "limit
-
u bsoft=250M bhard=300M myquota1" /home
[root@study ~]#
xfs_quota
-
x
-
c "limit
-
u bsoft=250M bhard=300M myquota2" /home
[root@study ~]#
xfs_quota
-
x
-
c "limit
-
u bsoft=250M bhard=300M myquota3" /home
[root@study ~]#
xfs_quota
-
x
-
c "limit
-
u bsoft=250M bhard=300M myquota4" /home
[root@study ~]#
xfs_quota
-
x
-
c "limit
-
u bsoft=250M bhard=300M myquota5" /home
[root@study ~]#
xfs_quota
-
x
-
c "report
-
ubih" /home
User quota on /home (/dev/mapper/centos
-
home)
Blocks Inodes
User ID Used Soft Hard Warn/Grace Used Soft Hard Warn/Grace
----------
--------------------
-------------
---------------------------------
myquota1 12K
250M 300M
00 [
------
] 7 0 0 00 [
------
]
范例二:
定好
myquotagrp
block
限制值
[root@study ~]#
xfs_quota
-
x
-
c "limit
-
g bsoft=950M bhard=1G myquotagrp" /home
[root@study ~]#
xfs_quota
-
x
-
c "report
-
gbih" /home
Group quota on /home (/dev/mapper/centos
-
home)
Blocks Inodes