The OpenVZ Linux Kernel-based virtualization software does not allow for direct mounting or management of filesystems within its containers.
There are some workarounds which can allow for a sort of simulated ephemeral mount or can bind to a directory on the host system:
1. Using Bind Mount Points: OpenVZ allows you to create “bind mounts” which sync a directory on your host system to a directory in your container. This is not full file system management, but it can often emulate the behavior close enough to work for many applications.
Example: \`\`\`bash mount —bind /directory/host /vz/root/100/directory/container \`\`\` Replace `/directory/host` with the directory path on your host system and `/vz/root/100/directory/container` with the directory path of your container (replace “100” with your container ID). Note: Once done, don’t forget to add this bind point to `/etc/vz/vz.conf` to make it permanent.1. Simfs: OpenVZ uses simfs as “virtual” file system. It’s not a proper filesystem, more an index of the files which actually stored on the hardware node filesystem. It doesn’t provide disk usage separation between the containers. The drawback is, there is only one iNode table for all filesystem and it’s on the hardware node.
1. Ploop: Newer versions of OpenVZ supports ploop. ploop is a per-container filesystem that provides better disk usage isolation, live snapshots and online resize of disk with ext4 and xfs.
IMPORTANT: OpenVZ 7 and Virtuozzo 7 are introducing hardware virtualization alongside the container virtualization, which allows to mount filesystems as usual because the both types of virtualization exists since the container shares the host OS kernel, whereas on a virtual machine, the VM has its own kernel, independent of the host OS.
But this is beyond the scope of the question and involves a different kind of setup. Whenever possible, it is recommended to upgrade your OpenVZ version or try a different virtualization solution if your specific use-case requires more complex filesystem operations.