LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 07-15-2004, 07:02 AM   #1
straboh
LQ Newbie
 
Registered: Nov 2003
Location: The Netherlands
Distribution: Fedora Core 1
Posts: 6

Rep: Reputation: 0
Unhappy 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
 
Old 07-16-2004, 12:04 PM   #2
. : B : .
LQ Newbie
 
Registered: Jul 2004
Location: Florida
Distribution: Slack 9.1
Posts: 5

Rep: Reputation: 0
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.
 
Old 01-04-2005, 07:05 AM   #3
stygianguest
LQ Newbie
 
Registered: Jan 2005
Distribution: debian unstable
Posts: 1

Rep: Reputation: 0
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ZAxis Mapping not working pyschomike15 Linux - Hardware 4 02-23-2005 07:47 PM
mount USB devices, sda, manually/statically assign sda? Oxyacetylene Debian 3 12-20-2004 03:45 PM
Z Axis mapping not working frick Slackware 6 07-20-2004 06:35 AM
Mapping an NFS share not working mijohnst Linux - Networking 4 05-12-2004 02:14 PM
physical scsi channel mapping to scsiX device node mapping, how to configure manually drthornt Linux - Hardware 3 02-09-2003 12:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 08:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration