All of lore.kernel.org
 help / color / mirror / Atom feed
* LXC container, unmounting unneeded mount points (from the container namespace)
@ 2010-01-08 14:08 Ciprian Dorin, Craciun
       [not found] ` <8e04b5821001080608w47b0529dhcd6f8a26e38f24e0-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Ciprian Dorin, Craciun @ 2010-01-08 14:08 UTC (permalink / raw)
  To: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

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

    Thanks,
    Ciprian.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: LXC container, unmounting unneeded mount points (from the container namespace)
       [not found] ` <8e04b5821001080608w47b0529dhcd6f8a26e38f24e0-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2010-01-08 14:17   ` Daniel Lezcano
       [not found]     ` <4B473E89.1040200-GANU6spQydw@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Daniel Lezcano @ 2010-01-08 14:17 UTC (permalink / raw)
  To: Ciprian Dorin, Craciun
  Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: LXC container, unmounting unneeded mount points (from the container namespace)
       [not found]     ` <4B473E89.1040200-GANU6spQydw@public.gmane.org>
@ 2010-01-08 14:25       ` Ciprian Dorin, Craciun
       [not found]         ` <8e04b5821001080625j22517f1i22ec3495d8d1e53b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Ciprian Dorin, Craciun @ 2010-01-08 14:25 UTC (permalink / raw)
  To: Daniel Lezcano; +Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

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


    Thanks for the quick response! (Boy I'm lucky... :) )

    One problem though... The link above is not available (I can't
resolve the git.lab.... DNS name)... Could you please attach the
patch? (I've also tried to pull the lxc git repository, but it's not
in there yet... :) )

    Thanks,
    Ciprian.
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: LXC container, unmounting unneeded mount points (from the  container namespace)
       [not found]         ` <8e04b5821001080625j22517f1i22ec3495d8d1e53b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2010-01-08 14:35           ` Daniel Lezcano
       [not found]             ` <4B4742A8.1000708-GANU6spQydw@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Daniel Lezcano @ 2010-01-08 14:35 UTC (permalink / raw)
  To: Ciprian Dorin, Craciun
  Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

Ciprian Dorin, Craciun wrote:
> On Fri, Jan 8, 2010 at 4:17 PM, Daniel Lezcano <daniel.lezcano-GANU6spQydw@public.gmane.org> 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: LXC container, unmounting unneeded mount points (from the container namespace)
       [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-12  3:54               ` Michael H. Warfield
  1 sibling, 1 reply; 11+ messages in thread
From: Ciprian Dorin, Craciun @ 2010-01-08 14:59 UTC (permalink / raw)
  To: Daniel Lezcano; +Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

On Fri, Jan 8, 2010 at 4:35 PM, Daniel Lezcano <daniel.lezcano@free.fr> 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


    Thanks, it works as expected. (It seems that it was in the
repository... :) )

    And one question (off-topic): is there any mailing list dedicated
to LXC users? (I guess that this mailing list is for the developers
only, or?)

    Ciprian.
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: LXC container, unmounting unneeded mount points (from the  container namespace)
       [not found]                 ` <8e04b5821001080659y3c4bad1akbaa1e355bb1f730f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2010-01-08 15:12                   ` Daniel Lezcano
  2010-01-19 16:52                   ` [Devel] " Michael H. Warfield
  1 sibling, 0 replies; 11+ messages in thread
From: Daniel Lezcano @ 2010-01-08 15:12 UTC (permalink / raw)
  To: Ciprian Dorin, Craciun
  Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

Ciprian Dorin, Craciun wrote:

>     And one question (off-topic): is there any mailing list dedicated
> to LXC users? (I guess that this mailing list is for the developers
> only, or?)
>   

This mailing list is mainly for kernel development and general questions 
around kernel's container features.
In this mailing list, the kernel development topics are : namespaces, 
control group and checkpoint / restart.

There is another mailing list for the lxc userspace tools at:
lxc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org

Regards,
  -- Daniel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Devel] Re: LXC container, unmounting unneeded mount points (from the  container namespace)
       [not found]             ` <4B4742A8.1000708-GANU6spQydw@public.gmane.org>
  2010-01-08 14:59               ` Ciprian Dorin, Craciun
