The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Frustrating quota error on Centos 6.2 and Xen

Discussion in 'General Discussion' started by DavidR, Feb 23, 2012.

  1. DavidR

    DavidR Well-Known Member

    Joined:
    Feb 25, 2003
    Messages:
    177
    Likes Received:
    0
    Trophy Points:
    16
    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:
    root@server [~]# quotacheck -a
    quotacheck: Cannot stat() mounted device /dev/root: No such file or directory
    When I try fixquotas I get this:

    Code:
    root@server [~]# /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:
    root@server [~]# 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.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
    Lucas likes this.
  3. DavidR

    DavidR Well-Known Member

    Joined:
    Feb 25, 2003
    Messages:
    177
    Likes Received:
    0
    Trophy Points:
    16
    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:
    root@server [~]# 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?
     
  4. DavidR

    DavidR Well-Known Member

    Joined:
    Feb 25, 2003
    Messages:
    177
    Likes Received:
    0
    Trophy Points:
    16
    Any advice on this Michael?
     
  5. Grigor

    Grigor Registered

    Joined:
    Mar 19, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  6. Grigor

    Grigor Registered

    Joined:
    Mar 19, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    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! :)
     
  7. DavidR

    DavidR Well-Known Member

    Joined:
    Feb 25, 2003
    Messages:
    177
    Likes Received:
    0
    Trophy Points:
    16
    Thanks, Grigor! That looks promising, and much cleaner than my kludge. I appreciate it.
     
  8. Grigor

    Grigor Registered

    Joined:
    Mar 19, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  9. dimenocjason

    dimenocjason Member
    PartnerNOC

    Joined:
    Jan 18, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Berkeley, California
    cPanel Access Level:
    Root Administrator
    I had this same issue. CentOS running on Linode. This article provided an appropriate solution to my situation.

    /http://www.daftspunk.com/code/fix-for-file-system-quotas-devroot-symlink-breaks-linode-centos-6-x.html
     
Loading...

Share This Page