sda mapping to sg is not working.
Hello,
I'm trying to get usb automount to work on KDE. I found a script at : http://users.actrix.co.nz/michael/usbmount.html This script uses hotplug to detect newly connected devices. It then mounts them and displays an icon on the desktop. I did all the things that where written in the INSTALL file. All should have worked but when I checked the log and it didn't. This is what I get: Jul 15 12:43:53 localhost kernel: usb 1-2: new full speed USB device using address 5 Jul 15 12:43:54 localhost kernel: scsi2 : SCSI emulation for USB Mass Storage devices Jul 15 12:43:54 localhost kernel: Vendor: KINGSTON Model: DATA TRAVELER Rev: 1.11 Jul 15 12:43:54 localhost kernel: Type: Direct-Access ANSI SCSI revision: 02 Jul 15 12:43:54 localhost kernel: SCSI device sda: 251904 512-byte hdwr sectors (129 MB) Jul 15 12:43:54 localhost kernel: sda: assuming Write Enabled Jul 15 12:43:54 localhost kernel: sda: assuming drive cache: write through Jul 15 12:43:55 localhost kernel: sda: sda1 Jul 15 12:43:55 localhost kernel: Attached scsi removable disk sda at scsi2, channel 0, id 0, lun 0 Jul 15 12:43:56 localhost scsi.agent[4310]: disk at /devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2:1.0/host2/2:0:0:0 Jul 15 12:44:00 localhost usb-mount: +++ Starting usb (u)mounter /proc/bus/usb/001/005 DEVPATH=/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2:1.0 SCSI= Jul 15 12:44:00 localhost usb-mount: ------ Jul 15 12:44:00 localhost usb-mount: DEVPATH=/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2:1.0 Jul 15 12:44:00 localhost usb-mount: REMOVER=/var/run/usb/%sys%devices%pci0000:00%0000:00:07.2%usb1%1-2%1-2:1.0 Jul 15 12:44:00 localhost usb-mount: PATH=/bin:/sbin:/usr/sbin:/usr/bin Jul 15 12:44:00 localhost usb-mount: ACTION=add Jul 15 12:44:00 localhost usb-mount: PWD=/etc/hotplug Jul 15 12:44:00 localhost usb-mount: HOME=/ Jul 15 12:44:00 localhost usb-mount: SHLVL=3 Jul 15 12:44:00 localhost usb-mount: DEVICE=/proc/bus/usb/001/005 Jul 15 12:44:00 localhost usb-mount: INTERFACE=8/6/80 Jul 15 12:44:00 localhost usb-mount: PRODUCT=4e8/100/1 Jul 15 12:44:00 localhost usb-mount: TYPE=0/0/0 Jul 15 12:44:00 localhost usb-mount: SEQNUM=312 Jul 15 12:44:00 localhost usb-mount: _=/bin/env Jul 15 12:44:00 localhost usb-mount: ------ Jul 15 12:44:00 localhost usb-mount: Cleaning up mounts for detached devices. Jul 15 12:44:01 localhost usb-mount: Called to mount device /devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2:1.0 Jul 15 12:44:01 localhost usb-mount: DEVPATH yields SCSI host number 2 Jul 15 12:44:02 localhost usb-mount: SCSI disk device for 2 is UNKNOWN Jul 15 12:44:02 localhost usb-mount: Disk device is UNKNOWN Jul 15 12:44:02 localhost usb-mount: SCSI disk device is UNKNOWN Jul 15 12:44:02 localhost usb-mount: Could not find device for /devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2:1.0 Jul 15 12:44:02 localhost usb-mount: Checking for unused mountpoints The script is called usb-mount. It all seems to work but then it says SCSI disk device for 2 is UNKNOWN. And then continues to get UNKNOWN stuff until it stops. I checked the script itself and there I found that it uses the command sg_map (from the sg3_utils http://www.torque.net/sg/u_index.html) to find out which sda is the actual usb device. Sg_map checks which scsi device is connected to which sg device. And this is where the trouble starts. When I run sg_map it says: Stopping because no sg devices found Strange, could not find device /dev/sda mapped to sg device?? Doing a search on google got me this page: http://www.torque.net/sg/devfs_scsi.html So, the guys there say that doing cat /proc/scsi/scsi will give you all the mounted scsi devices. In my case these are: Attached devices: Host: scsi2 Channel: 00 Id: 00 Lun: 00 Vendor: KINGSTON Model: DATA TRAVELER Rev: 1.11 Type: Direct-Access ANSI SCSI revision: 02 Next; doing cat /proc/scsi/sg/host_strs should give the same information but now from the sg driver point of view. This works with the guys from the given link, but in my case I get nothing... So, I guess the question bubbles up to, why are the sg driver and the scsi drivers not linked, like they should be..? And how can I link them? Any help would be great! I'm using fedora core 2 with the 2.6.5-1.358 kernel. One last question; I'm trying to get automount to work because I'm installing Linux for friends of mine who have difficulty using even Windows. My goal is to make Linux as easy as possible to them. Does anybody know any other way to get automount working? I've been searching the whole day know and the only solution I found is the script I'm trying to get running now. Thanks in advance! All comments will be handy! Greets, Straboh |
It looks like it was mounting at sda1 but I guess not. I can't really help you with that part of it but as far as helping your friends, check out supermount. That is useful for people that aren't used to the whole mounting idea.
|
this is probably a bit late, but for documentation and others who want to solve the same problem:
I had the same problem on a debian system, the solution in my case was to load the sg module like this: # modprobe sg |
All times are GMT -5. The time now is 07:36 AM. |