您的位置:首页 > 运维架构 > Linux

Linux磁盘配额具体配置

2011-07-03 15:41 295 查看
1.在/etc/fstab中需要设置磁盘限额的文件系统所在行的第四项(mount参数)中添加usrquota、grpquota参数
2.使用mount –o remount 需要限制的文件系统,将mount参数带入/etc/mtab中

3.执行quotacheck –auvg,在文件系统的根目录下建立aquota.user及aquota.group两文件
4. 使用edquota 用户名与edquota –g 组名编辑用户与组的磁盘限额
5. 用quotaon –auvg打开quota功能

具体步骤:

•首先在/etc/fstab中加入quota参数
/dev/hda7 /home ext3 defaults,usrquota,grpquota 0 0
usrquota :对用户作磁盘限额
grpquota :对组作磁盘限额
•使用remount将参数带入/etc/mtab中
[root @stationxx root] # mount –o remount /home

•建立磁盘限额配置文件
[root @stationxx root] # quotacheck –auvg /home
创建aquota.user及aquota.group两文件
•配置磁盘限额
[root @stationxx root] # edquota username
[root @stationxx root] # edquota –g groupname
•打开磁盘限额功能
[root @stationxx root] # quotaon –auvg
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息