[Lxc-users] help with root mount parameters
Daniel Lezcano
dlezcano at fr.ibm.com
Wed May 26 08:43:04 UTC 2010
On 05/25/2010 10:17 PM, atp wrote:
> Hi,
>
> I've synced to git head this afternoon, and firing up a container I now
> get
>
> [root at islab01 lxc]# lxc-start -n test01.dev.tradefair/
> lxc-start: No such file or directory - failed to access to
> '/usr/lib64/lxc', check it is present
You just need this empty directory, by default lxc does not create it,
so it is up to you to do this step. But that seems to puzzle people, so
I will probably create it with the "make install" step as Ferenc suggested.
> lxc-start: failed to set rootfs for 'test01.dev.tradefair/'
> lxc-start: failed to setup the container
>
> I've traced this to the patch
> http://lxc.git.sourceforge.net/git/gitweb.cgi?p=lxc/lxc;a=blobdiff;f=src/lxc/conf.c;h=57b8c1a3ca2fb19c1fd19939c9559bf2bd802499;hp=55eb71599bfcf1f51033bf0d5fff19af04684748;hb=b1789442d69eb756355a53316c9dca4b74671883;hpb=23b7ea696bd3158ec7a0dd88cafa169e63fc8ad3
> that adds support for rootfs.mount.
>
> I don't have a lxc.rootfs.mount option in my config file,
> so /usr/lib64/lxc seems to be the default (although confusingly
> LXCROOTFSMOUNT is /usr/local/lib/lxc).
Mmh, maybe there is a problem with this path, can you give you configure
options ? (better to send 'head config.log').
> { "lxc.rootfs.mount", config_rootfs_mount },
> { "lxc.rootfs", config_rootfs },
> { "lxc.pivotdir", config_pivotdir },
>
> This now gives us several ways of specifying a root directory.
>
> Can someone help me out and explain what the new option is for?
>
> I suspect I actually want lxc.pivotdir, but most of the howtos on the
> interweb seem to use lxc.rootfs, which is likely to break for 0.6.6
This is internal stuff of lxc. Before this commit, several temporary
directories were created and never destroyed, polluting '/tmp'.
In order to do pivot_root, we have to mount --bind the rootfs somewhere.
This 'somewhere' was a temporary directory and now it is
"/usr/lib64/lxc" by default (choosen at configure time), or optionally
configurable with lxc.rootfs.mount.
Actually, if you create /usr/lib64/lxc, you should be able to start the
container, nothing should change for 0.6.6,
Let me know if it works.
Thanks
-- Daniel
More information about the lxc-users
mailing list