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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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. |
| |||
| -----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----- |
| ||||
| 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----- |