@ 2010-01-12  3:54               ` Michael H. Warfield
  2010-01-12  4:03                 ` Michael H. Warfield
  2010-01-13 13:53                 ` Daniel Lezcano
  1 sibling, 2 replies; 11+ messages in thread
From: Michael H. Warfield @ 2010-01-12  3:54 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: mhw-BetbSzk+GohWk0Htik3J/w,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Ciprian Dorin, Craciun,
	lxc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f


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

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-GANU6spQydw@public.gmane.org> 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.

This is what I get with the "return -1"'s commented out in the function
and laced with my own debugging prints to print each step of the umount
loop (this is with lxc.pivotdir = /rootfs):

===
[root@Berserker-Base ~]# lxc-start -n 1009
still mounted '/rootfs/dev'
umounted '/rootfs/dev/pts'
umounted '/rootfs/dev/shm'
still mounted '/rootfs/proc'
umounted '/rootfs/proc/bus/usb'
umounted '/rootfs/proc/sys/fs/binfmt_misc'
umounted '/rootfs/sys'
umounted '/rootfs/home'
still mounted '/rootfs/var'
umounted '/rootfs/var/lib/cgroup'
umounted '/rootfs/var/lib/nfs/rpc_pipefs'
umounted '/rootfs/usr'
umounted '/rootfs/boot'
still mounted '/rootfs/srv'
umounted '/rootfs/misc'
umounted '/rootfs/net'
still mounted '/rootfs/srv/lxc/root/1009'
umounted '/rootfs/srv/lxc/root/1009/export'
umounted '/rootfs/srv/lxc/root/1009/srv/shared'
umounted '/rootfs/srv/lxc/root/1009/dev/pts'
umounted '/rootfs/srv/lxc/root/1009/proc'
umounted '/rootfs/srv/lxc/root/1009/sys'
umounted '/rootfs/srv/lxc/root/1009/dev/shm'
umounted '/rootfs/srv/lxc/root/1009/dev/console'
umounted '/rootfs/srv/lxc/root/1009/dev/tty1'
umounted '/rootfs/srv/lxc/root/1009/dev/tty2'
umounted '/rootfs/srv/lxc/root/1009/dev/tty3'
umounted '/rootfs/srv/lxc/root/1009/dev/tty4'
umounted '/rootfs/srv/lxc/root/1009/dev/tty5'
umounted '/rootfs/srv/lxc/root/1009/dev/tty6'
still mounted '/rootfs/dev'
umounted '/rootfs/proc'
umounted '/rootfs/var'
still mounted '/rootfs/srv'
umounted '/rootfs/srv/lxc/root/1009'
still mounted '/rootfs/dev'
umounted '/rootfs/srv'
still mounted '/rootfs/dev'
lxc-start: could not umount 1 mounts
lxc-start: Device or resource busy - could not unmount old rootfs
INIT: version 2.86 booting
===

Container now continues to boot, since I commented out the error
returns.  Jumping into that container:

=== 
[root@Berserker ~]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs               288433504 240305660  33476248  88% /
/dev/sda6              2063504    662116   1296568  34% /rootfs
udev                   1031280       200   1031080   1% /rootfs/dev
/dev/shm               1031280         0   1031280   0% /rootfs/dev/shm
/dev/mapper/VolGroup00-LogVol00
                     288433504 240305660  33476248  88% /
/dev/sda6              2063504    662116   1296568  34% /export
/dev/sda7            693727244 554704408 103783460  85% /srv/shared
none                   1031280         0   1031280   0% /dev/shm
[root@Berserker ~]# umount /rootfs/dev/shm
[root@Berserker ~]# umount /rootfs/dev    
[root@Berserker ~]# umount /rootfs    
[root@Berserker ~]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs               288433504 240305672  33476236  88% /
/dev/mapper/VolGroup00-LogVol00
                     288433504 240305672  33476236  88% /
/dev/sda6              2063504    662116   1296568  34% /export
/dev/sda7            693727244 554704408 103783460  85% /srv/shared
none                   1031280         0   1031280   0% /dev/shm
===

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Devel] Re: LXC container, unmounting unneeded mount points (from the  container namespace)
  2010-01-12  3:54               ` Michael H. Warfield
