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

Setting up autofs....



I am following the page at http://www.debian-administration.org/articles/127 
on setting up autofs to work with udev, so flashdrives and card readers can 
be auto mounted.

(Please note, automounting humbugs are not appreciated voicing their opinion 
in this thread. If you want to help me out, great, but no soapboxing.)

Here is the contents of /var/log/messages as the card reader, then the card 
are detected:
Feb  9 21:47:36 localhost kernel: usb 3-3: new high speed USB device using 
address 4
Feb  9 21:47:37 localhost kernel: scsi1 : SCSI emulation for USB Mass Storage 
devices
Feb  9 21:47:37 localhost kernel:   Vendor: SMSC      Model: 223 U HS-CF       
Rev: 1.95
Feb  9 21:47:37 localhost kernel:   Type:   Direct-Access                      
ANSI SCSI revision: 02
Feb  9 21:47:37 localhost kernel: Attached scsi removable disk sda at scsi1, 
channel 0, id 0, lun 0
Feb  9 21:47:37 localhost kernel:   Vendor: SMSC      Model: 223 U HS-MS       
Rev: 1.95
Feb  9 21:47:37 localhost kernel:   Type:   Direct-Access                      
ANSI SCSI revision: 02
Feb  9 21:47:37 localhost scsi.agent[5750]:      sd_mod: loaded sucessfully 
(for disk)
Feb  9 21:47:37 localhost kernel: Attached scsi removable disk sdb at scsi1, 
channel 0, id 0, lun 1
Feb  9 21:47:37 localhost kernel:   Vendor: SMSC      Model: 223 U HS-SM       
Rev: 1.95
Feb  9 21:47:37 localhost kernel:   Type:   Direct-Access                      
ANSI SCSI revision: 02
Feb  9 21:47:37 localhost scsi.agent[5769]:      sd_mod: loaded sucessfully 
(for disk)
Feb  9 21:47:37 localhost kernel: Attached scsi removable disk sdc at scsi1, 
channel 0, id 0, lun 2
Feb  9 21:47:37 localhost kernel:   Vendor: SMSC      Model: 223 U HS-SD/MMC   
Rev: 1.95
Feb  9 21:47:37 localhost kernel:   Type:   Direct-Access                      
ANSI SCSI revision: 02
Feb  9 21:47:37 localhost kernel: Attached scsi removable disk sdd at scsi1, 
channel 0, id 0, lun 3
Feb  9 21:47:37 localhost scsi.agent[5837]:      sd_mod: loaded sucessfully 
(for disk)
Feb  9 21:47:38 localhost scsi.agent[5818]:      sd_mod: loaded sucessfully 
(for disk)
Feb  9 21:47:38 localhost usb.agent[5850]:      usb-storage: already loaded
Feb  9 21:47:54 localhost kernel: SCSI device sdd: 498176 512-byte hdwr 
sectors(255 MB)
Feb  9 21:47:54 localhost kernel: sdd: assuming Write Enabled
Feb  9 21:47:54 localhost kernel: SCSI device sdd: 498176 512-byte hdwr 
sectors(255 MB)
Feb  9 21:47:54 localhost kernel: sdd: assuming Write Enabled
Feb  9 21:47:54 localhost kernel:  /dev/scsi/host1/bus0/target0/lun3: p1

I see where it has been picked up and become /dev/sdd1.

Now, I have both udev and autofs running and configured almost exactly like 
the page at debian-administration.org. They are just modified for my 
hardware.

What could be going on? I thought I would see kernel messages for the 
connection with autofs, but /var/autofs/ does not have removable in it.
Here's what's in the significant files.

timmy:~# cat /etc/udev/rules.d/local.rules
BUS="scsi", SYSFS{model}="PNY USB 2.0 FD", KERNEL="sd?1", NAME="%k", 
SYMLINK="flashdrive"
BUS="scsi", SYSFS{model}="223 U HS-CF", NAME{all_partitions}="card_cf"
BUS="scsi", SYSFS{model}="223 U HS-MS", NAME{all_partitions}="card_ms"
BUS="scsi", SYSFS{model}="223 U HS-SM", NAME{all_partitions}="card_sm"
BUS="scsi", SYSFS{model}="223 U HS-SD/MMC", NAME{all_partitions}="card_sd"

timmy:~# cat /etc/auto.master
#
# $Id: auto.master,v 1.4 2005/01/04 14:36:54 raven Exp $
#
# Sample auto.master file
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
#/misc  /etc/auto.misc --timeout=60
#/smb   /etc/auto.smb
#/misc  /etc/auto.misc
#/net   /etc/auto.net

/var/autofs/removable   /etc/auto.removable --timeout=2timmy:~#

timmy:~# cat /etc/udev/rules.d/local.rules
BUS="scsi", SYSFS{model}="PNY USB 2.0 FD", KERNEL="sd?1", NAME="%k", 
SYMLINK="flashdrive"
BUS="scsi", SYSFS{model}="223 U HS-CF", NAME{all_partitions}="card_cf"
BUS="scsi", SYSFS{model}="223 U HS-MS", NAME{all_partitions}="card_ms"
BUS="scsi", SYSFS{model}="223 U HS-SM", NAME{all_partitions}="card_sm"
BUS="scsi", SYSFS{model}="223 U HS-SD/MMC", NAME{all_partitions}="card_sd"

Thanks,

Rob






-- 
Mountlake Terrace, WA, USA



Reply to: