[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: schroot boot up messages



On Tue, 29 May 2007 11:06:24 -0500,
C M Reinehr <cmr@amsent.com> wrote:

[...]

> 	When schroot setups up a chroot environment it builds a chroot in
> /var/lib/schroot. Under the directory mount it creates a new directory
> using a concatenation of the chroot name and a unique identifier. (I
> haven't taken the time to figure out the means.) That's the alphanumeric
> code that you're seeing.) Schroot also creats a file of the same name
> under the directory session.

> 	When things work correctly, all of this is removed after you exit
> the chroot, but for some reason (with type=plain I believe) things are
> not getting shutdown & removed correctly. Here, I first noticed it when
> I ran a `mount` command to see what was mounted and noticed all of these
> old schroot sessions were still mounted. What's more, they would not
> `umount` because of some active process. (Can't remember the name now.)
> I finally was able to clean things up by switching into
> single-user/maintenance mode and removing all of the mount & session
> entries. In the process, I CLOBBERED MY CHROOT DIRECTORY!

Thanks for explaining this.  I found what was under /var/lib/schroot:

,-----[ ls -alh /var/lib/schroot ]
| total 24K
| drwxr-xr-x  4 root root 4.0K 2006-10-22 08:40 .
| drwxr-xr-x 64 root root 4.0K 2007-05-22 15:48 ..
| drwxr-xr-x  2 root root 8.0K 2007-05-29 17:11 mount
| drwxr-xr-x  2 root root 8.0K 2007-05-29 17:11 session
`-----

and inside both those directories there were indeed plenty of sessions
that were not closed properly.  It's amazing this happened without any
warning when exiting the chroots.  At any rate, I unmounted everything in
the chroot and removed all the files under the session directory above,
which were named as you mentioned, and all the directories under the mount
directory (named similarly).  I also changed to type=directory as you
suggested.  I don't know what you mean by "clobbered" above, but after all
these removals and changes, something strange happened.  After boot up,
the messages were gone, but I couldn't start my chroot, receiving a
message about proc being already mounted (didn't write it down).  Maybe
the third time I booted, I could get into my chroot, and everything is
back to normal.  Puzzling, but hey it works now.  Would be nice to hear
from some schroot gurus around.

Thanks!


-- 
Seb



Reply to: