Changes

Jump to: navigation, search

Mounting filesystems

146 bytes added, 10:48, 29 October 2007
$VZROOT, formatting
OpenVZ uses two directories. Assuming our VE is numbered 777, these directories are:
/var/lib/vz$VZROOT/private/777 /var/lib/vz$VZROOT/root/777
The {{Note|<code>$VZROOT</code> is usually <code>/vz</code>, on Debian systems however this is <code>/var/lib/vz</private directory contains root directory contentscode>. This directory or subdirectory In this document this is often symlinked onto a different filesystem, for example:further referred to as <code>/vz</code>.}}
The /varvz/libprivate directory contains root directory contents. This directory or subdirectory may be symlinked onto a different filesystem, for example:  /vz/private -> /mnt/openvz
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:

Navigation menu