Subject: kern/32112: unmounting a filesystem restored in single-user mode fails
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Pavel Cahyna <pcah8322@artax.karlin.mff.cuni.cz>
List: netbsd-bugs
Date: 11/19/2005 10:22:00
>Number:         32112
>Category:       kern
>Synopsis:       unmounting a filesystem restored in single-user mode fails
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 19 10:22:00 +0000 2005
>Originator:     Pavel Cahyna
>Release:        NetBSD 3.0_BETA
>Organization:
>Environment:
System: NetBSD beta 3.0_BETA NetBSD 3.0_BETA (BETA) #4: Fri Oct 7 21:20:07 CEST 2005 root@beta:/usr/src/sys/arch/alpha/compile/BETA alpha
Architecture: alpha
Machine: alpha
>Description:
I want to populate a new filesystem (sd1a) from backup (on wd0a). So I
boot to single user, and do following actions:
# newfs sd1a
# mount -o softdep /dev/sd1a /altroot
##or -o async, this makes no difference
# mount -t mfs -o-s32m none /tmp
##restore wants to create a temporary file
# mount -r /dev/wd0a /mnt/data
# cd /altroot
# restore -rf /mnt/data/backup.dump
##(wait)
# cd /
# umount /altroot
umount: /altroot: Device busy

there is no process running except the shell, mount_mfs and init...

Also, when I exit the single user shell, the following is printed:
mount_ffs: /dev/sd0a on /: specified device does not match mounted
device

and many start-up commands fail with "Read-only filesystem".

In multi-user mode everything works correctly, the filesystem can be
normally unmounted.
>How-To-Repeat:
see above.
>Fix: