[Lxc-users] Bind mount point must be in container root?

Kaj Wiik kaj.wiik at iki.fi
Sat Oct 12 19:39:00 UTC 2013


Guido and all,

I now understand what's happening and confirm that I can mount without
any problem to e.g. var/www/webdav/course_data
(next week CCD data will be streaming there from a 2.5 m optical telescope).

Many thanks for all!

Cheers,
Kaj



Many thanks



On Tue, Oct 8, 2013 at 11:18 PM, Guido Jäkel <G.Jaekel at dnb.de> wrote:
> 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
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
> _______________________________________________
> Lxc-users mailing list
> Lxc-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-users




More information about the lxc-users mailing list