Answer the question
In order to leave comments, you need to log in
LXC: how to update link to connected host partition?
Greetings! The host has partitions with the structure:
- /srv/releases/A/db/DB1/
- /srv/releases/A/db/DB2/
- /srv/releases/A/files/
- /srv/releases/B/db /DB1/
- /srv/releases/B/db/DB2/
- /srv/releases/B/files/
- /srv/current - symlink to the /srv/releases/A folder
I want the container to have access to some partitions release, I write in the container config like this:
lxc.mount.entry=/srv/current/db/DB1 /var/lib/lxc/xxx/rootfs/srv/remote/db none bind,ro,create=dir 0 0
lxc. mount.entry=/srv/current/files /var/lib/lxc/xxx/rootfs/srv/remote/files none bind,ro,create=dir 0 0
The container is loading, sections are available. But when I replace the /srv/current symlink link with /srv/releases/B in the container, nothing changes, i.e. it does not reread this change. The goal is to atomically replace the release folder on multiple containers.
1. Is it possible to make symlink changes reread in containers?
2. If not, how can you update the link from the container?
3. Is there another way to achieve the same goal?
Thank you!
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question