免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2082 | 回复: 0
打印 上一主题 下一主题

[存储备份] 磁盘限额 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-07-29 17:24 |只看该作者 |倒序浏览

在AIX系统中,限制一个用户对文件系统的磁盘空间使用,可以采用限额技术。
AIX的DISK QUOTAS 是基于Berkley Disk Quota Syetem的。
设置过程经过以下几个步骤:
1、使用CHFS命令,修改文件系统的配置。如为/home启用配额,使用以下命令:
chfs -a "quota=userquota,groupquota" /home
2、指定限额配置文件名称
chfs -a "userquota=/home/quota.user" -a "groupquota=/home/quota.group"
以上的文件系统属性修改之后,体现在 /etc/filesystems 文件中 /home 节
/home:
        dev             = /dev/hd1
        vfs             = jfs
        log             = /dev/hd8
        mount           = true
        check           = true
        vol             = /home
        free            = false
        quota           = userquota,groupquota
3、生产限额配置文件
quotacheck -a -v
  会在/home文件系统的主目录下生成两个文件:/home/quota.user  /home/quota.group
ibm43P:root>pwd
/home
ibm43P:root>ls -l
total 50
drwxr-xr-x   2 alexchan staff           512 Sep 04 15:54 alexchan
drwxr-xr-x   2 dbaao    DBAAO           512 Jul 25 10:02 dbaao
drwxr-xr-x   2 dbsso    DBSSO           512 Jul 25 10:02 dbsso
drwxr-xr-x   2 guest    usr             512 Aug 26 2005  guest
drwx------   2 root     system          512 May 23 15:43 lost+found
drwxr-xr-x   2 notes    notes           512 May 24 10:02 notes
drwxr-xr-x   2 notes3   notes           512 May 25 15:47 notes3
-rw-r-----   1 root     system        32064 Sep 04 15:59 quota.group
-rw-r-----   1 root     system         9664 Sep 04 15:59 quota.user

drwxr-xr-x   2 root     system          512 Aug 31 09:33 scripts
4、配用限额对那些用户生效,如用户alexchan
edquota -u alexchan
   修改相应的值,保存推出。
5、修改 /etc/rc 文件,增加以下内容:
echo "Starting Disk Quota Service..."
/usr/sbin/quotacheck -a
/usr/sbin/quotaon -a
echo "Disk Quota started! "
6.reboot 机器,一切OK。

重点:配置文件 /etc/filesystems、quota.user和quota.group文件的生成与配置。
还有,每次修改限额配置之后,一定要执行 quotacheck -a -v 命令

用户限额配置的复制  
edquota -p alexchan testuser   命令可实现激alexchan的配置应用于testuser用户。同样也适用于组复制。

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/74291/showart_1096200.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP