[Lxc-users] Bind mount point must be in container root?
Guido Jäkel
G.Jaekel at DNB.DE
Tue Oct 8 20:18:37 UTC 2013
On 2013-10-08 19:07, Leonid Isaev wrote:
> So, would (mnt with a /) this work?
> -----
> lxc.mount.entry = /mnt/raid/course_data /mnt/course_data none bind 0 0
> -----
Dear Leonid,
I would say no, this is outside the container. If the second path is a relative one, it's relative to the container root defined by the lxc configuration. If it's absolute, it must still describe the absolute path to the mount point in the container image. For separation of concerns I prefer a relative path because i don't have to change it if the location or name of the container root changes.
But this is not related to the problem that you can't use a mount path of [/container-root/]mnt/foo if you leave the value of lxc.pivotdir on the default mnt . If you choose the value 'bar', you can't mount [/container-root/]bar/foo. Therefore, choose something "unusual" as the value for lxc.pivotdir , like '.pivotdir'
Node: Kaj said, he's using LXC 0.7.5. I don't no what's the default value of a more recent version; but with this old one, it definitely was 'mnt' -- i wrote about this trap here more than one year ago ;)
greetings
Guido
More information about the lxc-users
mailing list