Linux Container Development
 help / color / mirror / Atom feed
From: "Michael H. Warfield" <mhw-BetbSzk+GohWk0Htik3J/w@public.gmane.org>
To: Daniel Lezcano <daniel.lezcano-GANU6spQydw@public.gmane.org>
Cc: mhw-BetbSzk+GohWk0Htik3J/w@public.gmane.org,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	"Ciprian Dorin,
	Craciun"
	<ciprian.craciun-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	lxc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [Devel] Re: LXC container, unmounting unneeded mount points (from the 	container namespace)
Date: Mon, 11 Jan 2010 23:03:57 -0500	[thread overview]
Message-ID: <1263269037.14592.60.camel@localhost> (raw)
In-Reply-To: <1263268449.14592.53.camel@localhost>


[-- Attachment #1.1: Type: text/plain, Size: 3299 bytes --]

On Mon, 2010-01-11 at 22:54 -0500, Michael H. Warfield wrote: 
> Added lxc-devel to the cc list since this seems to be more appropriate
> over there (maybe) and I've just joined that one as well.
> 
> On Fri, 2010-01-08 at 15:35 +0100, Daniel Lezcano wrote: 
> > Ciprian Dorin, Craciun wrote:
> > > On Fri, Jan 8, 2010 at 4:17 PM, Daniel Lezcano <daniel.lezcano@free.fr> wrote:
> > >   
> > >> Ciprian Dorin, Craciun wrote:
> > >>     
> > >>>    Hy all!
> > >>>
> > >>>    Today I've started to play with the LXC containers, and I've got a
> > >>> question: when starting a container (with it's own mount point
> > >>> namespace), and I do a `cat /proc/mounts` I also see the mount points
> > >>> from my host system.
> > >>>
> > >>>    So the question is: how can I force `lxc-create` to remove any
> > >>> uneeded mount points (maybe all)?
> > >>>
> > >>>       
> > >> Committed today :)
> > >>
> > >> http://git.lab.toulouse-stg.fr.ibm.com/?p=lxc.git;a=commit;h=ed83715df7666879116d1657b1dd54a8fc6513f6
> > >>     

> > Oops, this one:

> > http://lxc.git.sourceforge.net/git/gitweb.cgi?p=lxc/lxc;a=commit;h=bf601689a9e0cea1ceaf17e4f7f853f5392c2827

> Nice.  This is EXACTLY what I've been looking for as well.  Only problem
> is...  It didn't work.  It complains about:

> lxc-start: could not umount 1 mounts"

> Then terminates saying it can't start the container.

> When I throw in some debugging prints, I find out that it's complaining
> that it can't umount {pivotdir}/dev.  Commented out the return -1's in
> that routine so it starts the container anyways and jump into the
> running container and I discover that {pivotdir}/dev/shm is still
> mounted even though it thinks it umounted it.  I can see from the
> debugging prints that it seems to have successfully umount it (the
> debugging message indicates that it umounted it - so it saw it had it
> and tried and got a good return from the attempt) but it's apparently
> still mount.  If I umount that {pivotdir}/dev/shm inside the container,
> I can then umount {pivotdir}/dev and {pivotdir}. 

> Tried it both by defining lxc.pivotdir and by letting it choose a
> temporary one.  Tried two different containers.  Same result.

:

Crud...  I always forget to mention SOMETHING...

On the host system /dev/shm is a tmpfs file system.

From mount:

tmpfs on /dev/shm type tmpfs (rw)

It's in my /etc/fstab like this:

tmpfs  /dev/shm  tmpfs   defaults        0 0

Seems to be that way on all my Fedora and CentOS systems.  I can umount
that in the host system (doesn't SEEM to do any harm) and then lxc-start
works just fine and can pivot the root and unmount everything.  Seems to
be something to do with tmpfs.

> Of course we also have the strange "rootfs" entry there as well.

> Host system is Fedora 12.
> Host kernel is: 2.6.31.9-174.fc12.i686
> Guest system in each case is CentOS 5.4
> 
> Regards,
> Mike

Mike
-- 
Michael H. Warfield (AI4NB) | (770) 985-6132 |  mhw-BetbSzk+GohWk0Htik3J/w@public.gmane.org
   /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
   NIC whois: MHW9          | An optimist believes we live in the best of all
 PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 482 bytes --]

[-- Attachment #2: Type: text/plain, Size: 206 bytes --]

_______________________________________________
Containers mailing list
Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
https://lists.linux-foundation.org/mailman/listinfo/containers

  reply	other threads:[~2010-01-12  4:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-08 14:08 LXC container, unmounting unneeded mount points (from the container namespace) Ciprian Dorin, Craciun
     [not found] ` <8e04b5821001080608w47b0529dhcd6f8a26e38f24e0-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-08 14:17   ` Daniel Lezcano
     [not found]     ` <4B473E89.1040200-GANU6spQydw@public.gmane.org>
2010-01-08 14:25       ` Ciprian Dorin, Craciun
     [not found]         ` <8e04b5821001080625j22517f1i22ec3495d8d1e53b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-08 14:35           ` Daniel Lezcano
     [not found]             ` <4B4742A8.1000708-GANU6spQydw@public.gmane.org>
2010-01-08 14:59               ` Ciprian Dorin, Craciun
     [not found]                 ` <8e04b5821001080659y3c4bad1akbaa1e355bb1f730f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-08 15:12                   ` Daniel Lezcano
2010-01-19 16:52                   ` [Devel] " Michael H. Warfield
2010-01-12  3:54               ` Michael H. Warfield
2010-01-12  4:03                 ` Michael H. Warfield [this message]
2010-01-13 13:53                 ` Daniel Lezcano
     [not found]                   ` <4B4DD076.3090007-GANU6spQydw@public.gmane.org>
2010-01-13 14:15                     ` Michael H. Warfield

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1263269037.14592.60.camel@localhost \
    --to=mhw-betbszk+gohwk0htik3j/w@public.gmane.org \
    --cc=ciprian.craciun-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=daniel.lezcano-GANU6spQydw@public.gmane.org \
    --cc=lxc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox