On Tue, Feb 8, 2011 at 7:30 AM, Philip Ong Jr. <pon...@gmail.com> wrote:
> I've pulled down the 5.0.5 tree and all patches.
>
> I've set the logging level to debug and can see messages of expiring mounts
> in /var/log/messages...but when I check /etc/mtab or /proc/mounts or df, i
> can still see them there. Any ideas if this is a known issue or if I can
> give more info than below?

Hello,

I finally had time to return to this issue. To avoid the confusion caused by old
kernels, I reproduced the problem on openSUSE Factory (kernel 2.6.38 and
autofs 5.0.5 with all kernel.org patches applied). Here's the
configuration used:

# cat /etc/auto.master
/data   /etc/auto.data

# cat /etc/auto.data
isos    -fstype=nfs,ro,rsize=8192,wsize=8192,intr,nolock,nosuid libre:/isos

# cat /etc/sysconfig/autofs | grep -v '^#'
AUTOFS_OPTIONS=""
LOCAL_OPTIONS=""
APPEND_OPTIONS="yes"
USE_MISC_DEVICE="yes"
DEFAULT_MASTER_MAP_NAME="auto.master"
DEFAULT_TIMEOUT=600
DEFAULT_BROWSE_MODE="yes"
DEFAULT_LOGGING="debug"
DEFAULT_MAP_OBJECT_CLASS="nisMap"
DEFAULT_ENTRY_OBJECT_CLASS="nisObject"
DEFAULT_MAP_ATTRIBUTE="nisMapName"
DEFAULT_ENTRY_ATTRIBUTE="cn"
DEFAULT_VALUE_ATTRIBUTE="nisMapEntry"
DEFAULT_AUTH_CONF_FILE="etc/autofs_ldap_auth.conf"
MAP_HASH_TABLE_SIZE=1024

I'm attaching the automount debug logs showing the following sequence:

- automount startup
- mount of an NFS volume (/data/isos)
- failed attempt to trigger the expiration of the mounted volume (sending
  SIGUSR1)
- successful attempt to trigger the expiration of the mounted volume
  (sending SIGUSR1 again)

I also confirmed that the problem no longer happens if I revert the
following commit:

commit 08aafab4c1d0ab6227c80f8cd1086ae78556a370
Author: Ian Kent <ra...@themaw.net>
Date:   Thu Sep 9 11:10:47 2010 +0800

    autofs-5.0.5 - fix direct map not updating on reread

Philip, do you think you could try to revert it in your setup/package just
to confirm this "works"?

Thanks,
Leonardo
== STARTUP

Mar 24 18:41:33 n47 automount[4681]: Starting automounter version 5.0.5, master 
map auto.master
Mar 24 18:41:33 n47 automount[4681]: using kernel protocol version 5.02
Mar 24 18:41:33 n47 automount[4681]: lookup_nss_read_master: reading master 
files auto.master
Mar 24 18:41:33 n47 automount[4681]: parse_init: parse(sun): init gathered 
global options: (null)
Mar 24 18:41:33 n47 automount[4681]: lookup_read_master: lookup(file): read 
entry /data
Mar 24 18:41:33 n47 automount[4681]: master_do_mount: mounting /data
Mar 24 18:41:33 n47 automount[4681]: automount_path_to_fifo: fifo name 
/var/run/autofs.fifo-data
Mar 24 18:41:33 n47 automount[4681]: lookup_nss_read_map: reading map file 
/etc/auto.data
Mar 24 18:41:33 n47 automount[4681]: parse_init: parse(sun): init gathered 
global options: (null)
Mar 24 18:41:33 n47 automount[4681]: mounted indirect on /data with timeout 
600, freq 150 seconds
Mar 24 18:41:33 n47 automount[4681]: st_ready: st_ready(): state = 0 path /data
Mar 24 18:41:33 n47 automount[4681]: ghosting enabled

== COMMAND: ls /data/isos

