[Lxc-users] lxc-start: Device or resource busy - could not unmount old rootfs
Pier Fumagalli
pier at betaversion.org
Wed Apr 14 04:35:46 UTC 2010
Sorry for not pointing it out earlier.
Yes, my problem is upon startup of the *first* container on Lucid, and it
works when rolling back to 0.6.3.
Here's what happens with 0.6.5:
lxc-start 1271218977.785 INFO lxc_conf - tty's configured
lxc-start 1271218977.785 DEBUG lxc_start - sigchild handler set
lxc-start 1271218977.785 INFO lxc_start - 'guest' is initialized
lxc-start 1271218977.813 DEBUG lxc_cgroup - using cgroup mounted at
'/var/local/cgroup'
lxc-start 1271218977.813 DEBUG lxc_cgroup - '/var/local/cgroup/13273'
renamed to '/var/local/cgroup/guest'
lxc-start 1271218977.813 INFO lxc_conf - 'myguest' hostname has been
setup
lxc-start 1271218977.832 DEBUG lxc_conf - mounted none on /srv/guest/sys,
type sysfs
lxc-start 1271218977.832 DEBUG lxc_conf - mounted proc on
/srv/guest/proc, type proc
lxc-start 1271218977.837 DEBUG lxc_conf - mounted none on
/srv/guest/dev/shm, type tmpfs
lxc-start 1271218977.837 DEBUG lxc_conf - mounted none on
/srv/guest/dev/pts, type devpts
lxc-start 1271218977.837 INFO lxc_conf - mount points have been setup
lxc-start 1271218977.861 INFO lxc_conf - mount points have been setup
lxc-start 1271218977.861 INFO lxc_conf - console '/dev/pts/0' mounted to
'/srv/guest/dev/console'
lxc-start 1271218977.861 INFO lxc_conf - 6 tty(s) has been setup
lxc-start 1271218977.872 DEBUG lxc_conf - temporary mountpoint for old
rootfs is './lxc-oldrootfs-343fqO'
lxc-start 1271218977.872 DEBUG lxc_conf - pivot_root syscall to
'/lxc-oldrootfs-343fqO' successful
lxc-start 1271218977.873 DEBUG lxc_conf - umounted
'/lxc-oldrootfs-343fqO/dev/pts'
lxc-start 1271218977.873 DEBUG lxc_conf - umounted
'/lxc-oldrootfs-343fqO/dev/shm'
lxc-start 1271218977.873 DEBUG lxc_conf - umounted
'/lxc-oldrootfs-343fqO/sys/fs/fuse/connections'
lxc-start 1271218977.873 DEBUG lxc_conf - umounted
'/lxc-oldrootfs-343fqO/sys/kernel/debug'
lxc-start 1271218977.873 DEBUG lxc_conf - umounted
'/lxc-oldrootfs-343fqO/sys/kernel/security'
lxc-start 1271218977.873 DEBUG lxc_conf - umounted
'/lxc-oldrootfs-343fqO/proc'
lxc-start 1271218977.873 DEBUG lxc_conf - umounted
'/lxc-oldrootfs-343fqO/var/run'
lxc-start 1271218977.873 DEBUG lxc_conf - umounted
'/lxc-oldrootfs-343fqO/var/lock'
lxc-start 1271218977.873 DEBUG lxc_conf - umounted
'/lxc-oldrootfs-343fqO/lib/init/rw'
lxc-start 1271218977.873 DEBUG lxc_conf - umounted
'/lxc-oldrootfs-343fqO/boot'
lxc-start 1271218977.873 DEBUG lxc_conf - umounted
'/lxc-oldrootfs-343fqO/var/local/cgroup'
lxc-start 1271218977.873 DEBUG lxc_conf - umounted
'/lxc-oldrootfs-343fqO/srv/guest/sys'
lxc-start 1271218977.873 DEBUG lxc_conf - umounted
'/lxc-oldrootfs-343fqO/srv/guest/proc'
lxc-start 1271218977.873 DEBUG lxc_conf - umounted
'/lxc-oldrootfs-343fqO/srv/guest/dev/shm'
lxc-start 1271218977.873 DEBUG lxc_conf - umounted
'/lxc-oldrootfs-343fqO/srv/guest/dev/pts'
lxc-start 1271218977.873 DEBUG lxc_conf - umounted
'/lxc-oldrootfs-343fqO/srv/guest/dev/console'
lxc-start 1271218977.873 DEBUG lxc_conf - umounted
'/lxc-oldrootfs-343fqO/srv/guest/dev/tty1'
lxc-start 1271218977.873 DEBUG lxc_conf - umounted
'/lxc-oldrootfs-343fqO/srv/guest/dev/tty2'
lxc-start 1271218977.873 DEBUG lxc_conf - umounted
'/lxc-oldrootfs-343fqO/srv/guest/dev/tty3'
lxc-start 1271218977.873 DEBUG lxc_conf - umounted
'/lxc-oldrootfs-343fqO/srv/guest/dev/tty4'
lxc-start 1271218977.873 DEBUG lxc_conf - umounted
'/lxc-oldrootfs-343fqO/srv/guest/dev/tty5'
lxc-start 1271218977.873 DEBUG lxc_conf - umounted
'/lxc-oldrootfs-343fqO/srv/guest/dev/tty6'
lxc-start 1271218977.873 DEBUG lxc_conf - umounted
'/lxc-oldrootfs-343fqO/dev'
lxc-start 1271218977.873 DEBUG lxc_conf - umounted
'/lxc-oldrootfs-343fqO/sys'
lxc-start 1271218977.873 DEBUG lxc_conf - umounted
'/lxc-oldrootfs-343fqO/var'
lxc-start 1271218977.873 ERROR lxc_conf - Device or resource busy - could
not unmount old rootfs
lxc-start 1271218977.873 ERROR lxc_conf - failed to pivot_root to
'/srv/guest'
lxc-start 1271218977.880 ERROR lxc_conf - failed to set rootfs for
'guest'
lxc-start 1271218977.880 ERROR lxc_start - failed to setup the container
lxc-start 1271218977.881 NOTICE lxc_start - '/sbin/init' started with pid
'13273'
lxc-start 1271218977.881 DEBUG lxc_utils - closing fd '1'
lxc-start 1271218977.881 DEBUG lxc_utils - closing fd '0'
lxc-start 1271218977.881 DEBUG lxc_utils - closed all inherited file
descriptors
lxc-start 1271218977.923 DEBUG lxc_start - child exited
lxc-start 1271218977.923 INFO lxc_error - child <13273> ended on error
(255)
lxc-start 1271218977.923 DEBUG lxc_cgroup - using cgroup mounted at
'/var/local/cgroup'
lxc-start 1271218977.963 DEBUG lxc_cgroup - '/var/local/cgroup/guest'
unlinked
When downgrading to 0.6.3 (backported from Karmic) everything works
absolutely great:
lxc-start 1271219150.203 DEBUG lxc_state - set state to 'STARTING'
lxc-start 1271219150.204 INFO lxc_conf - tty's configured
lxc-start 1271219150.204 DEBUG lxc_start - sigchild handler set
lxc-start 1271219150.204 INFO lxc_start - 'guest' is initialized
lxc-start 1271219150.232 DEBUG lxc_cgroup - using cgroup mounted at
'/var/local/cgroup'
lxc-start 1271219150.232 DEBUG lxc_cgroup - '/var/local/cgroup/13654'
renamed to '/var/local/cgroup/guest'
lxc-start 1271219150.232 DEBUG lxc_cgroup - using cgroup mounted at
'/var/local/cgroup'
lxc-start 1271219150.233 DEBUG lxc_cgroup - '/var/local/cgroup/guest'
linked to '/var/lib/lxc/guest/nsgroup'
lxc-start 1271219150.233 INFO lxc_conf - 'myguest' hostname has been
setup
lxc-start 1271219150.233 DEBUG lxc_conf - mounted none on /srv/guest/sys,
type sysfs
lxc-start 1271219150.233 DEBUG lxc_conf - mounted proc on
/srv/guest/proc, type proc
lxc-start 1271219150.233 DEBUG lxc_conf - mounted none on
/srv/guest/dev/shm, type tmpfs
lxc-start 1271219150.233 DEBUG lxc_conf - mounted none on
/srv/guest/dev/pts, type devpts
lxc-start 1271219150.233 DEBUG lxc_conf - mounted /srv/guest on
/var/lib/lxc/guest/rootfs, type none
lxc-start 1271219150.233 INFO lxc_conf - mount points have been setup
lxc-start 1271219150.233 INFO lxc_conf - console '/dev/pts/0' mounted to
'/var/lib/lxc/guest/rootfs/dev/console'
lxc-start 1271219150.233 INFO lxc_conf - 6 tty(s) has been setup
lxc-start 1271219150.233 INFO lxc_conf - chrooted to
'/var/lib/lxc/guest/rootfs'
lxc-start 1271219150.233 NOTICE lxc_conf - 'guest' is setup.
lxc-start 1271219150.233 NOTICE lxc_start - exec'ing '/sbin/init'
lxc-start 1271219150.289 DEBUG lxc_state - set state to 'RUNNING'
lxc-start 1271219150.289 NOTICE lxc_start - '/sbin/init' started with pid
'13654'
lxc-start 1271219150.289 DEBUG lxc_utils - closing fd '1'
lxc-start 1271219150.289 DEBUG lxc_utils - closing fd '0'
lxc-start 1271219150.289 DEBUG lxc_utils - closed all inherited file
descriptors
My "lxc.conf" is shockingly trivial:
lxc.utsname = myguest
lxc.tty = 6
lxc.rootfs = /srv/guest
lxc.mount = /srv/guest.fstab
And my "guest.fstab" (pointed at from "lxc.mount") even simpler:
none /srv/guest/sys sysfs nosuid,noexec,nodev 0 0
proc /srv/guest/proc proc nosuid,noexec,nodev 0 0
none /srv/guest/dev/shm tmpfs nosuid,noexec,nodev 0 0
none /srv/guest/dev/pts devpts nosuid,noexec 0 0
I wanted to try Daniel's patch [1] tested before reporting it, but didn't
quite get around to it just yet, and Matt looked exactly in my same
situation...
Pier
[1]
http://www.mail-archive.com/lxc-users@lists.sourceforge.net/msg00032.html
On Wed, Apr 14, 2010 at 12:29, Serge E. Hallyn <serue at us.ibm.com> wrote:
> Pier, the url you quote talks about only the second container
> failing. Is that your experience as well?
>
> Matt, yours fails on the very first container, right?
>
> Matt, can you confirm that downgrading to 0.6.3 (which does not
> use pivot_root iirc) works for you? I'll try to take a look on
> my own karmic server kvm instance this week.
>
> thanks,
> -serge
>
> Quoting Pier Fumagalli (pier at betaversion.org):
> > It seems to me this is pretty much what I'm seeing too with 0.6.5.
> >
> >
> http://www.mail-archive.com/lxc-users@lists.sourceforge.net/msg00029.html
> >
> > In my case, I downgraded to 0.6.3 and it works just fine.
> >
> > Pier
> >
> >
> > On Wed, Apr 14, 2010 at 05:33, Matt Bailey <mbailey at system42.net> wrote:
> >
> > > With lxc 0.6.5, I am having a problem starting a container. Here is
> > > the debug output. (FWIW, my /var is a separate partition on the host)
> > >
> > > # lxc-start -n test -l DEBUG -o $(tty)
> > > lxc-start 1271189821.303 INFO lxc_conf - tty's configured
> > > lxc-start 1271189821.303 DEBUG lxc_start - sigchild handler set
> > > lxc-start 1271189821.303 INFO lxc_start - 'test' is
> initialized
> > > lxc-start 1271189821.313 DEBUG lxc_conf - instanciated veth
> > > 'veth5RnMGB/veth28579F', index is '14'
> > > lxc-start 1271189821.394 DEBUG lxc_cgroup - using cgroup
> > > mounted at '/cgroup'
> > > lxc-start 1271189821.395 DEBUG lxc_cgroup - '/cgroup/2229'
> > > renamed to '/cgroup/test'
> > > lxc-start 1271189821.554 DEBUG lxc_conf - move 'br0' to '2229'
> > > lxc-start 1271189821.554 INFO lxc_conf - 'test' hostname has
> > > been setup
> > > lxc-start 1271189821.571 DEBUG lxc_conf - 'eth0' has been setup
> > > lxc-start 1271189821.571 INFO lxc_conf - network has been
> setup
> > > lxc-start 1271189821.571 DEBUG lxc_cgroup - using cgroup
> > > mounted at '/cgroup'
> > > lxc-start 1271189821.571 DEBUG lxc_conf - cgroup
> > > 'devices.deny' set to 'a'
> > > lxc-start 1271189821.572 DEBUG lxc_conf - cgroup
> > > 'devices.allow' set to 'c 1:3 rwm'
> > > lxc-start 1271189821.572 DEBUG lxc_conf - cgroup
> > > 'devices.allow' set to 'c 1:5 rwm'
> > > lxc-start 1271189821.572 DEBUG lxc_conf - cgroup
> > > 'devices.allow' set to 'c 5:1 rwm'
> > > lxc-start 1271189821.572 DEBUG lxc_conf - cgroup
> > > 'devices.allow' set to 'c 5:0 rwm'
> > > lxc-start 1271189821.572 DEBUG lxc_conf - cgroup
> > > 'devices.allow' set to 'c 4:0 rwm'
> > > lxc-start 1271189821.572 DEBUG lxc_conf - cgroup
> > > 'devices.allow' set to 'c 4:1 rwm'
> > > lxc-start 1271189821.572 DEBUG lxc_conf - cgroup
> > > 'devices.allow' set to 'c 1:9 rwm'
> > > lxc-start 1271189821.572 DEBUG lxc_conf - cgroup
> > > 'devices.allow' set to 'c 1:8 rwm'
> > > lxc-start 1271189821.572 DEBUG lxc_conf - cgroup
> > > 'devices.allow' set to 'c 136:* rwm'
> > > lxc-start 1271189821.572 DEBUG lxc_conf - cgroup
> > > 'devices.allow' set to 'c 5:2 rwm'
> > > lxc-start 1271189821.572 DEBUG lxc_conf - cgroup
> > > 'devices.allow' set to 'c 254:0 rwm'
> > > lxc-start 1271189821.572 INFO lxc_conf - cgroup has been setup
> > > lxc-start 1271189821.572 INFO lxc_conf - mount points have
> been
> > > setup
> > > lxc-start 1271189821.572 INFO lxc_conf - console
> > > '/dev/pts/0' mounted to '/var/lib/urizen-slicer/fs/test/dev/console'
> > > lxc-start 1271189821.572 INFO lxc_conf - 4 tty(s) has been
> setup
> > > lxc-start 1271189821.572 DEBUG lxc_conf - temporary
> > > mountpoint for old rootfs is './lxc-oldrootfs-y10fSV'
> > > lxc-start 1271189821.572 DEBUG lxc_conf - pivot_root syscall
> > > to '/lxc-oldrootfs-y10fSV' successful
> > > lxc-start 1271189821.573 DEBUG lxc_conf - umounted
> > > '/lxc-oldrootfs-y10fSV/dev/pts'
> > > lxc-start 1271189821.573 DEBUG lxc_conf - umounted
> > > '/lxc-oldrootfs-y10fSV/dev/shm'
> > > lxc-start 1271189821.573 DEBUG lxc_conf - umounted
> > > '/lxc-oldrootfs-y10fSV/sys/fs/fuse/connections'
> > > lxc-start 1271189821.573 DEBUG lxc_conf - umounted
> > > '/lxc-oldrootfs-y10fSV/sys/kernel/debug'
> > > lxc-start 1271189821.573 DEBUG lxc_conf - umounted
> > > '/lxc-oldrootfs-y10fSV/sys/kernel/security'
> > > lxc-start 1271189821.573 DEBUG lxc_conf - umounted
> > > '/lxc-oldrootfs-y10fSV/proc'
> > > lxc-start 1271189821.573 DEBUG lxc_conf - umounted
> > > '/lxc-oldrootfs-y10fSV/var/run'
> > > lxc-start 1271189821.573 DEBUG lxc_conf - umounted
> > > '/lxc-oldrootfs-y10fSV/var/lock'
> > > lxc-start 1271189821.573 DEBUG lxc_conf - umounted
> > > '/lxc-oldrootfs-y10fSV/lib/init/rw'
> > > lxc-start 1271189821.573 DEBUG lxc_conf - umounted
> > > '/lxc-oldrootfs-y10fSV/cgroup'
> > > lxc-start 1271189821.573 DEBUG lxc_conf - umounted
> > > '/lxc-oldrootfs-y10fSV/var/lib/urizen-slicer/fs/test/dev/console'
> > > lxc-start 1271189821.573 DEBUG lxc_conf - umounted
> > > '/lxc-oldrootfs-y10fSV/var/lib/urizen-slicer/fs/test/dev/tty1'
> > > lxc-start 1271189821.573 DEBUG lxc_conf - umounted
> > > '/lxc-oldrootfs-y10fSV/var/lib/urizen-slicer/fs/test/dev/tty2'
> > > lxc-start 1271189821.573 DEBUG lxc_conf - umounted
> > > '/lxc-oldrootfs-y10fSV/var/lib/urizen-slicer/fs/test/dev/tty3'
> > > lxc-start 1271189821.573 DEBUG lxc_conf - umounted
> > > '/lxc-oldrootfs-y10fSV/var/lib/urizen-slicer/fs/test/dev/tty4'
> > > lxc-start 1271189821.573 DEBUG lxc_conf - umounted
> > > '/lxc-oldrootfs-y10fSV/dev'
> > > lxc-start 1271189821.573 DEBUG lxc_conf - umounted
> > > '/lxc-oldrootfs-y10fSV/sys'
> > > lxc-start 1271189821.573 DEBUG lxc_conf - umounted
> > > '/lxc-oldrootfs-y10fSV/var'
> > > lxc-start 1271189821.573 ERROR lxc_conf - Device or resource
> > > busy - could not unmount old rootfs
> > > lxc-start: Device or resource busy - could not unmount old rootfs
> > > lxc-start 1271189821.573 ERROR lxc_conf - failed to
> > > pivot_root to '/var/lib/urizen-slicer/fs/test'
> > > lxc-start: failed to pivot_root to '/var/lib/urizen-slicer/fs/test'
> > > lxc-start 1271189821.573 ERROR lxc_conf - failed to set
> > > rootfs for 'test'
> > > lxc-start: failed to set rootfs for 'test'
> > > lxc-start 1271189821.573 ERROR lxc_start - failed to setup
> > > the container
> > > lxc-start: failed to setup the container
> > > lxc-start 1271189821.573 NOTICE lxc_start - '/sbin/init'
> > > started with pid '2229'
> > > lxc-start 1271189821.573 DEBUG lxc_utils - closing fd '1'
> > > lxc-start 1271189821.573 DEBUG lxc_utils - closing fd '0'
> > > lxc-start 1271189821.573 DEBUG lxc_utils - closed all
> > > inherited file descriptors
> > > lxc-start 1271189821.634 DEBUG lxc_start - child exited
> > > lxc-start 1271189821.634 INFO lxc_error - child <2229> ended
> > > on error (255)
> > > lxc-start 1271189821.634 DEBUG lxc_cgroup - using cgroup
> > > mounted at '/cgroup'
> > > lxc-start 1271189821.714 DEBUG lxc_cgroup - '/cgroup/test'
> unlinked
> > >
> > >
> > > Thanks,
> > > --
> > > Matt Bailey
> > >
> > >
> > >
> ------------------------------------------------------------------------------
> > > Download Intel® Parallel Studio Eval
> > > Try the new software tools for yourself. Speed compiling, find bugs
> > > proactively, and fine-tune applications for parallel performance.
> > > See why Intel Parallel Studio got high marks during beta.
> > > http://p.sf.net/sfu/intel-sw-dev
> > > _______________________________________________
> > > Lxc-users mailing list
> > > Lxc-users at lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/lxc-users
> > >
>
> >
> ------------------------------------------------------------------------------
> > Download Intel® Parallel Studio Eval
> > Try the new software tools for yourself. Speed compiling, find bugs
> > proactively, and fine-tune applications for parallel performance.
> > See why Intel Parallel Studio got high marks during beta.
> > http://p.sf.net/sfu/intel-sw-dev
>
> > _______________________________________________
> > Lxc-users mailing list
> > Lxc-users at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/lxc-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20100414/71645d3b/attachment.html>
More information about the lxc-users
mailing list