Unable to umount union-parts after umounting unionfs
Philip Paeps
philip at freebsd.org
Wed Jun 22 06:54:01 GMT 2005
When playing with union filesystems this morning, I noticed that it's not
possible to unmount the directory mounted on union cleanly, even after the
union has been cleanly unmounted, once you've read from the union:
Setup:
# touch fs1 fs2
# mkdir tstfs
# mdconfig -a -t vnode -f fs1 -s 16M
# mdconfig -a -t vnode -f fs2 -s 16M
# newfs /dev/md0
# newfs /dev/md1
# mount /dev/md0 tstfs/
# mount /dev/md1 /mnt
# mount -t unionfs /mnt tstfs/
Trying to umount /mnt now fails as expected:
# umount /mnt
umount: unmount of /mnt failed: Device busy
Unmounting after the union has been unmounted without anything having been
read from it or written to it, is no problem either:
# umount tstfs/
# umount /mnt
When something has been written to the union, but nothing has been read from
it, there's not problem either:
# touch tstfs/foo
# umount tstfs/
# umount /mnt
When something has been read, however:
# ls tstfs/
.snap/ foo
# umount tstfs/
# umount /mnt
umount: unmount of /mnt failed: Device busy
Strangely, when an 'empty' union is read from, there's no problem unmounting
it. It's only when it's read when there's something on it. In other words,
from a clean setup:
# ls tstfs/
.snap/
# umount tstfs/
# umount /mnt
But (continuing on the clean setup):
# mount /dev/md1 /mnt
# mount -t unionfs /mnt tstfs/
# touch tstfs/foo
# umount tstfs/
# umount /mnt
# mount /dev/md1 /mnt
# mount -t unionfs /mnt tstfs/
# ls tstfs/
.snap/ foo
# umount tstfs/
# umount /mnt
umount: unmount of /mnt failed: Device busy
Is anyone else seeing this? :-)
- Philip
--
Philip Paeps Please don't Cc me, I am
philip at freebsd.org subscribed to the list.
BOFH Excuse #237:
Plate voltage too low on demodulator tube
More information about the freebsd-current
mailing list