Subject: Re: [New to NetBSD] USB mass-storage hotplug?
To: Courtney R. Spencer <>
From: Carl Brewer <>
List: netbsd-users
Date: 06/30/2005 13:28:05
Courtney R. Spencer wrote:
> On Thu Jun 23, 2005 at 03:00:55PM +0000, Sylvain Briole wrote:
>>Hi all,
>>I am a new user of NetBSD, with a Debian Linux background.
>>I would like to know how to use USB mass-storage "hotplug" in NetBSD.
>>In Debian Linux Woody I was doing like this to avoid any problem:
>>- /etc/init.d/hotplug start
>>- plug in USB hard disk
>>- mount /dev/usb_drive /mount_point
>>- working with the drive
>>- umount /mount_point
>>- /etc/init.d/hotplug stop
>>- plug out USB hard disk
>>I have read USB manpages (usb(4), umass(4)) on NetBSD 2.0.2, but I did not find
>>out how to use "hotplug". Do I have to do anything before/after :
>>- plug-in?
>>- plug-out?
>>To avoid any kernel panic or something like this?
>>I thank you in advance,
> To answer your question, since you do use mount/umount, there
> is no other script needed and nothing else you have to do in netbsd.  

Except maybe patch the kernel!  umass has known problems
with removable storage (it's broken in 2.0.2 at least)
that AFAIK (please tell me someone has fixed it!) means
that after a "while" you can't mount removable disks, due to :

umass0: using SCSI over Bulk-Only
umass0: no buffer memory

which seems to happen after a while (days? hours?  I'm not
sure yet)

I've a PR on it :