Symptoms
A customer cannot manage FTP users in their Linux Shared Hosting subscription in POA CCP (create, remove, change password and so on) - corresponding POA tasks fail with error message 'Disk quota exceeded (errno 122)'
like in the example below:
Task ID 100000
Queue name ftp_vhost_3
Task name Change user 'f100001.u1' for virtual host (vhost_id=1) on ProFTPD service with id 10
Task description Change user 'f100001.u1' for virtual host (vhost_id=1) on ProFTPD service with id 10
Queue status Failed
Start not earlier than Dec-10-2010 10:10
Method name taskChangeUser on OBJREF:ProFTPD:0:getService:10
Last execution output Destination host_id #10 : lchown /usr/local/pem/vhosts/100001: Disk quota exceeded (errno 122).
Cause
The customer exceeded disk quota in their webspace. It may be checked using the following command on the Linux Shared Hosting server where customer's webspace is created(in case of NG hosting repquota
should be executed on NFS server in case it returns empty results on the webserver):
# repquota -a | grep WEBSPACE_ID
where WEBSPACE_ID is the ID of the customer's webspace in question, it may be found in POA Customer or Provider CP.
During any operation on webspace (including FTP users management) POA is trying to set correct ownership on customer's webspace: set the Linux system user created for customer's webspace as the owner of webspace. Since the customer exceeded disk quota for their webspace the operation to change webspace ownership fails with the error message 'Disk quota exceeded (errno 122)'
.
Resolution
In general, exceeded disk quota should not affect FTP user management in POA CCP, customer just must not be able to upload more data in their webspace than disk quota allows.
So, in order to work the problem around one may temporarily increase disk quota for the problem system user using the Linux edquota
utility. Should be executed on NFS server in case of NG, as well as repquota
. The following solution should be applied on a physical server or a VM. If the hosting server in question is a Parallels Virtuozzo container, see the solution at the end of the article.
First, find the current disk quota and usage for the system Linux user using the command repquota
mentioned above:
# repquota -a | grep WEBSPACE_ID
where WEBSPACE_ID is the ID of the customer's webspace in question. Then, set the quota slightly above the current disk usage:
# edquota WEBSPACE_USER
where WEBSPACE_USER is the system Lunux user created for the customer's webspace. The name of the system user may be found in the /etc/passwd
file on the proper Linux Shared Hosting server:
# grep WEBSPACE_ID /etc/passwd | awk -F: '{print $1}'
where WEBSPACE_ID is the ID of the customer's webspace in question, it may be found in POA Customer or Provider CP.
If the hosting server in question is a Parallels Virtuozzo container, the following solution should be used:
Increase the disk limit for the container:
vzctl set CTID --save --diskspace LIMIT
Re-initialize the disk quota:
vzquota drop CTID vzctl quotainit CTID
Start the container:
vzctl start CTID