[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

scsi mass storage problem



Problem: I would like to have my camera be mounted automatically when I plug it into its usb cable.
  NB: Although it is plugged into the usb, it is seen as a scsi device.

I have a line in fstab:
  /dev/sda1    /media/usbdisk    auto    pamconsole,exec,noauto,managed 0 0

I have made a dimage.rules file for udev:
  BUS="scsi", SYSFS{model}="DiMAGE F100", KERNEL="sd?1", SYMLINK="camera"

I got some of this information by entering the command:
  udevinfo -a -p 'udevinfo -q path -n /dev/sda1'

This is the output I get:

device '/sys/block/sda/sda1' has major:minor 8:1
  looking at class device '/sys/block/sda/sda1':
    SUBSYSTEM=="block"
    SYSFS{dev}=="8:1"
    SYSFS{size}=="493979"
    SYSFS{start}=="101"
    SYSFS{stat}=="     163      163        0        0"

follow the "device"-link to the physical device:
  looking at the device chain at '/sys/devices/pci0000:00/0000
:00:1f.2/usb1/1-2/1-2:1.0/host2/target2:0:0/2:0:0:0':
    BUS=="scsi"
    ID=="2:0:0:0"
    DRIVER=="sd"
    SYSFS{device_blocked}=="0"
    SYSFS{iocounterbits}=="32"
    SYSFS{iodone_cnt}=="0x2b"
    SYSFS{ioerr_cnt}=="0x0"
    SYSFS{iorequest_cnt}=="0x2b"
    SYSFS{max_sectors}=="240"
    SYSFS{model}=="DiMAGE F100     "
    SYSFS{queue_depth}=="1"
    SYSFS{queue_type}=="none"
    SYSFS{rev}=="1.00"
    SYSFS{scsi_level}=="3"
    SYSFS{state}=="running"
    SYSFS{timeout}=="30"
    SYSFS{type}=="0"
    SYSFS{vendor}=="MINOLTA "

couldn't open device directory

Perhaps of note is the fact that the number on the line SYSFS{stat} is not the same every time
Also, the note at the end of the output for this command: "couldn't open device directory"
Is that normal? Why couldn't directory be opened? When I manually mount, it opens just fine.

When I plug in the camera:
-  the modules are loaded automatically (verified with tail messages, etc)
-  the aforementioned line appears in fstab
-  /dev/sda1 is created
-  a link /dev/camera --> /dev/sda1 is created
-  /media/usbdisk is created

However, the camera is not mounted and I have to do so manually :-(

When I turn off the camera:
-  /media/usbdisk disappears, but only after a very long time (in a few instances it didn't disappear and on next boot, when I plugged in the camera again, /media/usbdisk1 was created, in addition to the pre-existing /media/usbdisk from the previous session)
-  the line in fstab also disappears (I would have preferred to have /media/camera, but usbdisk appears no matter what I write in fstab, so instead of fighting it, I decided that it will have to do, unless someone knows why...)

Does anyone know how to get this working? Help would be much appreciated

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]