Mombu the GNU Linux Forum

Go Back   Mombu the GNU Linux Forum > GNU_Linux > USB mass storage device difficulties
User Name
Password
REGISTER NOW! Mark Forums Read




Reply Bookmark and Share
1 5th November 04:09
jonathan martin
External User
 
Posts: 1
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.
  Reply With Quote


 


2 5th November 04:09
blackkopi
External User
 
Posts: 1
Default USB mass storage device difficulties



# rmmod usb-storage
  Reply With Quote
3 5th November 04:09
blackkopi
External User
 
Posts: 1
Default USB mass storage device difficulties


# rmmod usb-storage
  Reply With Quote
4 5th November 04:10
wong kum weng
External User
 
Posts: 1
Default USB mass storage device difficulties


# rmmod usb-storage
  Reply With Quote
5 5th November 04:14
+alan hicks+
External User
 
Posts: 1
Default USB mass storage device difficulties


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

In alt.os.linux.slackware, Wong Kum Weng dared to utter,


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-----
  Reply With Quote
6 5th November 04:15
+alan hicks+
External User
 
Posts: 1
Default 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
  Reply With Quote


 


Reply


Thread Tools
Display Modes


Some other forums that might be of your interest : Debian, Gentoo, Mandriva, Red hat, Suse, Slackware, Ubuntu, Gnu linux


Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666