LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   using multiple USB flash devices (https://www.linuxquestions.org/questions/slackware-14/using-multiple-usb-flash-devices-268935/)

luv2hike 12-21-2004 04:56 PM

using multiple USB flash devices
 
I'm having an issue using 2 differnet USB flash drive devices on my Slack 10 system running the 2.4.26 kernel. If I just use one device, everything works fine with it mounting as /dev/sda1 on /mnt/usb.

If I use the 2nd device (not at the same time but alternately), it says no device found at /dev/sda1. To get around this I have to become root, modprobe -r usb-storage then modprobe usb-storage, in effect, reload this module. Then it mounts fine. As long as I keep mounting/unmounting this same device, cool.

However, if I go back to use the first device, I get the same error and must do the same procedure to get around it. It seems the usb-storage module doesn't handle different devices without reloading. Is there a fix for this? Or, is there a way this manual workaround process can be automated?

Linux.tar.gz 12-21-2004 06:04 PM

I have the same problem. The second device is recognized as /dev/sdb1. This is interesting as i'm developing a package which autoconfigure the automounter (submount for now) and many other things. And i didn't find an answer to this problem.

sporks 12-21-2004 09:01 PM

I've not had any issues.

Just added /dev/sda1 and /dev/sdb1 to my fstab with the /mnt/* directory for each.

No need to modprobe or any of that. :?

JohnKFT 12-22-2004 08:04 AM

I hade the same situation with memory cards in my laptop PCMCIA slot. Discovered from /var/lib/pcmcia/stab that the first card inserted into the double slot (either slot) goes on /dev/hde1 and the second on hdg1. Like sporks I just mapped /dev/hde1 to /mnt/Card1 and /dev/hdg1 to /mnt/Card2.

Y@bon 12-22-2004 08:39 AM

The solution is to use udev and hotplug.
In fact, you can create a symlink of a device probed by hotplug.
Then, you could use this symling in /etc/fstab to mount this device without knowing the real device name /dev/sd?1
A good tutorial : http://www.reactivated.net/udevrules.php

My rules :
Code:

yabon@yabon | 15:34 | ~
-> cat /etc/udev/rules.d/local.rules
# /etc/udev/udev.rules-local:  Personal rules

# Espon Stylus Photo 890
BUS="usb", SYSFS{manufacturer}="EPSON", SYSFS{product}="USB Printer", SYSFS{serial}="XXXXXXXXXXXXX", NAME="usb/%k", SYMLINK="epson890"

# Creative Muvo TX (MP3)
BUS="scsi", KERNEL="sd?1", SYSFS{vendor}="Creative", SYSFS{model}="NOMAD MuVo TX  ", NAME="%k", SYMLINK="muvo_tx"
   
# External usb drive
BUS="scsi", KERNEL="sd?1", SYSFS{vendor}="Maxtor 6", SYSFS{model}="Y160L0          ", NAME="%k", SYMLINK="dd_externe"

Code:

yabon@yabon | 15:34 | ~
-> cat /etc/fstab
....
# External drive
/dev/dd_externe  /mnt/dd_externe  vfat        noauto,user,umask=077  0  0
/dev/muvo_tx    /mnt/muvotx      vfat        noauto,user,umask=077  0  0
...


sporks 12-22-2004 09:35 AM

Quote:

Originally posted by JohnKFT
I hade the same situation with memory cards in my laptop PCMCIA slot. Discovered from /var/lib/pcmcia/stab that the first card inserted into the double slot (either slot) goes on /dev/hde1 and the second on hdg1. Like sporks I just mapped /dev/hde1 to /mnt/Card1 and /dev/hdg1 to /mnt/Card2.
Yes, I should have been more clear, the first one plugged in is /dev/sda1 or the first one from the right on the USB hub becomes /dev/sda1 then /dev/sdb1.

phase9 01-04-2005 05:19 PM

Hi!

When I'm trying to use udevinfo (for one of my usb sticks (which is either sdc or sdd)), I get the following message:

user@box:~# udevinfo -q path -n /dev/sdc
unable to open udev database


I'm using kernel-2.4.26 with slack-10.0 (udev-026-i486-1.tgz package ist installed).
Could it be that the udev rules could only be used with the 2.6.x kernel?

cathectic 01-04-2005 08:21 PM

Quote:

Could it be that the udev rules could only be used with the 2.6.x kernel?
Yes. 2.4 kernels use devfs for device management, whereas 2.6 uses udev/sysfs. Therefore, udev rules do not apply to devfs (and neither do they apply to the 2.4 kernels).


All times are GMT -5. The time now is 06:48 PM.