Enable quotas - OpenVZ

8 posts / 0 new
Last post
#1 Wed, 09/11/2013 - 17:40
macneil

Enable quotas - OpenVZ

Hi

I've installed Web/Virtualmin from the GPL installer onto my VPS running OpenVZ and centos-5.8-x86 and I'm not having much luck enabling quotas.

[root@dark600 ~]# mount
/dev/simfs on / type simfs (rw,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /dev type tmpfs (rw,relatime)
none on /dev/pts type devpts (rw,relatime)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)

[root@dark600 ~]# cat /etc/mtab
/dev/simfs / simfs rw,relatime 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /dev tmpfs rw,relatime 0 0
none /dev/pts devpts rw,relatime 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw,relatime 0 0

[root@dark600 ~]# cat /etc/fstab
none /dev/pts devpts rw 0 0

[root@dark600 ~]# repquota /
repquota: Mountpoint (or device) / not found.
repquota: Not all specified mountpoints are using quota.

Set quotas for domain and mail users? set to Yes

And I've set: Disk and Network Filesystems - File listing filesystems mounted at boot time to /etc/mtab

I've read on this forum that OpenVZ can be problematic with quotas and Webmin, so just hoping I can get it working really.

I've tried changing mtab first line to - /dev/simfs / simfs rw,usrquota,grpquota,relatime 0 0

Thanks for any help

Wed, 09/11/2013 - 22:31
andreychek

Howdy,

Yeah, unfortunately, we do see quite a few problems with OpenVZ (lots and lots and lots of them :-)

There are really some cases where quotas just won't work on an OpenVZ-based system, due to the configuration of the host.

However, we can try a few things --

What happens if you go into Webmin -> System -> Disk Quotas, and you click "Enable Quotas" there?

Also, you may want to try copying /etc/mtab over top of your /etc/fstab file (you may want to make a backup of them first) -- and after doing that, try enabling the quotas again using Webmin.

-Eric

Thu, 09/12/2013 - 13:31 (Reply to #2)
macneil

Hi Eric,

Thanks for the quick reply.

I'm not getting the option to enable quotas from Webmin -> System -> Disk Quotas; ....................................................................... No local filesystems can support quotas.

You can enable quotas for a filesystem in the Disk and Network Filesystems module. ......................................................................

In Webmin -> System -> Disk and Network File Systems -> Module Config

I've swapped around fstab and mtab, and tried copying mtab content across and vice versa... still not working unfortunately. I've been restarting the server each time when doing so.

Thanks again

Thu, 09/12/2013 - 18:25
andreychek

Howdy,

I wouldn't recommend restarting your server, as with OpenVZ, they may be replacing your config files on bootup.

What you may want to try is copying /etc/mtab over /etc/fstab -- and after doing that, hop into Webmin's "Disk Quotas" module, and see if it allows you to enable quotas at that point.

If that doesn't work, what error do you receive exactly -- and what are the current contents of your /etc/fstab file?

-Eric

Thu, 09/12/2013 - 19:14
macneil

Hi Eric,

I copied /etc/mtab over /etc/fstab - both files contents are now the same.

[root@dark600 webmin]# cat /etc/fstab /dev/simfs / simfs rw,relatime 0 0 proc /proc proc rw,relatime 0 0 sysfs /sys sysfs rw,relatime 0 0 none /dev tmpfs rw,relatime 0 0 none /dev/pts devpts rw,relatime 0 0 none /proc/sys/fs/binfmt_misc binfmt_misc rw,relatime 0 0

When I go to Webmins Disk Quotas - I see the following;

No local filesystems can support quotas.

You can enable quotas for a filesystem in the Disk and Network Filesystems module.

I'm assuming I should be seeing: / (Root filesystem) SIMFS - to enable quotas on.

Thanks again

Thu, 09/12/2013 - 19:25
andreychek

Hmm, the one other thing you may want to try is to put this into the /etc/fstab file (in place of the / entry in there now):

/dev/simfs / simfs rw,usrquota,grpquota,relatime 0 0

After that, try rebooting (which is different than my suggestion above), and then once you've booted, run the "mount" command and make sure that it shows the "usrquota" and "grpquota" options as being set on "/".

Once it is, try going back into the Disk Quotas module and see if that works better.

-Eric

Thu, 09/12/2013 - 20:10
macneil

Strange... Now I can see the mount in Disk Quotas but when I click Enable Quotas for that mount, nothing happens. It's status doesn't change.

[root@dark600 ~]# mount /dev/simfs on / type simfs (rw,relatime) proc on /proc type proc (rw,relatime) sysfs on /sys type sysfs (rw,relatime) none on /dev type tmpfs (rw,relatime) none on /dev/pts type devpts (rw,relatime) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)

[root@dark600 ~]# cat /etc/fstab /dev/simfs / simfs rw,usrquota,grpquota,relatime 0 0 proc /proc proc rw,relatime 0 0 sysfs /sys sysfs rw,relatime 0 0 none /dev tmpfs rw,relatime 0 0 none /dev/pts devpts rw,relatime 0 0 none /proc/sys/fs/binfmt_misc binfmt_misc rw,relatime 0 0

[root@dark600 ~]# cat /etc/mtab /dev/simfs / simfs rw,relatime 0 0 proc /proc proc rw,relatime 0 0 sysfs /sys sysfs rw,relatime 0 0 none /dev tmpfs rw,relatime 0 0 none /dev/pts devpts rw,relatime 0 0 none /proc/sys/fs/binfmt_misc binfmt_misc rw,relatime 0 0

I also added the line to mtab - it reset on the reboot however.

Thanks again

Thu, 10/23/2014 - 05:24
amrod

hi all I have the same problem. there was no /etc/fstab file but i created one and add these option suggested usrquota,grpquota I can see the mount in Disk Quotas too but when I click Enable Quotas for that mount, nothing happens. is there a solution?

Topic locked