Edit virtual server disk quota

Hi there,

I need to increase the disk quota for a domain / virtual server.

I went to "Edit Virtual Server | Quotas and limits", but the only quota I can edit there is bandwidth. The old post at https://www.virtualmin.com/node/17267 suggested I should have found this option there.

I went to "Administration Options | Edit Owner Limits" and there are no options there to edit the domain's disk space quota. Same with "Administration Options | Edit Resource Limits".

The page at https://www.virtualmin.com/documentation/developer/cli/modify_domain suggests I can do this via the command line. Am I correct that this is the only way to do it, not through the GUI? Or if I am missing a way to do it in the GUI, does this imply the command line route will fail? Am I looking in the wrong place?

Thanks.

Craig

Status: 
Active

Comments

Howdy -- hmm, what output do you receive if you go into System Settings -> Re-Check Config?

Took about 20 minutes, but here you go:

The status of your system is being checked to ensure that all enabled features are available, that the mail server is properly configured, and that quotas are active ..

    Your system has 7.80 GB of memory, which is at or above the Virtualmin recommended minimum of 256 MB.

    BIND DNS server is installed, and the system is configured to use it.

    Apache is installed.

    The following PHP versions are available : 5.4.16 (/bin/php-cgi), 5.5.21 (/opt/rh/php55/root/usr/bin/php-cgi), 5.6.5 (/opt/rh/rh-php56/root/usr/bin/php-cgi), 5.4 (mod_php)

    PHP-FPM support was not detected : No FPM configuration directory found

    PHP versions have changed to 5, 5.4, 5.5, 5.6 since last check. Regenerating any missing php.ini files.

    Webalizer is installed.

    Apache is configured to host SSL websites.

    MySQL is installed and running.

    ProFTPD is installed.

    Logrotate is installed.

    Plugin AWstats reporting is installed OK.

    Plugin Administrator's Notes is installed OK.

    Plugin Protected web directories is installed OK.

    Plugin Disable Virtual Server On Schedule is installed OK.

    Plugin Additional content styles is installed OK.

    Plugin Additional content styles from OpenWebDesign.org is installed OK.

    Plugin Virtualmin Support Links is installed OK.

    Using network interface eth0 for virtual IPs.

    IPv6 addresses are available, using interface eth0.

    Default IPv4 address for virtual servers is xxx.xxx.xxx.xxx.

    Default IPv6 address for virtual servers is xxxx:xxxx:xxxx:xxxx:xxxx:xxxx.

    Default IP address is set to xxx.xxx.xxx.xxx, which matches the detected external address.

    Both user and group quotas are enabled for home and email directories.

    All commands needed to create and restore backups are installed.

    Resource limits are supported and configured correctly.

    The selected package management and update systems are installed OK.

    Chroot jails are not available : The Jailkit command jk_init was not found on your system - maybe the packet is not installed?

.. your system is ready for use by Virtualmin.

Updating all Webmin users with new settings..
.. done

Updating all resellers with new settings..
.. done

Applying web server configuration ..
.. done

Re-loading Webmin ..
.. done

OK, now I get more options under "Edit Virtual Server | Quotas and limits". However, now I'm wondering why the "Total server quota" is "Unlimited" when the setting for the plan is a definitive number (10 GB). Why?

Also, the "Total disk space used" is reported as 8.49 GB, while at "Administration Options | Disk Usage | Home directory" it reports 10.27 GB. Why?

Craig

The plan is just used for the initial setup of the Virtual Server, the Virtual Server can be changed later.

My suggestion would be to try and set a new quota now, and see if that works for you.

Once we get that sorted out, we can then look into the space issues you described.

I understand your first sentence and assumed as much. That's why I was looking for a way to adjust the virtual server's quota.

I've set a new (higher) quota for the virtual server in question. How do I know if worked without trying to fill the account? On the "Virtual server details" page, "Server administrator's quota" still shows "Unlimited", as is the case for all (after looking at a representative sample) virtual servers. Don't remember seeing that information previously on that (or any) screen.

If it helps, this is related to ticket https://www.virtualmin.com/node/52736 . The user was using less than 1 GB of disk space before they started doing back-ups, and the outcome of that ticket was that Jamie said the problem was probably because the user had hit their quota, and when I checked that was the case -- they had hit 10 GB. But I don't actually really know if I have fixed the problem and have actually given them more space if I'm getting contradictory information on different screens.

Craig

You'd want to set the "Total server quota", as well as the "Server administrator's quota" option.

Are you saying that after setting both of those, when you later look at the details they each show up as Unlimited?

What about if you go to the screen where you can set them, is it still listed as Unlimited there?

OK, I've now done that on this particular domain. But now I just have more questions:

  • How was all of this quota-related stuff missing from my installation of Virtualmin all this time? Disk quotas have been enabled on this server from day one when I installed Virtualmin. Having that working was a requirement of mine.

  • Why do all of the existing virtual servers show "Unlimited" "Total server quota" and "Server administrator's quota"? The plan I set up originally has always had those set at 10 GB, and obviously that must have been set somewhere somehow, leading to the issues I had in the above-referenced ticket where a virtual server ran out of disk space.

In answer to both of your questions, the settings now read correctly (the new quota I set of 20 GB) on this particular virtual server, but as I say, all of the other virtual servers show "Unlimited".

Craig

It's unfortunately pretty tough to tell what might have caused all that, though we can run a quick test to verify that it's all working properly now.

What happens if you create a new Virtual Server?

After creating a new Virtual Server, is the quota setup properly? Or is it set to Unlimited?

Sure, let's run that test. What can I do?

New virtual servers are created with the quota set at 10 GB for both the "Total server quota" and "Server administrator's quota", although the only virtual server I've added is having completely unrelated issues where aliased domains are loading the default IP. If I can't fix it, I'll open a separate ticket.

Are these then the right circumstances under which to use the "modify-domain" CLI option to ensure that the rest of the virtual servers are all correctly set up?

Craig

And if I should indeed use "modify-domain" to do a mass readjustment, what's the syntax? Will this work?:

virtualmin modify-domain --domain * --quota 10GB

(I realise I'll have to go back and reset the problem virtual server.)

And which quota will that set: "Total server quota" or "Server administrator's quota"? How do I set the other from the command line?

Thanks.

Craig

Unfortunately, the "modify-domain" option is only designed to modify one domain at a time.

You'd likely need to use a script to loop over all your domains.

Something like this might do the trick:

for dom in `virtualmin list-domains --name-only --toplevel`; do
  echo virtualmin modify-domain --domain $dom ----quota 10GB
done

I put an "echo" in there for testing, so that you can see that the command looks correct before you have it modify all your domains. Remove that "echo" command once you're ready to apply those changes.

OK, thanks for that. I'll give it a shot, probably next week. What about the other questions?:

  • You suggested that we could/should run a test. I asked what you'd like me to do.

  • And which quota will "modify-domain" set: "Total server quota" or "Server administrator's quota"?

Thanks.

Craig

Sorry for the confusion, the test was what I mentioned after that statement -- what happens when you create a new Virtual Server? It sounds like you tried that, and it looks like that's working for you.

I believe --quota sets the Total Server Quota, and --uquota sets the Server Administrator's quota.

OK, thanks. I'll post back here if I have any problems with "modify-domain".