Re: [Lxc-users] help with root mount parameters
atp andrew.phill...@lmax.com writes: [r...@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 This directory should be created by make install, but it isn't yet. 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). I'd submit a patch for that myself if I could see through the autoconf maze. { 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. No, they are for different purposes. When setting up a container with a rootfs, lxc does a pivot_root(2) syscall to remove the original (host) root from the container namespace. pivot_root(rootfs, pivotdir) makes rootfs the new root, and at the same time moves the old root onto pivotdir (under the new root), where it can be umounted from later. So the above config requires /var/lib/nfsroot/mnt to exist beforehand. (If pivotdir is not specified, a temporary directory is created and used instead, which generally works, unless rootfs is read only.) Now the above pivot_root syscall works only if rootfs and pivotdir are not on the current root filesystem instance, which may or may not be the case in a given configuration. So lxc first recursively binds rootfs to rootfs.mount (in the container namespace) and pivots into that to ensure that the above requirement is always satisfied. -- HTH, Feri. -- ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] help with root mount parameters
Daniel Lezcano dlezc...@fr.ibm.com writes: 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. /var/run/lxc looks like a much better choice to me. Regards, - Ralf -- ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] help with root mount parameters
Thanks to both for the replies. This now makes sense. I've specified the rootfs.mount in the container config, and it gets past there and boots ok. Just in case anyone else cares, a very handy debug log can be had by using this command. lxc-start --logpriority=TRACE -o /tmp/trace.log --name my_container It was not clear from the man page that to get the higher levels of verbosity (DEBUG|TRACE) you need to specify an output file, rather than just stderr. The autoconf maze has me befuddled as well. I tried briefly to see where VERSION and PACKAGE_VERSION were defined but to no avail. In answer to Daniels question; islab01 is an FC12 machine, running 2.6.34 (for the macvlan stuff) [r...@islab01 lxc]# grep /usr/lib64/lxc * [r...@islab01 lxc]# head config.log This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by lxc configure 0.6.5, which was generated by GNU Autoconf 2.63. Invocation command line was $ ./configure ## - ## ## Platform. ## [r...@islab01 lxc]# grep /usr/lib64/lxc * [r...@islab01 lxc]# grep LXCROOTFS * config.log:LXCROOTFSMOUNT='/usr/local/lib/lxc' config.log:#define LXCROOTFSMOUNT /usr/local/lib/lxc config.status:S[LXCROOTFSMOUNT]=/usr/local/lib/lxc config.status:D[LXCROOTFSMOUNT]= \/usr/local/lib/lxc\ configure:LXCROOTFSMOUNT configure:EXP_VAR=LXCROOTFSMOUNT configure:LXCROOTFSMOUNT=$full_var configure:#define LXCROOTFSMOUNT $LXCROOTFSMOUNT configure.ac:AS_AC_EXPAND(LXCROOTFSMOUNT, ${with_rootfs_path}) configure.ac:AH_TEMPLATE([LXCROOTFSMOUNT], [lxc default rootfs mount point]) configure.ac:AC_DEFINE_UNQUOTED(LXCROOTFSMOUNT, $LXCROOTFSMOUNT) Makefile:LXCROOTFSMOUNT = /usr/local/lib/lxc Makefile.in:LXCROOTFSMOUNT = @LXCROOTFSMOUNT@ [r...@islab01 lxc]# ls -l /usr/local/lib/lxc /usr/lib64/lxc ls: cannot access /usr/local/lib/lxc: No such file or directory ls: cannot access /usr/lib64/lxc: No such file or directory from the trace.log lxc-start 1274794074.668 WARN lxc_conf - failed to mount '/dev/pts/2'-'./rootfs.test/dev/tty2' lxc-start 1274794074.668 WARN lxc_conf - failed to mount '/dev/pts/3'-'./rootfs.test/dev/tty3' lxc-start 1274794074.668 WARN lxc_conf - failed to mount '/dev/pts/4'-'./rootfs.test/dev/tty4' lxc-start 1274794074.668 INFO lxc_conf - 4 tty(s) has been setup lxc-start 1274794074.668 ERRORlxc_conf - No such file or directory - failed to access to '/usr/lib64/lxc', check it is present lxc-start 1274794074.668 ERRORlxc_conf - failed to set rootfs for 'test' lxc-start 1274794074.668 ERRORlxc_start - failed to setup the container So something is going awry, but I'm really puzzled as to how having read the setup_rootfs section. Its probably not worth chasing down at the moment. Andy Andrew Phillips Head of Systems www.lmax.com Office: +44 203 1922509 Mobile: +44 (0)7595 242 900 LMAX | Level 2, Yellow Building | 1 Nicholas Road | London | W11 4AN The information in this e-mail and any attachment is confidential and is intended only for the named recipient(s). The e-mail may not be disclosed or used by any person other than the addressee, nor may it be copied in any way. If you are not a named recipient please notify the sender immediately and delete any copies of this message. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Any view or opinions presented are solely those of the author and do not necessarily represent those of the company. -- ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] help with root mount parameters
On 05/26/2010 11:07 AM, atp wrote: Thanks to both for the replies. This now makes sense. I've specified the rootfs.mount in the container config, and it gets past there and boots ok. Just in case anyone else cares, a very handy debug log can be had by using this command. lxc-start --logpriority=TRACE -o /tmp/trace.log --name my_container It was not clear from the man page that to get the higher levels of verbosity (DEBUG|TRACE) you need to specify an output file, rather than just stderr. Right. I used to have this options: lxc-start -l DEBUG -o $(tty) -s lxc.console=$(tty) -n name The autoconf maze has me befuddled as well. I tried briefly to see where VERSION and PACKAGE_VERSION were defined but to no avail. They should be defined in src/config.h (generated by autoconf). In answer to Daniels question; islab01 is an FC12 machine, running 2.6.34 (for the macvlan stuff) [r...@islab01 lxc]# grep /usr/lib64/lxc * [r...@islab01 lxc]# head config.log This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by lxc configure 0.6.5, which was generated by GNU Autoconf 2.63. Invocation command line was $ ./configure ## - ## ## Platform. ## [r...@islab01 lxc]# grep /usr/lib64/lxc * [r...@islab01 lxc]# grep LXCROOTFS * config.log:LXCROOTFSMOUNT='/usr/local/lib/lxc' config.log:#define LXCROOTFSMOUNT /usr/local/lib/lxc config.status:S[LXCROOTFSMOUNT]=/usr/local/lib/lxc config.status:D[LXCROOTFSMOUNT]= \/usr/local/lib/lxc\ configure:LXCROOTFSMOUNT configure:EXP_VAR=LXCROOTFSMOUNT configure:LXCROOTFSMOUNT=$full_var configure:#define LXCROOTFSMOUNT $LXCROOTFSMOUNT configure.ac:AS_AC_EXPAND(LXCROOTFSMOUNT, ${with_rootfs_path}) configure.ac:AH_TEMPLATE([LXCROOTFSMOUNT], [lxc default rootfs mount point]) configure.ac:AC_DEFINE_UNQUOTED(LXCROOTFSMOUNT, $LXCROOTFSMOUNT) Makefile:LXCROOTFSMOUNT = /usr/local/lib/lxc Makefile.in:LXCROOTFSMOUNT = @LXCROOTFSMOUNT@ [r...@islab01 lxc]# ls -l /usr/local/lib/lxc /usr/lib64/lxc ls: cannot access /usr/local/lib/lxc: No such file or directory ls: cannot access /usr/lib64/lxc: No such file or directory from the trace.log lxc-start 1274794074.668 WARN lxc_conf - failed to mount '/dev/pts/2'-'./rootfs.test/dev/tty2' lxc-start 1274794074.668 WARN lxc_conf - failed to mount '/dev/pts/3'-'./rootfs.test/dev/tty3' lxc-start 1274794074.668 WARN lxc_conf - failed to mount '/dev/pts/4'-'./rootfs.test/dev/tty4' lxc-start 1274794074.668 INFO lxc_conf - 4 tty(s) has been setup lxc-start 1274794074.668 ERRORlxc_conf - No such file or directory - failed to access to '/usr/lib64/lxc', check it is present lxc-start 1274794074.668 ERRORlxc_conf - failed to set rootfs for 'test' lxc-start 1274794074.668 ERRORlxc_start - failed to setup the container So something is going awry, but I'm really puzzled as to how having read the setup_rootfs section. Its probably not worth chasing down at the moment. Can you check the LXCROOTFSMOUNT macro in src/config.h and src/config.h.in ? Thanks -- Daniel -- ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] help with root mount parameters
Daniel, The autoconf maze has me befuddled as well. I tried briefly to see where VERSION and PACKAGE_VERSION were defined but to no avail. They should be defined in src/config.h (generated by autoconf). But where does autoconf get it from :-) ? I wanted to set the version number at the top level to be 0.6.5git1. So something is going awry, but I'm really puzzled as to how having read the setup_rootfs section. Its probably not worth chasing down at the moment. Can you check the LXCROOTFSMOUNT macro in src/config.h and src/config.h.in ? [r...@islab01 src]# ls config.h config.h.in lxc/ Makefile Makefile.am Makefile.in stamp-h1 [r...@islab01 src]# grep LXCROOTFSMOUNT * config.h:#define LXCROOTFSMOUNT /usr/local/lib/lxc config.h.in:#undef LXCROOTFSMOUNT Makefile:LXCROOTFSMOUNT = /usr/local/lib/lxc Makefile.in:LXCROOTFSMOUNT = @LXCROOTFSMOUNT@ A mystery, but not one worth spending too much time on, as setting the lxc.rootfs.mount does the trick. Thanks Andy Andrew Phillips Head of Systems www.lmax.com Office: +44 203 1922509 Mobile: +44 (0)7595 242 900 LMAX | Level 2, Yellow Building | 1 Nicholas Road | London | W11 4AN The information in this e-mail and any attachment is confidential and is intended only for the named recipient(s). The e-mail may not be disclosed or used by any person other than the addressee, nor may it be copied in any way. If you are not a named recipient please notify the sender immediately and delete any copies of this message. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Any view or opinions presented are solely those of the author and do not necessarily represent those of the company. -- ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] help with root mount parameters
On 5/26/2010 4:54 AM, Ralf Schmitt wrote: Daniel Lezcanodlezc...@fr.ibm.com writes: 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. /var/run/lxc looks like a much better choice to me. As has been discussed pretty thoroughly already, this is not variable data but a completely fixed, static bit of package-specific support infrastructure. It's just like a package specific library or other component file whose name never changes and which that single file services all running instances concurrently. The library or other support file just happens to be an empty directory in this case. As such, something/lib/package/something is really the most correct place. Just pretend you can't hear the word temporary in the description of it's purpose. Maybe the install target that creates this directory could also place a small text file in the directory explaining the directories purpose? This directory must exist, even though no contents are ever placed here. see http: for details That shouldn't affect it's use as a mount point and helps the system to self-document. -- bkw -- ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] help with root mount parameters
On 05/26/2010 08:10 PM, Brian K. White wrote: On 5/26/2010 4:54 AM, Ralf Schmitt wrote: Daniel Lezcanodlezc...@fr.ibm.com writes: 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. /var/run/lxc looks like a much better choice to me. As has been discussed pretty thoroughly already, this is not variable data but a completely fixed, static bit of package-specific support infrastructure. It's just like a package specific library or other component file whose name never changes and which that single file services all running instances concurrently. The library or other support file just happens to be an empty directory in this case. As such, something/lib/package/something is really the most correct place. Just pretend you can't hear the word temporary in the description of it's purpose. Maybe the install target that creates this directory could also place a small text file in the directory explaining the directories purpose? This directory must exist, even though no contents are ever placed here. see http: for details That shouldn't affect it's use as a mount point and helps the system to self-document. Good idea. -- ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users