[Gllug] Auto mount Memory Stick Duo

Nix nix at esperi.org.uk
Wed Jan 25 07:25:21 UTC 2006


On Sun, 22 Jan 2006, Richard Turner stipulated:
> On Sun, 2006-01-22 at 20:19 +0000, Nix wrote:
>   looking at class device '/sys/block/sdb/device':
>     SUBSYSTEM=="block"
>     SYSFS{device_blocked}=="0"
>     SYSFS{iocounterbits}=="32"
>     SYSFS{iodone_cnt}=="0x119"
>     SYSFS{ioerr_cnt}=="0x69"
>     SYSFS{iorequest_cnt}=="0x119"
>     SYSFS{max_sectors}=="240"
>     SYSFS{model}=="USM-MS"
>     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}=="Sony    "
> 
> follow the "device"-link to the physical device:
>   looking at the device chain at
> '/sys/devices/pci0000:00/0000:00:07.2/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2:1.0/host1/target1:0:0/1:0:0:0':
>     BUS=="scsi"
>     ID=="1:0:0:0"
>     DRIVER=="sd"
>     SYSFS{device_blocked}=="0"
>     SYSFS{iocounterbits}=="32"
>     SYSFS{iodone_cnt}=="0x119"
>     SYSFS{ioerr_cnt}=="0x69"
>     SYSFS{iorequest_cnt}=="0x119"
>     SYSFS{max_sectors}=="240"
>     SYSFS{model}=="USM-MS"
>     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}=="Sony    "
> 
> couldn't open device directory
> 
> 
> See, I'd assume that the last "couldn't open device directory" means
> that none of this is very useful, but I hope that error is diagnostic in
> some way and/or I'm completely wrong! If not I suppose I can live with
> it, but it'd be nice to see this stuff work out-of-the-box... :)

It probably means you have a kernel that's too new for your udev; there
have been a number of udev bugs tickled by changes to the kernel over
time. Requirements are:

2.6.12+ -> udev 058+
2.6.15+ -> udev 072+

You need udev 074 for reliable RUN= operation anyway, so upgrade!
(Don't worry much about additional complexity, udev has actually
been getting simpler in recent releases as it takes over the
remainder of the job that used to be hotplug's. Even initial /dev
node population can now be done via a shell script...)

It certainly means that many of the potential sysfs keys are missing.
(it's very odd that you don't have a SYSFS{removable} key; I have
that on all block devices... maybe this is just another symptom.)



Regardless, assuming you had a working version of udev, you could
automount this on demand, and symlink it somewhere, via, say,

SUBSYSTEM=="block", SYSFS{model}=="USB-MS",\
    SYMLINK=usm-stick, RUN="mount %p"

-- 
`Everyone has skeletons in the closet.  The US has the skeletons
 driving living folks into the closet.' --- Rebecca Ore
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list