This repository has been archived by the owner on Nov 2, 2024. It is now read-only.
Automate bind mount config before running LXC containers #792
Unanswered
sandreas
asked this question in
Help Needed
Replies: 2 comments 3 replies
-
Never mind, I get what you're saying. You would like an option to NOT start the container until you're ready. Correct? |
Beta Was this translation helpful? Give feedback.
3 replies
-
## Navidrome LXC
#### https%3A//tteck.github.io/Proxmox/
#<a href='https%3A//ko-fi.com/D1D7EP4GF'><img src='https%3A//img.shields.io/badge/%E2%98%95-Buy me a coffee-red' /></a>
arch: amd64
cores: 2
features: nesting=1,keyctl=1
hostname: navidrome
memory: 1024
mp0: /rpool/data/shared/audio/music,mp=/music
mp1: /rpool/data/shared/config/navidrome,mp=/var/lib/navidrome
net0: name=eth0,bridge=vmbr0,hwaddr=XXXXXXXXXXX,ip=dhcp,type=veth
onboot: 1
ostype: debian
rootfs: local-zfs:subvol-100-disk-0,size=4G
swap: 512
unprivileged: 1
lxc.idmap: u 0 100000 1000
lxc.idmap: g 0 100000 1000
lxc.idmap: u 1000 1000 1
lxc.idmap: g 1000 1000 1
lxc.idmap: u 1001 101001 64435
lxc.idmap: g 1001 101001 64435 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When I try to use a script that I plan to use a bind mount for integrating external data and adding some lxc user mappings, sometimes it is not possible to configure this before I start the container.
Example:
On navidrome-v4.sh I would like to have 2 bind mounts in my
/etc/pve/lxc/100.conf
:The reason for this is, that I would like to backup my navidrome config without backing up the whole container, but only the navidrome database. Unfortunately it is not possible to select these mount points in the script...
The steps I have to take are the following (if SSH is not configured for the container):
/var/lib/navidrome/
to another directory (e.g./root/navidrome/
)/root/navidrome/
back to/var/lib/navidrome/
(onto the host system via mount point)Same problem applies to other containers that use data directories that may be shared over multiple containers (e.g. Photoprism, etc.). Is there a way to configure these kind of mount points / lxc mappings before the container starts the first time to avoid the manual steps I had to perform?
Beta Was this translation helpful? Give feedback.
All reactions