Mar 24 18:41:54 n47 automount[4681]: handle_packet: type = 3
Mar 24 18:41:54 n47 automount[4681]: handle_packet_missing_indirect: token 3, 
name isos, request pid 4691
Mar 24 18:41:54 n47 automount[4681]: attempting to mount entry /data/isos
Mar 24 18:41:54 n47 automount[4681]: lookup_mount: lookup(file): looking up isos
Mar 24 18:41:54 n47 automount[4681]: lookup_mount: lookup(file): isos -> 
-fstype=nfs,ro,rsize=8192,wsize=8192,intr,nolock,nosuid libre:/isos
Mar 24 18:41:54 n47 automount[4681]: parse_mount: parse(sun): expanded entry: 
-fstype=nfs,ro,rsize=8192,wsize=8192,intr,nolock,nosuid libre:/isos
Mar 24 18:41:54 n47 automount[4681]: parse_mount: parse(sun): gathered options: 
fstype=nfs,ro,rsize=8192,wsize=8192,intr,nolock,nosuid
Mar 24 18:41:54 n47 automount[4681]: parse_mount: parse(sun): 
dequote("libre:/isos") -> libre:/isos
Mar 24 18:41:54 n47 automount[4681]: parse_mount: parse(sun): core of entry: 
options=fstype=nfs,ro,rsize=8192,wsize=8192,intr,nolock,nosuid, loc=libre:/isos
Mar 24 18:41:54 n47 automount[4681]: sun_mount: parse(sun): mounting root 
/data, mountpoint isos, what libre:/isos, fstype nfs, options 
ro,rsize=8192,wsize=8192,intr,nolock,nosuid
Mar 24 18:41:54 n47 automount[4681]: mount_mount: mount(nfs): root=/data 
name=isos what=libre:/isos, fstype=nfs, 
options=ro,rsize=8192,wsize=8192,intr,nolock,nosuid
Mar 24 18:41:54 n47 automount[4681]: mount_mount: mount(nfs): nfs 
options="ro,rsize=8192,wsize=8192,intr,nolock,nosuid", nosymlink=0, ro=1
Mar 24 18:41:54 n47 automount[4681]: mount_mount: mount(nfs): calling 
mkdir_path /data/isos
Mar 24 18:41:54 n47 automount[4681]: mount_mount: mount(nfs): calling mount -t 
nfs -s -o ro,rsize=8192,wsize=8192,intr,nolock,nosuid libre:/isos /data/isos
Mar 24 18:41:54 n47 automount[4681]: mount_mount: mount(nfs): mounted 
libre:/isos on /data/isos
Mar 24 18:41:54 n47 automount[4681]: dev_ioctl_send_ready: token = 3
Mar 24 18:41:54 n47 automount[4681]: mounted /data/isos
Mar 24 18:41:54 n47 automount[4681]: st_readmap: state 1 path /data
Mar 24 18:41:54 n47 automount[4681]: re-reading map for /data
Mar 24 18:41:54 n47 automount[4681]: lookup_nss_read_map: reading map file 
/etc/auto.data
Mar 24 18:41:54 n47 automount[4681]: parse_init: parse(sun): init gathered 
global options: (null)
Mar 24 18:41:54 n47 automount[4681]: st_ready: st_ready(): state = 4 path /data

== COMMAND: kill -USR1 $(pidof automount)

Mar 24 18:42:07 n47 automount[4681]: do_notify_state: signal 10
Mar 24 18:42:07 n47 automount[4681]: master_notify_state_change: sig 10 
switching /data from 1 to 3

== COMMAND: kill -USR1 $(pidof automount)

Mar 24 18:42:45 n47 automount[4681]: do_notify_state: signal 10
Mar 24 18:42:45 n47 automount[4681]: master_notify_state_change: sig 10 
switching /data from 1 to 3
Mar 24 18:42:45 n47 automount[4681]: st_prune: state 1 path /data
Mar 24 18:42:45 n47 automount[4681]: expire_proc: exp_proc = 140224412317440 
path /data
Mar 24 18:42:45 n47 automount[4681]: expire_proc_indirect: expire /data/isos
Mar 24 18:42:45 n47 automount[4681]: handle_packet: type = 4
Mar 24 18:42:45 n47 automount[4681]: handle_packet_expire_indirect: token 4, 
name isos
Mar 24 18:42:45 n47 automount[4681]: expiring path /data/isos
Mar 24 18:42:45 n47 automount[4681]: umount_multi: path /data/isos incl 1
Mar 24 18:42:45 n47 automount[4681]: umount_subtree_mounts: unmounting dir = 
/data/isos
Mar 24 18:42:45 n47 automount[4681]: expired /data/isos
Mar 24 18:42:45 n47 automount[4681]: dev_ioctl_send_ready: token = 4
Mar 24 18:42:45 n47 automount[4681]: expire_cleanup: got thid 140224412317440 
path /data stat 0
Mar 24 18:42:45 n47 automount[4681]: expire_cleanup: sigchld: exp 
140224412317440 finished, switching from 3 to 1
Mar 24 18:42:45 n47 automount[4681]: st_ready: st_ready(): state = 3 path /data
_______________________________________________
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs

Reply via email to