配额检查-vguma

配额检查-vguma

使用 ext4 FS 设置新的 64 位 RHEL 6 服务器。之前只使用过 ext3 和 32 位 RHEL5。无论我怎么尝试,都无法让它工作。

当前的挂载设置(来自“mount”命令):

/dev/sda7 on / type ext4 (rw,noatime)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,noexec,nosuid)
/dev/sdb1 on /backup type ext4 (rw)
/dev/sda1 on /boot type ext4 (rw,noatime)
/dev/sda8 on /home type ext4 (rw,noatime,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0)
/dev/sda2 on /tmp type ext4 (rw,noexec,noatime)
/dev/sda6 on /usr type ext4 (rw,noatime)
/dev/sda5 on /var type ext4 (rw,noatime,usrjquota=aquota.user,jqfmt=vfsv0)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

本质上是尝试获取 /home 上的用户/组配额以及 /var 上的用户配额。在 /home 和 /var 上创建了 aquota.user 和 aquota.group 文件:

-rw-r--r-- 1 root root 0 Nov 17 13:37 /home/aquota.group
-rw-r--r-- 1 root root 0 Nov 17 13:37 /home/aquota.user
-rw------- 1 root root 0 Nov 17 11:43 /var/aquota.user

当我运行 quoatcheck 时我得到:

配额检查-vguma

quotacheck: WARNING -  Quotafile /home/aquota.user was probably truncated. Cannot save quota settings...
quotacheck: WARNING -  Quotafile /home/aquota.group was probably truncated. Cannot save quota settings...
quotacheck: WARNING -  Quotafile /var/aquota.user was probably truncated. Cannot save quota settings...

然后我尝试 quoteon 并得到:

配额-av

quotaon: Cannot find quota file on /home [/dev/sda8] to turn quotas on/off.
quotaon: Cannot find quota file on /home [/dev/sda8] to turn quotas on/off.
quotaon: Cannot find quota file on /var [/dev/sda5] to turn quotas on/off.

安装的配额 rpms:

rpm -qa|grep -i 配额

quota-3.17-16.el6.x86_64
quota-devel-3.17-16.el6.x86_64

您知道我做错了什么或我应该调整什么才能使配额像在 ext3/32bit 中一样工作吗?

答案1

搞定了。必须先删除 aquota.* 文件。似乎 jquota 不喜欢它们存在,即使是 0 字节文件,就像正常的配额设置一样。

相关内容