UnixServerAdmin

Server Administration & Management

How to Fixquotas for cPanel in Virtuozzo

quotacheck: Scanning /dev/vzfs [/] quotacheck: lstat Cannot stat `//usr/share/sgml/docbook/xmlcatalog’: No such file or directory
Guess you’d better run fsck first !
exiting…

This is because cPanel has changed files provided by the OS template on which the system is built. The solution is:
On the main node server:

# vzfsutil –cM -t /vz/template /vz/private/

This will give you a set of files that has been modified.
do:

# chmod -S -t /vz/private//root/

then try:

# vzfsutil –cM -t /vz/template /vz/private/

once done, re-enter the C-panel server and run:

# /scripts/fixquotas

that will do.

Advertisements

October 25, 2011 Posted by | cPanel, Virtualization, Virtuozzo | , , , , | Leave a comment

How to enable Quota for cPanel in Virtuozzo

On Virtuozzo VPS with Cpanel control panel, disk quota is showing unlimited. I tried to enable quota through WHM –> Server Configuration –> Initial Quota Setup, but got following error.

Installing Default Quota Databases……Done
Quotas are now on
Updating Quota Files……
quotacheck: Can’t find filesystem to check or
filesystem not mounted with quota option.

quotacheck: Can’t find filesystem to check or
filesystem not mounted with quota option.
….Done

The problem is fixed by changing the VPS quotaugidlimit value to 800.

1. Click on Infrastructure Manager
2. Click on Virtual Private Servers
3. Click on VPS you need to enable quota
4. Click Preferences
5. Click on Resources tab
6. Click Extend button
7. Disk Quota – Click to set up Disk Quota parameters
8. Click Modify Button on top and change value of quotaugidlimit to 800 and save, this will restart the VPS.

Now you need to delete old quota to enable new quota.

# rm -rf /aquota.user 2>/dev/null

# rm -rf /aquota.group 2>/dev/null

# unlink /aquota.user 2>/dev/null

# unlink /aquota.group 2>/dev/null

And run following command, it should be in one line, No line breaks

for x in `find /proc/vz/vzaquota/ | tail -1 | xargs find | tail -2 `; do ln -s $x /; done

Now your Virtuozzo VPS will work with cPanel disk quotas.

October 24, 2011 Posted by | cPanel, Virtualization, Virtuozzo | , , , , | Leave a comment

How to Enabling Quotas in cPanel

If in a cPanel server that didn’t have quotas enabled by default. What is the result of a server without quotas? Simple. All accounts will have unlimited diskspace.

How to fix this?

First of all you will have to login to your server using ssh.

1. You first have to edit /etc/fstab

# vi /etc/fstab

2. Locate the line that looks something like

LABEL=/1 / ext3 defaults 1 1

3. Add after “defaults” the word “usrquota”. It should look something like

LABEL=/1 / ext3 defaults,usrquota 1 1

4. Save and exit

5. Remount the / partition

# mount -o remount /

6. Now run the cpanel script to fixquotas

# /scripts/fixquotas

That’s it! Now all you cPanel accounts should have a limited disk space that you setup.

January 29, 2011 Posted by | cPanel | , , | 40 Comments

How to fix Quotas in cPanel

If you go into WHM –> List Accounts and all your accounts are showing an unlimited quota and 0 MB disk space usage, Its probably have a quota problem.So please use following commands :-

#/scripts/fixquotas

This’ll take sometime to analysis server current disk usage, will usually fix the problem. If it doesn’t, make sure that quotas are on for your filesystem.  Check the file /etc/fstab, and in the fourth column (the options column), make sure that ‘usrquota’ is specified for the file system that contains your user home folders.  For example, this is how looks:

LABEL=/var      /var          ext3    defaults,noatime,usrquota 0  0
LABEL=/home    /home          ext3    defaults,noatime,usrquota 0  0

If /home is part of the / partition, then the quotas need to be applied to / .

Now, remount the partitions with new options.  For the root ( / ) partition for example, you’d run the following command:

#mount -o remount /

Then run the following command to update quotas:

#/scripts/initquotas

If the problem indicates a problem writing to /aquota.user or similar, make sure the file isn’t set to immutable:

#chattr -ia /aquota.user

January 6, 2011 Posted by | cPanel | , , | 1 Comment