Linode Forum Index Linode Forum
Linode Community Forums
 


Quotas problem on CentOS 6.2 64bit

Click here to go to the original topic

 
       Linode Forum Index -> General Discussion
Author Message
ditto



Joined: 13 Jan 2012
Posts: 4

Posted: Fri Jan 13, 2012 2:11 pm    Post subject: Quotas problem on CentOS 6.2 64bit  

I asked Linode support for help, but was told to try the forum instead. :)

I have installed the Linode build of CentOS 6 64bit. I have installed DirectAdmin control panel. In order for DirectAdmin to work correct, it needs quotas enabled.

Please see this page: http://help.directadmin.com/item.php?id=42

When I run this command:
Code: /sbin/quotaoff -a; /sbin/quotacheck -avugm; /sbin/quotaon -a;

Then I get this error:
Code: quotacheck: Cannot find filesystem to check or filesystem not mounted with quota option.

Also when I run this command:
Code: /usr/sbin/repquota /home

I get this error:
Code: [root@server ~]# /usr/sbin/repquota /home
repquota: Mountpoint (or device) /home not found or has no quota enabled.
repquota: Not all specified mountpoints are using quota.

However /home does exist of course and I also have DirectAdmin installed and its working. But I get quota errors in DirectAdmin when adding a user.

I have been looking at /etc/fstab but are not sure what to change there, I am a beginner at this. This is the content of my /etc/fstab

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,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
/var/tmpMnt /tmp ext3 loop,nosuid,noexec,rw 0 0

Also I have checked that quota is installed by yum, and it is.

Have any of you heard of this problem before? Maybe it is common for Linode VPS? I would be thankful for any help!
Back to top  
Mr Nod



Joined: 17 Mar 2009
Posts: 100
Location: UK

Posted: Fri Jan 13, 2012 3:05 pm    Post subject:  

I've had the exact same issue with cPanel on Linode - quotas weren't set.

From memory I got around this by amending the fstab file to add quotas in the list of options...something like:

/dev/xvda / ext3 defaults,noatime,quotas,errors=remount-ro 1 1

But please google it as I can't remember the exact syntax. However this resolved the problem of cPanel quotas.

HTH
Back to top  
ditto



Joined: 13 Jan 2012
Posts: 4

Posted: Sat Jan 14, 2012 10:52 am    Post subject:  

Thanks. However the adding the needed to etc/fstab did not work because there was other problem. The major problem was that /dev/root did not exist on this Linode distribution of CentOS 6.0 64bit. This is how I solved the problem:

Code: ln -s /dev/xvda /dev/root

Then I added userquota,groupquota to etc/fstab

Then I run:
Code: /sbin/quotaoff -a; /sbin/quotacheck -avugm; /sbin/quotaon -a;

Now quota is working in DirectAdmin. I think the missing /dev/root folder is a bug with this Linode distribution of CentOS 6 64bit
Back to top  
ditto



Joined: 13 Jan 2012
Posts: 4

Posted: Sat Jan 14, 2012 12:51 pm    Post subject:  

However I now discovered that after doing:

Code: ln -s /dev/xvda /dev/root

Even if quota is then working perfect, if I reboot the vps, then the symlink from /dev/root is removed, so each time I reboot the vps I have to run this code again:

Code: ln -s /dev/xvda /dev/root

Does anybody know how I can do this so that it is not removed after reboot? I am a beginner at this ...
Back to top  
hoopycat



Joined: 30 Aug 2008
Posts: 1294
Location: Rochester, New York

Posted: Sat Jan 14, 2012 3:15 pm    Post subject:  

From the looks of things, /dev/root seems to be deprecated (based on 1 and 2). From a quick survey, I have it on my Ubuntu 10.04 workstation and Linode, but not on my Ubuntu 11.10 netbook.

It might be worth checking with the DirectAdmin folks, as it is a commercial product and they've probably run into this sort of stuff before. (I don't believe I'd heard about it prior to this thread.)

Worse comes to worse, /etc/rc.local.
Back to top  
David Rahrer



Joined: 04 Sep 2011
Posts: 2

Posted: Sun Feb 26, 2012 2:51 am    Post subject:  

I'm having exactly the same issue. It seems to be a bug that affects Centos 6.x on Xen from my searches. The only problem with creating the /dev/root link in /etc/rc.local is that the link needs to exist before this code in /etc/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

if [ -x /sbin/quotaon ]; then
    action $"Enabling local filesystem quotas: " /sbin/quotaon -aug
fi

There is quite a bit of code bofore to determine if the update is really necessary before performing it, so I'm assuming that it's best not to just run it out of the blue (though I could be wrong. I've resorted to placing the following line just before the above in /etc/rc.sysinit:

Code: # Create link to /dev/root for quota fix
ln -s /dev/xvda /dev/root

This does work and all errors in the logs are gone after reboot, however I have some questions:

1. Is editing /etc/rc.sysinit like this is acceptable?

2. Is this a file that cPanel or a future update of some sort will strip of manual edits?

3. Other than manually, is boot the only time quotas are checked or is there a regular maintenance check by cPanel somewhere? (I've not found one).

Since this only seems to happen on Xen virtualized platforms, Linode might want to check into it and perhaps modify the Centos 6.x configurations.

Thanks!
Back to top  
 
       Linode Forum Index -> General Discussion
Page 1 of 1