USB memory stick hotswap problems

Jeremy Chadwick freebsd at jdc.parodius.com
Sat Sep 25 17:59:44 PDT 2004


Can't usbd (or better yet, usbd.conf) be modified or changed in some way
to automatically handle the unmounting of any existing filesystems that
match the device which is mounted?

Seems like we're eventually going to need this to make hot-swappable USB
devices more friendly.  I understand why you must unmount a device
before SCSI CAM gets disconnected from it, but it just seems that this
should be a job for usbd.

-- 
| Jeremy Chadwick                                 jdc at parodius.com |
| Parodius Networking                        http://www.parodius.com/ |
| UNIX Systems Administrator                   Mountain View, CA, USA |
| Making life hard for others since 1977.                             |

On Sun, Sep 26, 2004 at 02:13:47AM +0200, Benjamin Lutz wrote:
> > panic.
> > 
> > You must unmount volumes before removing them from the system. Otherwise
> > there is unflushed dirty data that will get lost, causing data
> > corruption on the volume.  You will get a panic since the system doesn't
> > know what to do with the data and wants to avoid causing any further
> > damage.
> 
> Seems that in this case panicing does more damage, instead of of just the
> not yet flushed data on the usb stick, you lose everything you've just
> been working on that's not yet been saved to disk.
> 
> Sure, it probably does wonders for user education...
> 
> Seriously though, can't this be changed? When I find myself in the
> situation of having unplugged my usb stick, it appears there's nothing I
> can do to rectify the situation, except ignore the mounted file system.
> Not exactly a comfortable position for a unix system admin.
> 
> Unfortunately, I'm not a kernel hacker.
> 
> Benjamin




More information about the freebsd-current mailing list