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

Leonid Isaev lisaev at umail.iu.edu
Wed Oct 9 17:53:36 UTC 2013


On Tue, 08 Oct 2013 22:18:37 +0200
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'

Oops, you are right -- sorry for the confusion. I really have to have coffee
before replying to emails :)

> 
> 
> 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

Cheers,
-- 
Leonid Isaev
GnuPG key: 0x164B5A6D
Fingerprint: C0DF 20D0 C075 C3F1 E1BE  775A A7AE F6CB 164B 5A6D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20131009/385d82be/attachment.pgp>


More information about the lxc-users mailing list