Frustrating quota error on Centos 6.2 and Xen

DavidR

Well-Known Member
Feb 25, 2003
177
0
166
Everywhere I look for the answer to this I find incomplete threads with no resolution. If cPanel support would like to jump in I will be glad to follow instructions to figure this out.

I've got a Linode VPS running Centos 6.2 and current cPanel Release (WHM 11.30.6 (build 3) CENTOS 6.2 i686 xenpv on server). My cPanel error log is filled with this:

Code:
[2012-02-22 02:30:27 -0500] info [pkgacct] Quotas are not enabled
[2012-02-22 02:30:31 -0500] info [pkgacct] Quotas are not enabled
repquota: Cannot stat() mounted device /dev/root: No such file or directory
repquota: Cannot stat() mounted device /dev/root: No such file or directory
Building global cache for cpanel...Done
repquota: Cannot stat() mounted device /dev/root: No such file or directory
repquota: Cannot stat() mounted device /dev/root: No such file or directory
When I try quotacheck I get this:

Code:
[email protected] [~]# quotacheck -a
quotacheck: Cannot stat() mounted device /dev/root: No such file or directory
When I try fixquotas I get this:

Code:
[email protected] [~]# /scripts/fixquotas
Installing Default Quota Databases...../aquota.user..../quota.user..../var/tmp/aquota.user..../var/tmp/quota.user.....Done
Linux Quota Support
Quotas are now on
Warning : Your system does not have a separate filesystem for backups. This may cause performance degradation during the backup process.
Updating Quota Files......
	quotacheck: Cannot stat() mounted device /dev/root: No such file or directory
	quotacheck: Cannot find filesystem to check or filesystem not mounted with quota option.
	quotacheck: Cannot stat() mounted device /dev/root: No such file or directory
	quotacheck: Cannot find filesystem to check or filesystem not mounted with quota option.
	
....Done
Reading package Standard
Resetting quota for usera to 5000 M
edquota: Cannot stat() mounted device /dev/root: No such file or directory
No filesystems with quota detected.
Resetting quota for userb to 5000 M
edquota: Cannot stat() mounted device /dev/root: No such file or directory
No filesystems with quota detected.
Resetting quota for userc to 5000 M
edquota: Cannot stat() mounted device /dev/root: No such file or directory
No filesystems with quota detected.
Resetting quota for userd to 5000 M
edquota: Cannot stat() mounted device /dev/root: No such file or directory
No filesystems with quota detected.
Here is my fstab and mtab:
Code:
# /etc/fstab
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/xvda		/                       ext3    defaults,usrquota,noatime,errors=remount-ro 1 1
/dev/xvdb		swap                    swap    defaults                           0 0
tmpfs                   /dev/shm                tmpfs   defaults                           0 0
devpts                  /dev/pts                devpts  gid=5,mode=620                     0 0
sysfs                   /sys                    sysfs   defaults                           0 0
proc                    /proc                   proc    defaults                           0 0
/usr/tmpDSK             /tmp                    ext3    defaults,noauto        0 0
/tmp             /var/tmp                    ext3    defaults,usrquota,bind,noauto        0 0
Code:
/dev/xvda / ext3 rw,noatime,usrquota,errors=remount-ro 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
/usr/tmpDSK /tmp ext2 rw,noexec,nosuid,loop=/dev/loop0 0 0
/tmp /var/tmp none rw,noexec,nosuid,bind 0 0
All the disk usage notifications are set to on (default settings) under "Main >> Server Configuration >> Tweak Settings."

I've read in some places that /dev/root was deprecated. Others suggested linking /dev/xvda with /dev/root. I tried that and the /dev/root warnings went away but quotacheck warned:

Code:
[email protected] [~]# quotacheck -a
quotacheck: Quota for users is enabled on mountpoint / so quotacheck might damage the file.
Please turn quotas off or use -f to force checking.
so I removed the link. Fstab looks right to me but at this point I'm not sure about anything. I would really appreciate some help with this. Thanks in advance.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello :)

First, you should check to see if "/dev/root" exists:

Code:
ll /dev/root
If it does not exist, try linking "/dev/xvda" to it via:

Code:
ln -s /dev/xvda /dev/root
Then, run the following command:

Code:
# /scripts/fixquotas
If you continue to receive the "quotacheck: Quota for users is enabled on mountpoint / so quotacheck might damage the file." message, then it may be wise to consult with a system administrator (rather than forcing the check) to ensure you do not damage your file system.

Thank you.
 
  • Like
Reactions: Lucas

DavidR

Well-Known Member
Feb 25, 2003
177
0
166
Thanks for your reply -- please bear with me while I explain my results.

I checked and /dev/root does not exist so once again I created the symbolic link:

Code:
ln -s /dev/xvda /dev/root
Everything seems to work as it should but I do still get this warning when issuing quotacheck -a:

Code:
[email protected] [~]# quotacheck -a
quotacheck: Quota for users is enabled on mountpoint / so quotacheck might damage the file.
Please turn quotas off or use -f to force checking.
However, on another Linode VPS where I'm running Centos 5.7 and cPanel RELEASE, I get that same warning. Oddly enough, on that VPS there is no /dev/root either but no errors. I'm not sure where this bug is, cPanel, Centos or Linode's particular configuration of this distribution. However, I'm thinking that with the link in place on the Centos 6.2 VPS that it should run ok.

My question now is where to set this link to recreate during boot so that some other cPanel or update process won't wipe it (the command) away later. I'm assuming the link needs to be created before this section in /etc/rc.d/rc.sysinit:

Code:
# Update quotas if necessary
if [ X"$_RUN_QUOTACHECK" = X1 -a -x /sbin/quotacheck ]; then
	action $"Checking local filesystem quotas: " /sbin/quotacheck -anug
fi
However, rc.local seems to run after the stuff in rc.sysinit, so it won't work there. Where would you suggest putting the link command where it will create the link before hitting those lines above in rc.sysinit and be safe from either cPanel auto-configuration or other upgrades?
 

Grigor

Registered
Mar 19, 2012
3
0
51
cPanel Access Level
Root Administrator
I have the absolutely same problem as David. Using the same software - CentOs 6.2, xen etc. but not on Linode so it seems the problem is not bound to them.

Will hope to read something from you Michael... even could give you root access to examine the problem further.

Thanks,
Grigor
 

Grigor

Registered
Mar 19, 2012
3
0
51
cPanel Access Level
Root Administrator
David, just found a solution for the deprecated root symlink in our centos 6.2 case.

Just create a new rule for the udev daemon and add:
Code:
KERNEL=="xvda1", SUBSYSTEM=="block", SYMLINK+="root"
Here's how to do it in one line:
Code:
echo 'KERNEL=="xvda1", SUBSYSTEM=="block", SYMLINK+="root"' > /etc/udev/rules.d/99-root-link.rules
and reboot

Hope that helps! :)
 

DavidR

Well-Known Member
Feb 25, 2003
177
0
166
Thanks, Grigor! That looks promising, and much cleaner than my kludge. I appreciate it.
 

Grigor

Registered
Mar 19, 2012
3
0
51
cPanel Access Level
Root Administrator
David, there's a final update.

Just spoke with my VPS host and it seems that the VPS was booted with some custom kernel he made on the Xen mother host. Unfortunately that kernel had been built about 2 years ago and that was the reason it refers to /dev/root.

He just made so my VPS is booted with its own kernel and the problem gone - there's no need to put that symlink anymore.

I'm not sure Linode would do that for you but it's definitely their problem and you may ask them to update their guest systems kernel because you experience problems. Or just use my other work around - which is the best way to live in that situation.

Best Regards,
Grigor