misc/72119: Detaching USB Memory Stick w/o umount causes zombie
fireball at zerouptime.ch
Sun Sep 26 17:20:20 PDT 2004
>Synopsis: Detaching USB Memory Stick w/o umount causes zombie devfs node
>Arrival-Date: Mon Sep 27 00:20:19 GMT 2004
>Originator: Jonas Nagel
FreeBSD hirtnb03.hirt.ch 5.3-BETA4 FreeBSD 5.3-BETA4 #1: Mon Sep 13 01:33:15 CEST 2004 root at hirtnb03.hirt.ch:/usr/obj/usr/src/sys/GENERIC i386
Removing the USB Stick without a prior umount of the node, will
leave the device node, e.g. /dev/da0s1 and /dev/da0 (both affected)
unusable for any further mounts; i.e. they had to be deleted and recreated
manually using mknod. I discovered this after I prepared a devd.conf piece
of script for devd, which does an automatic mount after umass0 connects
and a umount -f on the mountpoint after I remove the device.
Attach USB Stick, mount it to a mountpoint e.g. mount -t msdosfs /dev/da0s1 /mnt, remove USB stick, umount -f /mnt, then re-attach usb stick, try to mount -t msdosfs /dev/da0s1 /mnt again -> device not found.
A recommended workaround, of course, is to umount any device before removing it.
But as time progresses and other modern operating systems allow removal of
similar devices without problems, I hope FreeBSD goes that way too, sooner
or later. At least it shouldn't be a problem to re-attach the device again.
More information about the freebsd-bugs