Accessing a mount point located on host from container

jonc

Member
Jul 3, 2013
40
0
6
Is it possible to have a container access a mount point that is located on the Proxmox host?
I've added storage to the host mounted on /mnt/data2 but I need a CT to have access to this location.
 
Hi,
of course yes - with bind-mounts.
you can create an file (eg. 100.mount for CT 100 in /etc/pve/openvz):
Code:
#!/bin/bash
source /etc/vz/vz.conf
source ${VE_CONFFILE}
mount -n --bind /export/spool  ${VE_ROOT}/var/bacula/spool
mount -n --bind /export/db     ${VE_ROOT}/var/lib/postgresql
this do the mounts for the bacula backup-server.

Udo