OpenVZ Forum


Home » General » Support » vzquota on, disable recalculating disk usage after force quota off (-f)
vzquota on, disable recalculating disk usage after force quota off (-f) [message #53121] Fri, 12 January 2018 10:50 Go to next message
andreyb is currently offline  andreyb
Messages: 25
Registered: February 2008
Junior Member
For example:
# pwd
/var/data
# vzquota on 100001
# cd test/test
# vzquota off 100001
vzquota : (error) Quota off syscall for id 100001: Device or resource busy
vzquota : (error)       Possible reasons:
vzquota : (error)       - Container's root is not unmounted
vzquota : (error)       - there are opened files inside container's root/private area
vzquota : (error)       - your current working directory is inside a container directory
vzquota : (error)         root/private area
vzquota : (error)       Currently used file(s):
/var/data/test/test
# vzquota off 100001 -f
# cd -
# vzquota on 100001
vzquota : (warning) quota usage is invalid for id 100001, recalculating disk usage...
#

How can I disable the recolculating for enable qouta after force disable quota?

[Updated on: Fri, 12 January 2018 10:50]

Report message to a moderator

Re: vzquota on, disable recalculating disk usage after force quota off (-f) [message #53123 is a reply to message #53121] Fri, 12 January 2018 16:07 Go to previous messageGo to next message
vaverin is currently offline  vaverin
Messages: 708
Registered: September 2005
Senior Member
andreyb wrote on Fri, 12 January 2018 13:50
For example:
vzquota : (error) Quota off syscall for id 100001: Device or resource busy
vzquota : (error)       Possible reasons:
vzquota : (error)       - your current working directory is inside a container directory
vzquota : (error)         root/private area
vzquota : (error)       Currently used file(s):
/var/data/test/test

How can I disable the recalculating for enable qouta after force disable quota?


Dear Andrey,
vzquota accounts all file operation for CT private area, specified in <ctid>.conf file.
Provided messages shows that /var/data/test/test directory is accounted by quota for CT 10001.
For example this can happen if you have specified incorrect private area in <ctid>.conf file,
or because specified directory is used somehow inside container (linked or bindmounted or something else).

By design we have used /vz/private/10001/ directory as private area mounted it into /vz/root/10001/ directory.
Container itself had activity inside /vz/root/10001 only.
Described scenario was expected if some host users have called "cd /vz/root/10001" and then tried to stop CT 10001 quota.

We expect here that files inside CT private area does not have any links outside its top directory /vz/private/10001,
otherwise it will affect quota calculation and lead to similar messages.

Thank you,
Vasily Averin
Re: vzquota on, disable recalculating disk usage after force quota off (-f) [message #53125 is a reply to message #53123] Fri, 12 January 2018 18:20 Go to previous message
andreyb is currently offline  andreyb
Messages: 25
Registered: February 2008
Junior Member
Thank you for support.
My case is:
There is share directory on the host. This share is mount in several container throught simfs. I need the total quota for the share. For this I using the own mount script ("vzquota on" is for first mount of share directory into the container and "vzquouta off" is for last unmount share directory, for example in case "service vz stop"). But sometimes (in case reboot host with share directory as bash working directory for example) the qouta is not disable correctly. Thus the containers start very long. All containers are waiting the reculculating of share directory (there are a lot of files). I want to disable the recolculating in my mount script. Inaccuracy in the calculation for me is not critical. I thought "quota on -f" disable the recolculating.
Previous Topic: VZ7 DCACHESIZE parameter is deprecated
Next Topic: OpenVZ on Ubuntu 16.04
Goto Forum:
  


Current Time: Mon May 06 15:47:34 GMT 2024

Total time taken to generate the page: 0.01740 seconds