View previous topic :: View next topic |
Author |
Message |
manny15 Guru
Joined: 01 Dec 2002 Posts: 473 Location: USA
|
Posted: Fri Jan 31, 2003 5:28 pm Post subject: Is hotplug useful for usb mass devices |
|
|
Hey, I've noticed that if I plug in a usb mass storage device after I'm logged in, the /dev/X entries don't get created. For example, if I plug in my usb zip drive and try to mount it I get
mount: special device /dev/sda4 does not exist
But if I log out, log back in, and try again it works. Actually, the drive makes "noises" when I log out as it reads the disk. Oh, I did put in a disk before pluggin it in. I thought hotplug solves this but I get the same behaivor. Maybe I need to add some kind of script, but I can't seem to find examples or good documentation of how hotplug works and how to set it up. Any ideas? |
|
Back to top |
|
|
Carlos Guru
Joined: 07 Aug 2002 Posts: 458 Location: Providence, RI
|
Posted: Thu Feb 06, 2003 4:07 am Post subject: |
|
|
This sounds like something relating to /etc/devfsd.conf; I think you need to find out what the symlink /dev/sda4 (or whatever the device that fails to reappear is) points to (it'll be something like /dev/scsi/host1/bus0/target0/lun1/part1), and edit devfsd.conf accordingly - sadly I don't quite know how to do that myself yet.
ejwahl's message in USB Hard Drive should be helpful, though. _________________ Man must shape his tools lest they shape him. |
|
Back to top |
|
|
manny15 Guru
Joined: 01 Dec 2002 Posts: 473 Location: USA
|
Posted: Thu Feb 06, 2003 3:26 pm Post subject: |
|
|
Thanks for the help. I got it working now. Here's what I did. I plugged in the usb zip drive and did a dmesg to get the proper scsi stuff which is where I got
Code: |
scsi/host1/bus0/target0/lun0
|
Then I edited /etc/devfsd.conf
and added
Code: |
# Create /dev/sda4 for the external USB drive
LOOKUP ^sda4 CFUNCTION GLOBAL mksymlink scsi/host1/bus0/target0/lun0/part4 sda4
REGISTER ^scsi/host1/bus0/target0/lun0/part4 CFUNCTION GLOBAL mksymlink $devname sda4
UNREGISTER ^scsi/host1/bus0/target0/lun0/part4 CFUNCTION GLOBAL unlink sda4
|
I send the HUP signal to the devfsd process using "kill". Then replug the zip drive. And mount /mnt/zip then worked. I didn't have to log out! Thanks! Now I plan to do the same with my usb cdrw. |
|
Back to top |
|
|
Carlos Guru
Joined: 07 Aug 2002 Posts: 458 Location: Providence, RI
|
Posted: Fri Feb 07, 2003 2:01 am Post subject: |
|
|
manny15 wrote: | Thanks for the help. | No problem; thanks for posting details on what you did because I think I'll be able to make my setup better too - until now I've had the problem of not being able to use slots in my USB card reader unless a device was in it when booting. _________________ Man must shape his tools lest they shape him. |
|
Back to top |
|
|
|