Sharing Files beteween unprivileged containers - "delay" option?

jonas88

New Member
Apr 8, 2025
2
0
1
Hello

I try to mount a folder from lxc 100 to my node and then use it with mpx in lxc 101.
It works but only after i manually "mount -a" on the node.

It is clear to my why it does not work (the target of the smb share is not yet online when the node boots).

should i tinker a dirty delay script or is there a better way?

Thank you!
 
It is clear to my why it does not work (the target of the smb share is not yet online when the node boots).

should i tinker a dirty delay script or is there a better way?
The is the Startup delay setting under container Options, Start/Shutdown Order. The Help button explains what it is for: Defines the interval between this container start and subsequent containers starts. For example, set it to 240 if you want to wait 240 seconds before starting other containers.

EDIT: See also here: https://forum.proxmox.com/threads/retry-container-start-until-successful.164778/#post-762123
 
Last edited:
Hello and thank you for your response!
I found the option but it only helps partially.

Relevant are 3 lxc containers. the configuration faces me with some problems.

Openhab lxc (my smart home server) - i want to mount it to my docker lxc so i can manage the logs with loki.
Docker LXC Filesystem shall be available on the CodeServer LXC

I set openhab lxc to prio 1 (no delay)
Docker to prio 10 (60 s delay)
and code server lxc to prio 20 (120 s delay)

I tried this fstab:

Code:
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/pve/root / ext4 errors=remount-ro 0 1
/dev/pve/swap none swap sw 0 0
proc /proc proc defaults 0 0

//192.168.1.112/Docker            /mnt/docker            cifs credentials=/root/.smbcredentials,uid=100001,gid=100001,file_mode=0777,dir_mode=0777,iocharset=utf8,nofail,x-systemd.automount,x-systemd.requires=network-online.target 0 0
//192.168.1.113/openHAB-conf      /mnt/openhab_conf      cifs credentials=/root/.smbcredentials,uid=100001,gid=100001,file_mode=0777,dir_mode=0777,iocharset=utf8,nofail,x-systemd.automount,x-systemd.requires=network-online.target 0 0
//192.168.1.113/openHAB-userdata  /mnt/openhab_userdata  cifs credentials=/root/.smbcredentials,uid=100001,gid=100001,file_mode=0777,dir_mode=0777,iocharset=utf8,nofail,x-systemd.automount,x-systemd.requires=network-online.target 0 0
//192.168.1.113/openHAB-logs      /mnt/openhab_logs      cifs credentials=/root/.smbcredentials,uid=100001,gid=100001,file_mode=0777,dir_mode=0777,iocharset=utf8,nofail,x-systemd.automount,x-systemd.requires=network-online.target 0 0

192.168.1.20:/volume2/Filme /mnt/movies nfs defaults,_netdev 0 0
But it won't let docker and code server start.

I also tried without the options at the end - so docker and code server lxc's start again (but unfortunately the volumes are not mountet in the node):

Code:
 <file system> <mount point> <type> <options> <dump> <pass>
/dev/pve/root / ext4 errors=remount-ro 0 1
/dev/pve/swap none swap sw 0 0
proc /proc proc defaults 0 0

//192.168.1.112/docker            /mnt/docker            cifs credentials=/root/.smbcredentials,uid=100001,gid=100001,file_mode=0777,dir_mode=0777,iocharset=utf8 0 0
//192.168.1.113/openHAB-conf      /mnt/openhab_conf      cifs credentials=/root/.smbcredentials,uid=100001,gid=100001,file_mode=0777,dir_mode=0777,iocharset=utf8 0 0
//192.168.1.113/openHAB-userdata  /mnt/openhab_userdata  cifs credentials=/root/.smbcredentials,uid=100001,gid=100001,file_mode=0777,dir_mode=0777,iocharset=utf8 0 0
//192.168.1.113/openHAB-logs      /mnt/openhab_logs      cifs credentials=/root/.smbcredentials,uid=100001,gid=100001,file_mode=0777,dir_mode=0777,iocharset=utf8 0 0

192.168.1.20:/volume2/Filme /mnt/movies nfs defaults,_netdev 0 0

Here's the proof that it does not mount (2nd fstab)

Code:
root@pve:~# cd /mnt
root@pve:/mnt# ls
docker  movies  openhab_conf  openhab_logs  openhab_userdata  pve  vzsnap0
root@pve:/mnt# cd docker
root@pve:/mnt/docker# ls
root@pve:/mnt/docker# cd ..
root@pve:/mnt# cd openhab_conf
root@pve:/mnt/openhab_conf# mount -a
root@pve:/mnt/openhab_conf# ls
archive     dump   items        private  services  tags       userdata
automation  html   misc         rules    sitemaps  things
conf        icons  persistence  scripts  sounds    transform
root@pve:/mnt/openhab_conf#