[Gllug] Auto mount Memory Stick Duo
Richard Turner
richard at zygous.co.uk
Sun Jan 22 23:19:48 UTC 2006
On Sun, 2006-01-22 at 20:19 +0000, Nix wrote:
> If your system uses udev, it can mount it automatically with the RUN
> action; something like `RUN="mount %p" should do the trick. (Obviously,
> while automatic unmounting on removal is possible, it should only be
> done if the media is mounted ro.)
Sadly I'm no longer sure what Fedora runs - that's why I'm hoping some
clever chap on GLLUG can enlighten me :)
> > In case it's of any use, and it doesn't look to me like it is, here's
> > the section of /var/log/messages logging me inserting the MicroVault,
> > inserting the MS, unmounting the MS and inserting the MS Duo (despite
> > the error messages about the MS I've never had a problem using it):
>
> If you'll post the output of `udevinfo -a -p /sys/block/{whatever-the-block-device-is}',
> we can craft a udev rule on the list. :)
OK, well, I can mount it on /dev/sdb so trying 'udevinfo -a
-p /sys/block/sdb' I see this...
[rjt at melkor mnt]$ udevinfo -a -p /sys/block/sdb/device/
udevinfo starts with the device the node belongs to and then walks up
the
device chain, to print for every device found, all possibly useful
attributes
in the udev key format.
Only attributes within one device section may be used together in one
rule,
to match the device for which the node will be created.
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... :)
Cheers,
Richard.
--
"Racing turtles, the grapefruit is winning..."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: This is a digitally signed message part
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20060122/e144ad26/attachment.pgp>
-------------- next part --------------
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list