@ 2010-01-12  4:03                 ` Michael H. Warfield
  2010-01-13 13:53                 ` Daniel Lezcano
  1 sibling, 0 replies; 11+ messages in thread
From: Michael H. Warfield @ 2010-01-12  4:03 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: mhw-BetbSzk+GohWk0Htik3J/w,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Ciprian Dorin, Craciun,
	lxc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f


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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Devel] Re: LXC container, unmounting unneeded mount points (from the  container namespace)
  2010-01-12  3:54               ` Michael H. Warfield
  2010-01-12  4:03                 ` Michael H. Warfield
@ 2010-01-13 13:53                 ` Daniel Lezcano
       [not found]                   ` <4B4DD076.3090007-GANU6spQydw@public.gmane.org>
  1 sibling, 1 reply; 11+ messages in thread
From: Daniel Lezcano @ 2010-01-13 13:53 UTC (permalink / raw)
  To: mhw-BetbSzk+GohWk0Htik3J/w
  Cc: Michael Holzt,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Ciprian Dorin, Craciun,
	lxc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

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-GANU6spQydw@public.gmane.org> 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.
>
> This is what I get with the "return -1"'s commented out in the function
> and laced with my own debugging prints to print each step of the umount
> loop (this is with lxc.pivotdir = /rootfs):
>
> ===
> [root@Berserker-Base ~]# lxc-start -n 1009
> still mounted '/rootfs/dev'
> umounted '/rootfs/dev/pts'
> umounted '/rootfs/dev/shm'
> still mounted '/rootfs/proc'
> umounted '/rootfs/proc/bus/usb'
> umounted '/rootfs/proc/sys/fs/binfmt_misc'
> umounted '/rootfs/sys'
> umounted '/rootfs/home'
> still mounted '/rootfs/var'
> umounted '/rootfs/var/lib/cgroup'
> umounted '/rootfs/var/lib/nfs/rpc_pipefs'
> umounted '/rootfs/usr'
> umounted '/rootfs/boot'
> still mounted '/rootfs/srv'
> umounted '/rootfs/misc'
> umounted '/rootfs/net'
> still mounted '/rootfs/srv/lxc/root/1009'
> umounted '/rootfs/srv/lxc/root/1009/export'
> umounted '/rootfs/srv/lxc/root/1009/srv/shared'
> umounted '/rootfs/srv/lxc/root/1009/dev/pts'
> umounted '/rootfs/srv/lxc/root/1009/proc'
> umounted '/rootfs/srv/lxc/root/1009/sys'
> umounted '/rootfs/srv/lxc/root/1009/dev/shm'
> umounted '/rootfs/srv/lxc/root/1009/dev/console'
> umounted '/rootfs/srv/lxc/root/1009/dev/tty1'
> umounted '/rootfs/srv/lxc/root/1009/dev/tty2'
> umounted '/rootfs/srv/lxc/root/1009/dev/tty3'
> umounted '/rootfs/srv/lxc/root/1009/dev/tty4'
> umounted '/rootfs/srv/lxc/root/1009/dev/tty5'
> umounted '/rootfs/srv/lxc/root/1009/dev/tty6'
> still mounted '/rootfs/dev'
> umounted '/rootfs/proc'
> umounted '/rootfs/var'
> still mounted '/rootfs/srv'
> umounted '/rootfs/srv/lxc/root/1009'
> still mounted '/rootfs/dev'
> umounted '/rootfs/srv'
> still mounted '/rootfs/dev'
> lxc-start: could not umount 1 mounts
> lxc-start: Device or resource busy - could not unmount old rootfs
> INIT: version 2.86 booting
> ===
>
> Container now continues to boot, since I commented out the error
> returns.  Jumping into that container:
>
> === 
> [root@Berserker ~]# df
> Filesystem           1K-blocks      Used Available Use% Mounted on
> rootfs               288433504 240305660  33476248  88% /
> /dev/sda6              2063504    662116   1296568  34% /rootfs
> udev                   1031280       200   1031080   1% /rootfs/dev
> /dev/shm               1031280         0   1031280   0% /rootfs/dev/shm
> /dev/mapper/VolGroup00-LogVol00
>                      288433504 240305660  33476248  88% /
> /dev/sda6              2063504    662116   1296568  34% /export
> /dev/sda7            693727244 554704408 103783460  85% /srv/shared
> none                   1031280         0   1031280   0% /dev/shm
> [root@Berserker ~]# umount /rootfs/dev/shm
> [root@Berserker ~]# umount /rootfs/dev    
> [root@Berserker ~]# umount /rootfs    
> [root@Berserker ~]# df
> Filesystem           1K-blocks      Used Available Use% Mounted on
> rootfs               288433504 240305672  33476236  88% /
> /dev/mapper/VolGroup00-LogVol00
>                      288433504 240305672  33476236  88% /
> /dev/sda6              2063504    662116   1296568  34% /export
> /dev/sda7            693727244 554704408 103783460  85% /srv/shared
> none                   1031280         0   1031280   0% /dev/shm
> ===
>
> 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
>   

