Backup fails if user is close to quota limit

5 posts / 0 new
Last post
#1 Wed, 01/14/2015 - 17:26
cerebrum

Backup fails if user is close to quota limit

One of our servers (Debian 6.0.10 Squeeze) scheduled virtualmin backups fail if the user is close to the quota limit: 878.64 MB of 1000 MB (87%). The MySQL backup reports:

Creating backup for virtual server example.com ..
[...]
    Dumping MySQL database example_database ..
    .. dump failed! mysqldump: Got errno 122 on write
[...]

"Got errno 122 on write" is a typical error for disk space or quota issues. So, I assume, this is a side effect of the latest virtualmin update, which now runs backups as the user (not root any more) and therefore consumes disk space and the user's quota while creating the backup.

The interesting thing on this server is, that it has one partition only:

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              34G   16G   17G  49% /
tmpfs                 512M     0  512M   0% /lib/init/rw
udev                  512M     0  512M   0% /dev
tmpfs                 512M     0  512M   0% /dev/shm
none                  512M     0  512M   0% /dev/shm

...and quota is enabled on this partition:

# quotaon -pa
group quota on / (/dev/root) is on
user quota on / (/dev/root) is on

Any ideas?

Wed, 01/14/2015 - 17:37
cerebrum

I forgot to mention: if I set the quota of this user to UNLIMITED and run the backup again, it works :-)

My workaround at the moment is to use the "command to run before backup" functionality:

virtualmin modify-domain --domain example.com --quota UNLIMITED --uquota UNLIMITED

...and the "command to run after backup":

virtualmin modify-domain --domain example.com --quota 1024000 --uquota 1024000

Not an ideal solution, because I can not predict if other users will run into the same problem of course and setting the quota (here: 1000 MB) kind of hard-coded is a woefully solution, too.

Wed, 01/14/2015 - 22:09
andreychek

Howdy,

That issue came up in the initial 4.13 release.

The updated 4.13-2 version that was pushed out should handle the quota issue... there's some additional details regarding that available here:

http://virtualmin.com/node/35764

Let us know if using 4.13-2 takes care of that issue for you.

-Eric

Wed, 01/14/2015 - 22:56 (Reply to #3)
cerebrum

Weird... package "webmin-virtual-server" version 4.13.gpl-2 is currently installed on this machine. I will monitor the backups over the next days and report back next week.

Thanks, andreychek.

Sun, 01/18/2015 - 16:07
cerebrum

Hi there,

The problem still exists. Package webmin-virtual-server-4.13.gpl-2 is installed and the user consumes approx. 90% of his server quota. The backups fail when writing the MySQL backup:

Dumping MySQL database example_database ..
.. dump failed! mysqldump: Got errno 122 on write

I also got a virtuamin warning via email ("Disk quota exceeded") at the same time:

Disk usage for group exmaple on filesystem / has reached 100% of the
allowed quota.

1000.42 MB of disk space is being used, out of a maximum of 1000 MB.

I appreciate any suggestions (I re-instituted my workaround mentioned above).

Topic locked