View previous topic :: View next topic |
Author |
Message |
neves n00b
Joined: 29 Jan 2004 Posts: 9
|
Posted: Wed Jan 19, 2005 5:22 am Post subject: timeout not working in automount (autofs) |
|
|
I'm having a little problem, maybe a good soul here can help me.
I've just bought a usb card reader. My final goal is to make it acessible from my wife's computer, so she can just insert the camera memory in the slot, go to network neighborhood and download the photos. Just a simple broken link is ruining the chain: the automount timeout isn't working.
To simplify the problem, here is my test trying to auto-unmounting the CD. The pure facts:
o The CD mounts as a breeze when I do a ls /misc/cd
o Althought I've setup an timeout of 1 sec, it never unmounts by itself.
o As root, I can do an "umount /misc/cd" that it unmounts.
Here is my auto.master:
Code: | /misc /etc/autofs/auto.misc --timeout=1
/mnt/net /etc/autofs/auto.network --timeout=600 |
Here is my auto.misc:
Code: | cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom
boot -fstype=ext2 :/dev/hda1
floppy -fstype=auto,sync :/dev/fd0
|
Here what I get with ps agxu|grep autom:
Code: | root 7745 0.0 0.2 3116 1084 ? S 02:54 0:00 /usr/sbin/automount --timeout 1 /misc file /etc/autofs/auto.misc
root 7755 0.0 0.2 3116 1084 ? S 02:54 0:00 /usr/sbin/automount --timeout 600 /mnt/net file /etc/autofs/auto.network
|
And here is the relevant output of mount
Code: | automount(pid7745) on /misc type autofs (rw,fd=4,pgrp=7745,minproto=2,maxproto=4)
automount(pid7755) on /mnt/net type autofs (rw,fd=4,pgrp=7755,minproto=2,maxproto=4)
/dev/cdrom on /misc/cd type iso9660 (ro,nosuid,nodev) |
And here the output of fuser -uv /misc/cd
(remember that I can unmount it as root):
Code: | USER PID ACCESS COMMAND
/misc/cd root kernel mount /misc/cd
|
Can anyone here help me to debug it? I don't know what to do anymore. I'm using 2.6.10-gentoo-r4 and fsdev.
Thanks in advance for any help,
Paulo |
|
Back to top |
|
|
neves n00b
Joined: 29 Jan 2004 Posts: 9
|
Posted: Wed Jan 19, 2005 3:55 pm Post subject: |
|
|
Stupid idea: If I just put a crontab to umount it every minute, would it take too much resources? |
|
Back to top |
|
|
jsosic Guru
Joined: 02 Aug 2004 Posts: 510 Location: Split (Croatia)
|
|
Back to top |
|
|
el_compa n00b
Joined: 28 Jan 2004 Posts: 65 Location: France
|
Posted: Thu Feb 10, 2005 10:47 pm Post subject: Way to fix it |
|
|
Hi,
I had the same problem, I fixed it by modifying /etc/conf.d/autofs. Here's my file:
Code: |
# Config file for /etc/init.d/autofs
# e.g. localoptions='rsize=8192,wsize=8192'
localoptions=''
# additional options for automount, ie. timeout
daemonoptions=''
# NIS
nis_mapname='auto.master'
# LDAP
# By default autofs-ldap-auto-master will check the old style structure defined
# here, and if that fails, it will check the new style structure before
# failing. If this generates too much traffic for you, just change to use the
# new style here.
|
FWIW, here's my /etc/autofs/auto.master:
Code: |
# $Id: auto.master,v 1.1 2000/08/08 17:53:33 achim Exp $
# Sample auto.master file
# Format of this file:
# mountpoint map options
# For details of the format look at autofs(8).
/var/autofs-usb /etc/autofs/auto.usbdrive --timeout=2 --ghost
/var/autofs /etc/autofs/auto.cdrom --timeout=5 --ghost
|
and /etc/autofs/auto.cdrom
Code: |
madd@xyu /etc/autofs $ cat /etc/autofs/auto.cdrom
cdrom -fstype=iso9660,ro,sync,nodev,nosuid :/dev/cdroms/cdrom0
|
I think the problem was in auto.master, with the LDAP entries. When I removed them everything was working again.
BTW, I'm running autofs-4.1.3-r3.
Good luck! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|