Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
devfs & multiple usb-storage devices
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
jmusits
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jan 2004
Posts: 117
Location: New York

PostPosted: Fri Aug 20, 2004 4:40 pm    Post subject: devfs & multiple usb-storage devices Reply with quote

Hey all, it's been a while since I've posted here, life has kept me much too busy.

Here's my problem: I have three usb devices which utilize the USB-MASS-STORAGE kernel module, 1) a thumbdrive, 2) a scanner, and 3) a digital camera. They all work wonderfully. The only gripe I have is that each one binds to a different device eg: /dev/sda, /dev/sdb. Now thats fine, but the device each one binds to is dependent on the order in which you plug it in. For example, if I plug in the thumbdrive and then the scanner, the thumbdrive is /dev/sda and the scanner is /dev/sdb. But if I plug in the scanner and then the thumbdrive the scanner is /dev/sda and the thumbdrive is /dev/sdb. This causes a problem with the entries in my /etc/fstab file:
Code:

# USB Thumbdrive
/dev/sda1               /mnt/thumbdrive vfat            noauto,user,exec   0 0
# Gateway DC-M40
/dev/sdb1               /mnt/dcm40      vfat            noauto,user,ro   0 0
# HP1000 Scanner
/dev/sdc                /mnt/hp1000     vfat            noauto,ro,user   0 0

What I have been resorting to is always plugging in my thumbdrive first, then my camera, and then my scanner. The devices are then bound to the proper entry in /dev until I reboot. This worked fine until I was on vacation and didn't have my thumbdrive with me, only the camera and my laptop. I had to go in and edit /etc/fstab in order to mount the camera. What I am wondering is there any way to get devfs to always register the thumbdrive as /dev/sda, the camera as /dev/sdb and the scanner as /dev/sdc regardless of the order I plug them in?
I am running gentoo-sources 2.4.26-r8 and devfs.

Any suggestions will be greatly appreciated.

Thanks

Jason
_________________
If you got the DO RE I got MI.

--Jerry Garcia "Run For The Roses"
Back to top
View user's profile Send private message
roothorick
Tux's lil' helper
Tux's lil' helper


Joined: 30 May 2004
Posts: 83

PostPosted: Fri Aug 20, 2004 4:58 pm    Post subject: Reply with quote

I've heard you should use udev, but I haven't even figured out how to do things like that in udev yet. I personally use a more generic /mnt/usb0, /mnt/usb1 etc but this might not work with your setup.
_________________
Note: This user has been arrested under the DMCA for copyright infringement based on a complaint from The Inernational Cliche Company. He is also facing charges for violating US patents describing the encoding of text in digital form.
Back to top
View user's profile Send private message
oumpah-pah
Guru
Guru


Joined: 18 Jul 2004
Posts: 575
Location: Lausanne, Switzerland

PostPosted: Fri Aug 20, 2004 5:04 pm    Post subject: Reply with quote

udev is definitly what you're looking for. You can find everything you need to know on these two sites : Decibel's udev setup and writing udev rules.
Back to top
View user's profile Send private message
jmusits
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jan 2004
Posts: 117
Location: New York

PostPosted: Fri Aug 20, 2004 5:04 pm    Post subject: Reply with quote

In order to use udev, i need to upgrade to the 2.6 kernel. I was hoping to find a solution using devfs because I am happy with the 2.4 kernel as of now.

Jason
_________________
If you got the DO RE I got MI.

--Jerry Garcia "Run For The Roses"
Back to top
View user's profile Send private message
jmusits
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jan 2004
Posts: 117
Location: New York

PostPosted: Sat Aug 21, 2004 3:32 am    Post subject: Reply with quote

Well it looks like the solution is to upgrade to the 2.6.8 kernel and start using udev (I made my last post before I saw the second response to my first post). Looks like I've got some reading to do for the switch from 2.4 to 2.6 and also for udev.

Thanks for the links and the prompt replies.

Jason
_________________
If you got the DO RE I got MI.

--Jerry Garcia "Run For The Roses"
Back to top
View user's profile Send private message
Lokheed
Veteran
Veteran


Joined: 12 Jul 2004
Posts: 1295
Location: /usr/src/linux

PostPosted: Sat Aug 21, 2004 5:43 am    Post subject: Reply with quote

Thanks for the links oumpah-pah. I have been looking at switching to udev from devfs.
Back to top
View user's profile Send private message
Nate_S
Guru
Guru


Joined: 18 Mar 2004
Posts: 414

PostPosted: Sat Aug 21, 2004 6:47 pm    Post subject: Reply with quote

The switch from 2.4 to 2.6 is really not all that hard (you might not want to go with 2.6.8 jsut yet as it just came out like 2 days ago, 2.6.5 has been rock solid) Just 'make xconfig' and read the help for the different options.

I thought you might be able to use udev on a 2.4 kernel, but I might be wrong about that.

-Nate
Back to top
View user's profile Send private message
jmusits
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jan 2004
Posts: 117
Location: New York

PostPosted: Tue Aug 24, 2004 1:44 am    Post subject: Reply with quote

Well I made the migration to 2.6.8, everything went smooth and painless. I noticed a significant speed increase over 2.4.25. I'm glad that devfs was pissing me off enough to prompt the change. One small problem: my scanner no longer works. I started a new thread about it: https://forums.gentoo.org/viewtopic.php?t=213566&highlight=. Well gotta keep pluggin away to debug this lil bastard of a problem.

Peace

Jason
_________________
If you got the DO RE I got MI.

--Jerry Garcia "Run For The Roses"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum