免费注册 查看新帖 |

Chinaunix

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

[FreeBSD] edquota编辑后不能立即生效的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-11-03 12:46 |只看该作者 |倒序浏览
系统已经支持quota,并已经生效。

用edquota -u web01 做磁盘配额编辑。
Quotas for user web01:
/usr: kbytes in use: 40, limits (soft = 500000, hard = 550000)
        inodes in use: 20, limits (soft = 0, hard = 0)
~
保存退出后。
提示:/tmp/EdP.an1uVG: 3 lines, 135 characters.
但没有立即应用。

#quota -u web01
Disk quotas for user web01 (uid 8890): none


不知道大家遇到这样情况没有?

论坛徽章:
1
寅虎
日期:2013-09-29 23:15:15
2 [报告]
发表于 2006-11-03 13:14 |只看该作者
贴一下mount输出或/etc/fstab.

论坛徽章:
0
3 [报告]
发表于 2006-11-03 13:21 |只看该作者
# cat /etc/fstab
# See the fstab(5) manual page for important information on automatic mounts
# of network filesystems before modifying this file.
#
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/da0s2b             none            swap    sw              0       0
/dev/da0s1a             /               ufs     rw              1       1
/dev/da0s4e             /usr            ufs     rw,userquota,groupquota         2       2
/dev/da0s3e             /var            ufs     rw              2       2
/dev/acd0c              /cdrom          cd9660  ro,noauto       0       0
proc                    /proc           procfs  rw              0       0

论坛徽章:
1
寅虎
日期:2013-09-29 23:15:15
4 [报告]
发表于 2006-11-03 13:35 |只看该作者
运行quotacheck -a 再看看.

论坛徽章:
1
寅虎
日期:2013-09-29 23:15:15
5 [报告]
发表于 2006-11-03 13:42 |只看该作者
正常情况下,设置几个地方就OK:
1. kernel
2. rc.conf:enable_quotas="YES"
3. fstab
4. quota.user, quota.group

论坛徽章:
0
6 [报告]
发表于 2006-11-03 13:52 |只看该作者
使用quotacheck -av 后仍然没生效。


以前的web02是正常的。
# quota -u web02
Disk quotas for user web02(uid 889:
     Filesystem   usage   quota   limit   grace   files   quota   limit   grace
           /usr   22524  300000  330000            5122       0       0        

我用edquota -p web02 -u web01 可以。但手工编辑edquota -u web01 扩到500M就不行。

[ 本帖最后由 hpunix 于 2006-11-3 13:55 编辑 ]

论坛徽章:
1
寅虎
日期:2013-09-29 23:15:15
7 [报告]
发表于 2006-11-03 14:05 |只看该作者
怎会这样?试了一下没出现所说的问题,而且马上生效.
# edquota -u congli

  1. Quotas for user congli:
  2. /home: kbytes in use: 27088946, limits (soft = 5000000, hard = 5500000)
  3.         inodes in use: 20858, limits (soft = 0, hard = 0)
复制代码

# quota -u congli
  1. Disk quotas for user congli (uid 1000):
  2.      Filesystem   usage   quota   limit   grace   files   quota   limit   grace
  3.           /home27088946*5000000 5500000   2days   20858       0       0        
复制代码

论坛徽章:
0
8 [报告]
发表于 2006-11-03 14:22 |只看该作者
唉,谁说不是呢,以前edquota也正常,现在确无效。好像我编辑是一个影子文件。

操作前
# quota -u web01
Disk quotas for user web01 (uid 8891):
     Filesystem   usage   quota   limit   grace   files   quota   limit   grace
           /usr  562632* 200000  220000   7days    5021       0       0      

操作
# edquota web01
Quotas for user web01:
/usr: kbytes in use: 562632, limits (soft = 500000, hard = 550000)   
        inodes in use: 5021, limits (soft = 0, hard = 0)

#提示:/tmp/EdP.aPRJ6L: 3 lines, 142 characters.

#cat /tmp/EdP.aPRJ6L
Quotas for user web01:
/usr: kbytes in use: 562632, limits (soft = 500000, hard = 550000)
        inodes in use: 5021, limits (soft = 0, hard = 0)
操作后
# quota -u web01
Disk quotas for user web01 (uid 8891):
     Filesystem   usage   quota   limit   grace   files   quota   limit   grace
           /usr  562632* 200000  220000   7days    5021       0       0

论坛徽章:
1
寅虎
日期:2013-09-29 23:15:15
9 [报告]
发表于 2006-11-03 14:32 |只看该作者
呵~这等好事也让你遇上,
把限制改为0会如何呢? 能生效吗?
还有EDITOR变量是?

论坛徽章:
0
10 [报告]
发表于 2006-11-03 15:09 |只看该作者
改0也不行。

# env | grep EDI
EDITOR=vi
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP