Unix Technical Forum

USB mass storage device difficulties

This is a discussion on USB mass storage device difficulties within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Sorry for the vague subject, this problem is hard to summarize. Bascically I'm trying to get Linux to forget ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-19-2008, 04:10 PM
Jonathan Martin
 
Posts: n/a
Default USB mass storage device difficulties

Sorry for the vague subject, this problem is hard to summarize.

Bascically I'm trying to get Linux to forget what USB mass storage
devices (keychains, portable HDs, etc.) it has seen.

When I plug in a keychain it is attached as /dev/sda1 and I can do stuff
with it (mount it, use mtools, whatever). I unplug it and plug in a
different keychain. That one is attached as /dev/sdb1. And so on.
Each new USB device is attached as a different SCSI device.
/proc/scsi/usb-storage-*/* correctly shows the devices, and correctly
indicates which are still attached.

The behavior I need is for Linux to forget the device when it is detached.
If I plug something in it should show up as sda1. If I unplug it and
plug something else in the new one should show up as sda1. The only time
I want to see sdb and higher is if I have more than one device plugged in
at a time.

Is there an easy, clean (no gross automount stuff) way to do this? Or
do I have to hack the kernel?
--
READ THIS -> http://www.xs4all.nl/~hanb/documents/quotingguide.html
Jon Martin - Undergraduate Labs Systems Administrator (ISG - labadmin)
Department of Computing Science at University of Alberta.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-19-2008, 04:10 PM
blackkopi
 
Posts: n/a
Default Re: USB mass storage device difficulties

Jonathan Martin wrote:
> Sorry for the vague subject, this problem is hard to summarize.
>


# rmmod usb-storage

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-19-2008, 04:10 PM
blackkopi
 
Posts: n/a
Default Re: USB mass storage device difficulties

Jonathan Martin wrote:
> Sorry for the vague subject, this problem is hard to summarize.
>


# rmmod usb-storage

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-19-2008, 04:10 PM
Wong Kum Weng
 
Posts: n/a
Default Re: USB mass storage device difficulties

Jonathan Martin wrote:
> Sorry for the vague subject, this problem is hard to summarize.
>


# rmmod usb-storage

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-19-2008, 04:10 PM
+Alan Hicks+
 
Posts: n/a
Default Re: USB mass storage device difficulties

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

In alt.os.linux.slackware, Wong Kum Weng dared to utter,
> # rmmod usb-storage


OP, I haven't tested that myself but that seems to be the working solution.
You may want to google around and ask the hotplug gurus if there's some
way for hotplug to detect the removal of the usb drive and then remove
that module and re-insmod it, or perhaps some way to wipe the module
clean whenever the disk is removed.

- --
It is better to hear the rebuke of the wise,
Than for a man to hear the song of fools.
Ecclesiastes 7:5
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFBYpxClKR45I6cfKARAlkiAKCHwsy/1crl9Pug8a98GzYuwMvGOwCcC+P5
DN85BSos4K65z9ARAEOeZx4=
=9tqr
-----END PGP SIGNATURE-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-19-2008, 04:10 PM
+Alan Hicks+
 
Posts: n/a
Default Re: USB mass storage device difficulties

NOTE: This message was sent thru a mail2news gateway.
No effort was made to verify the identity of the sender.
--------------------------------------------------------

pgp trash troll delete

Hicks, Alan
188 Shady Dale Dr
Lizella, GA 31052
478-935-8132

+Alan Hicks+ <alan@lizella.network> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> In alt.os.linux.slackware, Wong Kum Weng dared to utter,
>> # rmmod usb-storage

>
> OP, I haven't tested that myself but that seems to be the working solution.
> You may want to google around and ask the hotplug gurus if there's some
> way for hotplug to detect the removal of the usb drive and then remove
> that module and re-insmod it, or perhaps some way to wipe the module
> clean whenever the disk is removed.
>
> - --
> It is better to hear the rebuke of the wise,
> Than for a man to hear the song of fools.
> Ecclesiastes 7:5
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (GNU/Linux)
>
> iD8DBQFBYpxClKR45I6cfKARAlkiAKCHwsy/1crl9Pug8a98GzYuwMvGOwCcC+P5
> DN85BSos4K65z9ARAEOeZx4=
> =9tqr
> -----END PGP SIGNATURE-----












Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:16 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com