I added in the Cc Michael Holzt.

Thanks for reporting this.

  -- Daniel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Devel] Re: LXC container, unmounting unneeded mount points (from the  container namespace)
       [not found]                   ` <4B4DD076.3090007-GANU6spQydw@public.gmane.org>
@ 2010-01-13 14:15                     ` Michael H. Warfield
  0 siblings, 0 replies; 11+ messages in thread
From: Michael H. Warfield @ 2010-01-13 14:15 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Michael Holzt, mhw-BetbSzk+GohWk0Htik3J/w,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Ciprian Dorin, Craciun,
	lxc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f


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

On Wed, 2010-01-13 at 14:53 +0100, Daniel Lezcano wrote: 
> 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.
> >
> > This is what I get with the "return -1"'s commented out in the function
> > and laced with my own debugging prints to print each step of the umount
> > loop (this is with lxc.pivotdir = /rootfs):
> >
> > ===
> > [root@Berserker-Base ~]# lxc-start -n 1009
> > still mounted '/rootfs/dev'
> > umounted '/rootfs/dev/pts'
> > umounted '/rootfs/dev/shm'
> > still mounted '/rootfs/proc'
> > umounted '/rootfs/proc/bus/usb'
> > umounted '/rootfs/proc/sys/fs/binfmt_misc'
> > umounted '/rootfs/sys'
> > umounted '/rootfs/home'
> > still mounted '/rootfs/var'
> > umounted '/rootfs/var/lib/cgroup'
> > umounted '/rootfs/var/lib/nfs/rpc_pipefs'
> > umounted '/rootfs/usr'
> > umounted '/rootfs/boot'
> > still mounted '/rootfs/srv'
> > umounted '/rootfs/misc'
> > umounted '/rootfs/net'
> > still mounted '/rootfs/srv/lxc/root/1009'
> > umounted '/rootfs/srv/lxc/root/1009/export'
> > umounted '/rootfs/srv/lxc/root/1009/srv/shared'
> > umounted '/rootfs/srv/lxc/root/1009/dev/pts'
> > umounted '/rootfs/srv/lxc/root/1009/proc'
> > umounted '/rootfs/srv/lxc/root/1009/sys'
> > umounted '/rootfs/srv/lxc/root/1009/dev/shm'
> > umounted '/rootfs/srv/lxc/root/1009/dev/console'
> > umounted '/rootfs/srv/lxc/root/1009/dev/tty1'
> > umounted '/rootfs/srv/lxc/root/1009/dev/tty2'
> > umounted '/rootfs/srv/lxc/root/1009/dev/tty3'
> > umounted '/rootfs/srv/lxc/root/1009/dev/tty4'
> > umounted '/rootfs/srv/lxc/root/1009/dev/tty5'
> > umounted '/rootfs/srv/lxc/root/1009/dev/tty6'
> > still mounted '/rootfs/dev'
> > umounted '/rootfs/proc'
> > umounted '/rootfs/var'
> > still mounted '/rootfs/srv'
> > umounted '/rootfs/srv/lxc/root/1009'
> > still mounted '/rootfs/dev'
> > umounted '/rootfs/srv'
> > still mounted '/rootfs/dev'
> > lxc-start: could not umount 1 mounts
> > lxc-start: Device or resource busy - could not unmount old rootfs
> > INIT: version 2.86 booting
> > ===
> >
> > Container now continues to boot, since I commented out the error
> > returns.  Jumping into that container:
> >
> > === 
> > [root@Berserker ~]# df
> > Filesystem           1K-blocks      Used Available Use% Mounted on
> > rootfs               288433504 240305660  33476248  88% /
> > /dev/sda6              2063504    662116   1296568  34% /rootfs
> > udev                   1031280       200   1031080   1% /rootfs/dev
> > /dev/shm               1031280         0   1031280   0% /rootfs/dev/shm
> > /dev/mapper/VolGroup00-LogVol00
> >                      288433504 240305660  33476248  88% /
> > /dev/sda6              2063504    662116   1296568  34% /export
> > /dev/sda7            693727244 554704408 103783460  85% /srv/shared
> > none                   1031280         0   1031280   0% /dev/shm
> > [root@Berserker ~]# umount /rootfs/dev/shm
> > [root@Berserker ~]# umount /rootfs/dev    
> > [root@Berserker ~]# umount /rootfs    
> > [root@Berserker ~]# df
> > Filesystem           1K-blocks      Used Available Use% Mounted on
> > rootfs               288433504 240305672  33476236  88% /
> > /dev/mapper/VolGroup00-LogVol00
> >                      288433504 240305672  33476236  88% /
> > /dev/sda6              2063504    662116   1296568  34% /export
> > /dev/sda7            693727244 554704408 103783460  85% /srv/shared
> > none                   1031280         0   1031280   0% /dev/shm
> > ===
> >
> > 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
> >   

