«

»

20 2005

Print this 文章

RedHat上使用quota小结

我的试验:

环境–RedHat 9 2.4.20-8运行于VMware workstation
虚拟硬盘:hda sda,其中sda为安装完系统以后再增加的。
分区情况:hda 由系统安装里自动分区,sda分为

/dev/sda1 ext3
/dev/sda2 ext3
/dev/sda3 Extended
/dev/sda5 Win95 FAT32(LBA)


第一步:修改/etc/fstab
/dev/sda1 /mnt/sda1 ext3 default,usrquota,grpquota 0 0

第二步:重新挂载sda1
mount -o remount /mnt/sda1

第三步:创建配额配置文件
quotacheck -cvg /mnt/sda1
这时用ls /mnt/sda1命令应该能看到aquota.user及aquota.group两个文件

第四步:配置限额
edquota username
修改相应设置后存盘退出

第五步:打开配额功能
quotaon -auvg

此时显示

/dev/sda1 [/mnt/sda1]: group quotas turned on
/dev/sda1 [/mnt/sda1]: user quotas turned on


第六步:检查
repquota -auvg
应该显示root和username的配额配置情况。

此时只是针对sda1分区作的配额,而对username的主目录,如/home/username是没有限制的,我当初就是范了这个理解上的错误,在username的主目录下怎么实验也不成功。

我的理解结论:quota只针对用户使用硬盘上的某一分区做配额,并不包括其他分区上的有使用权限的空间。

理解如有错误,请大家指正。

Permanent link to this article: http://www.wardking.com/2005/01/redhat%E4%B8%8A%E4%BD%BF%E7%94%A8quota%E5%B0%8F%E7%BB%93/

发表评论

电子邮件地址不会被公开。 必填项已被标记为 *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>