Is it possible to mount a drive to store files to be able to share with Containers.

Mikey6283

Member
Jul 14, 2021
58
0
6
75
I have trying to get a config file that i created on my Mac to my a Container in Prox VE on a designated Proxmox mini pc as the path is not recognised by the container, I was wondering if i could mount a drive for files only. So that it could be directed to the mount I currently have a drive for Backups etc.

Apologies for this trivial question but i am total novice.
 
hi,

yes you can. see bind mounts [0]

For example, to make the directory /mnt/bindmounts/shared accessible in the container with ID 100 under the path /shared, use a configuration line like mp0: /mnt/bindmounts/shared,mp=/shared in /etc/pve/lxc/100.conf. Alternatively, use pct set 100 -mp0 /mnt/bindmounts/shared,mp=/shared to achieve the same result.

[0]: https://pve.proxmox.com/wiki/Linux_Container#_bind_mount_points