> I added in the Cc Michael Holzt.

> Thanks for reporting this.

I should now mention that I've been digging into it further and found
that I can not reproduce this on a second, similar, system I'm testing
on at this point.  It may be a peculiarity of the original system and
I'm just getting ready to test on a third as soon as I finish getting it
updated.

IAC, there should be some way to force the container to start, for
diagnostic purposes, in a case like this, without modifying the sources.
Having the old root directory still there isn't fatal to run the
container, particularly in a test system, even though highly undesirable
in a production VM.

> -- Daniel

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Devel] Re: LXC container, unmounting unneeded mount points (from the container namespace)
       [not found]                 ` <8e04b5821001080659y3c4bad1akbaa1e355bb1f730f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2010-01-08 15:12                   ` Daniel Lezcano
@ 2010-01-19 16:52                   ` Michael H. Warfield
  1 sibling, 0 replies; 11+ messages in thread
From: Michael H. Warfield @ 2010-01-19 16:52 UTC (permalink / raw)
  To: Ciprian Dorin, Craciun
  Cc: mhw-BetbSzk+GohWk0Htik3J/w,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA


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

On Fri, 2010-01-08 at 16:59 +0200, Ciprian Dorin, Craciun wrote: 
> On Fri, Jan 8, 2010 at 4:35 PM, Daniel Lezcano <daniel.lezcano-GANU6spQydw@public.gmane.org> wrote:
> > Ciprian Dorin, Craciun wrote:
> >>
> >> On Fri, Jan 8, 2010 at 4:17 PM, Daniel Lezcano <daniel.lezcano-GANU6spQydw@public.gmane.org>
> >> 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
> 
> 
>     Thanks, it works as expected. (It seems that it was in the
> repository... :) )
> 
>     And one question (off-topic): is there any mailing list dedicated
> to LXC users? (I guess that this mailing list is for the developers
> only, or?)

There is now...  Just created the other day.

The following is some basic information about your mailing list.

The web page for users of the mailing list is: 

    https://lists.sourceforge.net/lists/listinfo/lxc-users

There is also an email-based interface for users (not administrators)
of the list; you can get info about using it by sending a message
with just the word `help' as subject or in the body, to:

    lxc-users-request-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org

> Ciprian.

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-01-19 16:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2010-01-13 13:53                 ` Daniel Lezcano
     [not found]                   ` <4B4DD076.3090007-GANU6spQydw@public.gmane.org>
2010-01-13 14:15                     ` Michael H. Warfield

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.