Subject: Re: unmounting ext3/ext2
To: None <port-xen@NetBSD.org>
From: Jed Davis <jdev@panix.com>
List: port-xen
Date: 07/01/2007 04:13:33
pierre-philipp braun <pbraun@nethence.com> writes:

> node2# tar xjpf /xendoms/gentoo/stage3-i686-2007.0.tar.bz2 -C /mnt/lili
> node2# fstat | grep '/mnt/lili'
> node2# umount /mnt/lili
> umount: /mnt/lili: Device busy

Are there any device nodes in the tar file?  If this is the problem I
think it is, it's machine-independent and not new: vnodes created by
the bdevvp(9) routine -- e.g., the one from which the root filesystem
is initially mounted -- will be overwritten in place by the first
actual vnode with the same type and device number to be encountered.

Thus, an "ls -l /dev" before unrolling the tar file would likely
prevent the problem, by causing those device nodes to be run through
checkalias(9) first (I think; it's been a while since I last ran into
this.)

I am not at all clear on why *BSD behaves in this way.

-- 
(let ((C call-with-current-continuation)) (apply (lambda (x y) (x y)) (map
((lambda (r) ((C C) (lambda (s) (r (lambda l (apply (s s) l))))))  (lambda
(f) (lambda (l) (if (null? l) C (lambda (k) (display (car l)) ((f (cdr l))
(C k)))))))    '((#\J #\d #\D #\v #\s) (#\e #\space #\a #\i #\newline)))))