/var/lib/vz root and private purpose

apmuthu

Renowned Member
Feb 26, 2009
870
11
83
Chennai - India & Singapore
github.com
ProxMox VE Defaults are listed as:
Code:
VE_ROOT=/var/lib/vz/[B]root[/B]/$VEID
VE_PRIVATE=/var/lib/vz/[B]private[/B]/$VEID

The two trees appear like they are the same files and no symlinks other than the two quota ones are present.

What is the purpose of the root tree? The private tree seems to be the ones the containers use.
 
ProxMox VE Defaults are listed as:
Code:
VE_ROOT=/var/lib/vz/[B]root[/B]/$VEID
VE_PRIVATE=/var/lib/vz/[B]private[/B]/$VEID
The two trees appear like they are the same files and no symlinks other than the two quota ones are present.

What is the purpose of the root tree? The private tree seems to be the ones the containers use.

See http://forum.openvz.org/index.php?&t=msg&th=3988
 
Thanks Tom. It's nice to have it here.

/vz/private/<VEID> are private areas, i.e. the directories containing the private files of the given VEs.

/vz/root/<VEID> -- are mountpoints. The private area is mounted to the /vz/root/<VEID> directory on the Hardware Node and provides VE users with a complete Linux file system tree.

If you want to move VE files from HN to some other place it's better to avoid /vz/private using and handle /vz/root directory.

It's disk-quota related issue.

I would note that disk quota is calculated on /vz/private/<VEID> subtree. However it's able to track the operation only if VE is mounted. Quota is initialized on the first VE mount -- it is relative log procedure. When VE unmounts the collected quota information is saved to special file that reads again on the next VE start.

However if you have changed something inside private area where VE was unmounted, it makes inconsistent the quota information saved in file. Unfortunately we will know nothing about this fact and quota will show incorrect values when VE will be started again.

To force full quota recalculation then VE is starting(or is already started) similar to quotacheck command from
the Linux quota tools:

You can use 'vzquota drop' to remove quota file.

But to re-init quota you need restart VE -- I'm not sure that initialization on running VE is possible.
 
Last edited: