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

Re: Autofs configuration



Bruno Cochofel wrote:
Hi, I have this config of autofs:

# auto.master
/var/autofs/removable /etc/auto.removable --timeout=2
/var/autofs/nfs         /etc/auto.misc          --timeout=60

# auto.removable # devices
cdrom           -fstype=iso9660,ro,sync,nodev,nosuid                    :/dev/cdrom
floppy          -fstype=auto,sync,nodev,nosuid                          :/dev/fd0

# usb pen
usbdrive        -fstype=vfat,rw,gid=100,umask=002                       :/dev/sda1
# card readers
cfdrive         -fstype=vfat,rw,gid=100,umask=002                       :/dev/sda1
msdrive         -fstype=vfat,rw,gid=100,umask=002                       :/dev/sdb1

sddrive         -fstype=vfat,rw,gid=100,umask=002                       :/dev/sdc1
smdrive         -fstype=vfat,rw,gid=100,umask=002                       :/dev/sdd1


But whenever I try to access the dirs I get this on /var/log/syslog:

# /var/log/syslog
Jan 27 12:53:51 debian automount[9543]: lookup(program): lookup for usbdrive failed
Jan 27 12:53:51 debian automount[9543]: failed to mount /var/autofs/removable/usbdrive

Jan 27 12:53:51 debian automount[9545]: lookup(program): lookup for usbdrive failed
Jan 27 12:53:51 debian automount[9545]: failed to mount /var/autofs/removable/usbdrive
Jan 27 12:53:51 debian automount[9547]: lookup(program): lookup for usbdrive failed

Jan 27 12:53:51 debian automount[9547]: failed to mount /var/autofs/removable/usbdrive


I can mount the nfs drives but none of the usb.

How can I do this?

The sda* are taken from dmesg

--
Cumprimentos,
Bruno Cochofel,
tlm: +351 912055880
ICQ: 309147167
MSN: bruno.cochofel@gmail.com <mailto:bruno.cochofel@gmail.com>
Skype: bcochofel

Two things I can think of to check, that caused me headaches:

1. It seems autofs is very picky about the type of white space used to separate the fields. It wants tabs, not spaces.

2. The USB drives may actually be ending up somewhere else. That is to say, maybe you got sdb the first time, when you checked with dmsg, but got sda or sdc the next time you plugged the USB device, because there was something else found before it. I solved this by setting up to use label based mounting.

Add a unique label to your USB drive file system (mlabel, e2label, ...), for example USBDRV. Set up auto.removable to look like this:

  usbdrive  -fstype=vfat,rw,gid=100,umask=002 :/dev/disk/by-label/USBDRV

The label, USBDRV is a link to the actual device node, as assigned by the system.

--
Bob McGowan

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


Reply to: