OpenVZ Forum - RDF feed
type: channel
items: vzquota on, disable recalculating disk usage after force quota off (-f)
items: Re: vzquota on, disable recalculating disk usage after force quota off (-f)

vzquota on, disable recalculating disk usage after force quota off (-f)
type: item
description: 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?
creator: andreyb
date: 2018-01-12T10:50:09-00:00

Re: vzquota on, disable recalculating disk usage after force quota off (-f)
type: item
description: 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
creator: vaverin
date: 2018-01-12T16:07:46-00:00

Re: vzquota on, disable recalculating disk usage after force quota off (-f)
type: item
description: 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.
creator: andreyb
date: 2018-01-12T18:20:44-00:00