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
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!