6,534
edits
Changes
$VZROOT, formatting
OpenVZ uses two directories. Assuming our VE is numbered 777, these directories are:
Putting VE root directories onto a separate filesystem (not the hardware node root filesystem) is good storage management practice. It protects the Hardware Node root filesystem from being filled up by a VE; this could cause problems on the Hardware Node.
'''On the HN we have a directory '/home' which we wish to make available (shared) to all VEs.'''
You would think that you could bind mount this directory, as in: 'mount --bind /home /var/lib/vz/private/777/home' but this does not work - — the contents of /home cannot be seen within the VE.
This is where the second directory listed above (/var/lib/vz/root/777) is used. If a VE is not started, this directory is empty. But after starting a VE, this directory contains what the VE sees as its mounted filesystems.
The correct command to issue on the HN is: