From owner-freebsd-current@FreeBSD.ORG Sat Sep 25 11:17:18 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D54A16A4CE for ; Sat, 25 Sep 2004 11:17:18 +0000 (GMT) Received: from lara.cc.fer.hr (lara.cc.fer.hr [161.53.72.113]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3EDCB43D2F for ; Sat, 25 Sep 2004 11:17:17 +0000 (GMT) (envelope-from ivoras@fer.hr) Received: from [127.0.0.1] (localhost.cc.fer.hr [127.0.0.1]) by lara.cc.fer.hr (8.13.1/8.13.1) with ESMTP id i8PBGc1B000788 for ; Sat, 25 Sep 2004 13:16:39 +0200 (CEST) (envelope-from ivoras@fer.hr) Message-ID: <41555396.4030009@fer.hr> Date: Sat, 25 Sep 2004 13:16:38 +0200 From: Ivan Voras User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: current@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: USB memory stick hotswap problems X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Sep 2004 11:17:18 -0000 What is the expected behavour when umounting USB drives which have already been unplugged? :) I'm sure I'm not the only one who often forgets to umount these thingies when leaving the site I'm working at the moment, so it should probably be something other than what I always encounter (BETA5): a) "You can't". Whatever I do, either umount gets "stuck" (even with -f) and does nothing (cpu is not used, so it's waiting for something), or it just exits with "device not configured". b) Kernel panic. This happens after using the drive for a long time, and umounting it some time later (even several hours later when the drive is no longer available at the site). c) A curious behaviour: umount -f works (probably because nothing has been written to the drive), but after re-plugging the drive, I have *two* /dev/da0 and /dev/da0s1 devices, and the system refuses to remount the filesystem ("device not configured"): crw-r----- 1 root operator 4, 25 Aug 25 12:46 da0 crw-r----- 1 root operator 4, 25 Aug 25 12:46 da0 crw-r----- 1 root operator 4, 26 Aug 25 12:46 da0s1 crw-r----- 1 root operator 4, 26 Aug 25 12:46 da0s1 Also, I can 100% reliably panic the system when these entries are added to the /etc/devd.conf and the drive is *plugged in*: attach 100 { device-name "da0"; action "mount /mnt/flash"; }; detach 100 { device-name "da0"; action "umount -f /mnt/flash"; }; (I modelled these on the "ukbd0" example. Using "umass0" for device name did nothing). Any ideas how to solve or circumevent these problems? (Aside from "don't do that").