Some reload problems.
Hello,
I'm working on a construction which makes it able for ordinary users to browse (and mount) the network over
different services like SSH and SMB.
It creates a networkmap in the homedirectory:
/home/sbon/Global Network
for example.
Now this contruction creates and uses a temporarly master map in /var/run/autofs:
/var/run/autofs.master
which in my single user case looks like:
/home/sbon/Global\ Network /etc/autofs/session/auto.network.sbon -browse
The map is in /var/run, because it only contains runtime data. The line is added by a script run by KDM, when my session starts. (and removed by another script run by KDM, when a sessions ends)
Now I'v added this "networkrelated/usersession auto.master" to the "main" auto.master:
#
# other mountpoints and maps here.... # +/var/run/autofs/auto.master
Now, there is an (I think reasonable) assumption:
- when the automount daemon is not started at boottime, the creation of the networkfolders should not be done
(this construction does not start it, it should already be running)
- the daemon will start and continu running with an empty master map
- a reload hasn't much consequences for existing trees.
But what is necessary, is that after any change in the /var/run/autofs/auto.master file, the daemon should get a reload.
Now my experience is that the first issue is ok. There is even a patch for it. (I'm using version 5.0.3)
The daemon starts, even with an empty auto.master file (and an empty /var/run/autofs/auto.master).
It's also ok when a line is added. But there are some problems when stopping.
When stopping a session (by logging out), the line in /var/run/autofs/auto.master is removed and the
daemon gets a reload. Now, when there are no other lines here, and there also no other mountpoints in the main mastermap, the daemon stops.
To avoid this problem, I've added valid mountpoint to the main mastermap, and this problem did not occur anymore.
But, what remained is that the top level directory of a unused "browseable network tree" was removed after a reload. I have to avtivate it again.
Let me explain: my construction supports two services at this moment:
SSH and SMB.
When I login, both are activated by a litlle script which does:
ls -A "/home/sbon/Global Network/Windows Network" and ls -A "/home/sbon/Global Network/SSH hosts"
Now I can browse the network. (I've discussed this earlier..)
The /var/run/autofs/auto.master file has two lines, one for me and one for root.
There are smb shares for me (sbon) mounted, so there are active mounts. No ssh host is mounted
for sbon.
When root is logging out, the line with for root is removed, and the daemon gets a reload.
The result is that the Windows Network does still exist in "/home/sbon/Global Network", but "SSH hosts" not
anymore, which should not be the case.
I hope you're able to understand the situation.
Stef Bon
Quoted 8 lines · Stef Bon
Now, there is an (I think reasonable) assumption:
- when the automount daemon is not started at boottime, the creation of the networkfolders should not be done
(this construction does not start it, it should already be running)
- the daemon will start and continu running with an empty master map
- a reload hasn't much consequences for existing trees.
Quoted 6 lines
But what is necessary, is that after any change in the
/var/run/autofs/auto.masterfile, the daemon should get a reload.Now my experience is that the first issue is ok. There is even a patch for it. (I'm using version 5.0.3)
Sorry, I meant the second issue. The first is an assumption.
SB
Ian Kent
maintainerQuoted 49 lines · Stef Bon
Hello,
I'm working on a construction which makes it able for ordinary users to browse (and mount) the network over
different services like SSH and SMB.It creates a networkmap in the homedirectory:
/home/sbon/GlobalNetworkfor example.
Now this contruction creates and uses a temporarly master map in
/var/run/autofs:
/var/run/autofs.masterwhich in my single user case looks like:
/home/sbon/Global\ Network
/etc/autofs/session/auto.network.sbon-browseThe map is in
/var/run, because it only contains runtime data. The line is added by a script run by KDM, when my session starts. (and removed by another script run by KDM, when a sessions ends)Now I'v added this "networkrelated/usersession auto.master" to the "main" auto.master:
#
# other mountpoints and maps here.... # +/var/run/autofs/auto.masterNow, there is an (I think reasonable) assumption:
- when the automount daemon is not started at boottime, the creation of the networkfolders should not be done
(this construction does not start it, it should already be running)
- the daemon will start and continu running with an empty master map
- a reload hasn't much consequences for existing trees.But what is necessary, is that after any change in the
/var/run/autofs/auto.masterfile, the daemon should get a reload.Now my experience is that the first issue is ok. There is even a patch for it. (I'm using version 5.0.3)
The daemon starts, even with an empty auto.master file (and an empty/var/run/autofs/auto.master).
Quoted 6 lines
It's also ok when a line is added. But there are some problems when stopping.
When stopping a session (by logging out), the line in/var/run/autofs/auto.masteris removed and the
daemon gets a reload. Now, when there are no other lines here, and there also no other mountpoints in the main mastermap, the daemon stops.
You'll need to provide a debug log as well as the explanation, ensure you are capturing all the output to syslog.
Quoted 39 lines
To avoid this problem, I've added valid mountpoint to the main mastermap, and this problem did not occur anymore.
But, what remained is that the top level directory of a unused "browseable network tree" was removed after a reload. I have to avtivate it again.Let me explain: my construction supports two services at this moment:
SSH and SMB.
When I login, both are activated by a litlle script which does:ls -A "
/home/sbon/GlobalNetwork/Windows Network" and ls -A "/home/sbon/GlobalNetwork/SSH hosts"Now I can browse the network. (I've discussed this earlier..)
The
/var/run/autofs/auto.masterfile has two lines, one for me and one for root.
There are smb shares for me (sbon) mounted, so there are active mounts. No ssh host is mounted
for sbon.
When root is logging out, the line with for root is removed, and the daemon gets a reload.
The result is that the Windows Network does still exist in "/home/sbon/GlobalNetwork", but "SSH hosts" not
anymore, which should not be the case.I hope you're able to understand the situation.
Stef Bon
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs
Quoted 11 lines · Ian Kent
Quoted 8 lines · Stef Bon
It's also ok when a line is added. But there are some problems when stopping.
When stopping a session (by logging out), the line in/var/run/autofs/auto.masteris removed and the
daemon gets a reload. Now, when there are no other lines here, and there also no other mountpoints in the main mastermap, the daemon stops.
Quoted 4 lines
You'll need to provide a debug log as well as the explanation, ensure you are capturing all the output to syslog.
OK, I've added the debug option. Now I show you what happens.
First at boottime the automount daemon is started, with an empty masterfile:
May 6 10:54:46 localhost automount[5773]: Starting automounter version 5.0.3, master map /etc/autofs/auto.master May 6 10:54:46 localhost automount[5773]: using kernel protocol version 5.00 May 6 10:54:46 localhost automount[5773]: lookup_nss_read_master: reading master file /etc/autofs/auto.master May 6 10:54:46 localhost automount[5773]: parse_init: parse(sun): init gathered global options: (null) May 6 10:54:46 localhost automount[5773]: lookup_read_master: lookup(file): read entry +/var/run/autofs/auto.master May 6 10:54:46 localhost automount[5773]: lookup_nss_read_master: reading master file /var/run/autofs/auto.master May 6 10:54:46 localhost automount[5773]: parse_init: parse(sun): init gathered global options: (null) May 6 10:54:46 localhost automount[5773]: no mounts in table May 6 10:54:46 localhost bootlog: Starting automount... [ OK ]
Ok it detects the master file is empty, but it keeps on running. I can test it with:
[root ~]# /etc/rc.d/init.d/autofs status
automount is running with pid 5773 and map /etc/autofs/auto.master
Then, when a session starts, an entry is added to the /var/run/autofs/auto.master file:
KDM runs a script after login of sbon:
/etc/session.d/scripts/start/add_network_mountpoint.sh sbon
This command adds a line to the /var/run/autofs/auto.master file and gives the running daemon a reload signal:
[root ~]# cat /var/run/autofs/auto.master
/home/sbon/Global\ Network /etc/autofs/session/auto.network.sbon -browse
And the logfile gives:
May 6 11:02:40 localhost bootlog: Reloading automount with map /etc/autofs/auto.master.[ OK ] May 6 11:02:40 localhost automount[5773]: re-reading master map /etc/autofs/auto.master May 6 11:02:40 localhost automount[5773]: lookup_nss_read_master: reading master file /etc/autofs/auto.master May 6 11:02:40 localhost automount[5773]: parse_init: parse(sun): init gathered global options: (null) May 6 11:02:40 localhost automount[5773]: lookup_read_master: lookup(file): read entry +/var/run/autofs/auto.master May 6 11:02:40 localhost automount[5773]: lookup_nss_read_master: reading master file /var/run/autofs/auto.master May 6 11:02:40 localhost automount[5773]: parse_init: parse(sun): init gathered global options: (null) May 6 11:02:40 localhost automount[5773]: lookup_read_master: lookup(file): read entry /home/sbon/Global\ Network May 6 11:02:40 localhost automount[5773]: master_do_mount: mounting /home/sbon/Global Network May 6 11:02:40 localhost automount[5773]: automount_path_to_fifo: fifo name /var/run/autofs.fifo-home-sbon-Global Network May 6 11:02:40 localhost automount[5773]: lookup_nss_read_map: reading map file /etc/autofs/session/auto.network.sbon May 6 11:02:40 localhost automount[5773]: parse_init: parse(sun): init gathered global options: (null) May 6 11:02:40 localhost automount[5773]: mounted indirect mount on /home/sbon/Global Network with timeout 300, freq 75 seconds May 6 11:02:40 localhost automount[5773]: ghosting enabled
Now checking the contents of /proc/mounts:
[root ~]# cat /proc/mounts
..
..
../etc/autofs/session/auto.network.sbon /home/sbon/Global\040Network autofs rw,fd=5,pgrp=5773,timeout=300,minproto=5,maxproto=5,indirect 0 0
This is the only autofs related line here.
The networkservices are not yet visible to sbon:
[root ~]# ls -A /home/sbon/Global\ Network
(no output here)
so there is another script which activates the networks (it needs to be
run with permissions of the user logging in:
[sbon ~]$ /opt/kde-4.0/env/50activate_networks.sh
: Activating network Windows Network
: Activating network SSH hosts
Now the log file:
May 6 11:13:42 localhost automount[5773]: expire_cleanup: got thid 3083566000 path /home/sbon/Global Network stat 0 May 6 11:13:42 localhost automount[5773]: expire_cleanup: sigchld: exp 3083566000 finished, switching from 2 to 1 May 6 11:13:42 localhost automount[5773]: st_ready: st_ready(): state = 2 path /home/sbon/Global Network May 6 11:14:46 localhost : Activating network Windows Network. May 6 11:14:46 localhost automount[5773]: handle_packet: type = 3 May 6 11:14:46 localhost automount[5773]: handle_packet_missing_indirect: token 16, name Windows Network, request pid 6924 May 6 11:14:46 localhost automount[5773]: attempting to mount entry /home/sbon/Global Network/Windows Network May 6 11:14:46 localhost automount[5773]: lookup_mount: lookup(program): looking up Windows Network May 6 11:14:47 localhost automount[5773]: lookup_mount:
lookup(program): Windows Network -> -fstype=cifs,credentials=/home/sbon/.autofssession/smb/mount.cred /BONONLINE/LFS20060812/bononline -rw,ip=192.168.0.2 ://LFS20060812/bononline /BONONLINE/LFS20060812/ftp -rw,ip=192.168.0.2 ://LFS20060812/ftp /BONONLINE/LFS20060812/sbon -rw,ip=192.168.0.2 ://LFS20060812/sbon /BONONLINE/LFS20060812/video -rw,ip=192.168.0.2://LFS20060812/video /CWWERKGROEP/ROUTER/cwdocumenten -rw,ip=192.168.0.1 ://ROUTER/cwdocumenten /CWWERKGROEP/ROUTER/public -rw,ip=192.168.0.1 ://ROUTER/public /CWWERKGROEP/ROUTER/sbon -rw,ip=192.168.0.1 ://ROUTER/sbon
A lot more messages about parse_mapent: gathered options, mount_multi-triggers.
Futher in the log file:
May 6 11:14:47 localhost : Activating network SSH hosts. May 6 11:14:47 localhost automount[5773]: handle_packet: type = 3 May 6 11:14:47 localhost automount[5773]: handle_packet_missing_indirect: token 17, name SSH hosts, request pid 7052 May 6 11:14:47 localhost automount[5773]: attempting to mount entry /home/sbon/Global Network/SSH hosts May 6 11:14:47 localhost automount[5773]: lookup_mount: lookup(program): looking up SSH hosts May 6 11:14:47 localhost automount[5773]: lookup_mount:
lookup(program): SSH hosts -> -fstype=sshfs /151.1.143.116 -rw,nodev,nonempty,noatime ://[email protected]:/ /192.168.0.3 -rw,nodev,nonempty,noatime ://[email protected]:/ /192.168.0.1 -rw,nodev,nonempty,noatime ://[email protected]:/ /192.168.0.15 -rw,nodev,nonempty,noatime ://[email protected]:/ /195.243.111.226 -rw,nodev,nonempty,noatime ://[email protected]:/ /192.168.0.10 -rw,nodev,nonempty,noatime ://[email protected]:/ /192.168.0.2 -rw,nodev,nonempty,noatime ://[email protected]:/ /87.212.7.82-rw,nodev,nonempty,noatime ://[email protected]:/
Also here a lot of messages like mount_autofs_offset, mount_multi_triggers, but that's normal I guess.
The networks are now visible:
[sbon ~]$ ls -A ~/Global\ Network
SSH hosts Windows Network
and I can browse it. When I do not do that, I get messages like:
May 6 11:19:47 localhost automount[5773]: cache_delete_offset_list: deleting offset key /home/sbon/Global Network/Windows Network/CWWERKGROEP/ROUTER/public May 6 11:19:47 localhost automount[5773]: cache_delete_offset_list: deleting offset key /home/sbon/Global Network/Windows Network/CWWERKGROEP/ROUTER/sbon May 6 11:19:47 localhost automount[5773]: rm_unwanted_fn: removing directory /home/sbon/Global Network/Windows Network/CWWERKGROEP/ROUTER May 6 11:19:47 localhost automount[5773]: rm_unwanted_fn: removing directory /home/sbon/Global Network/Windows Network/CWWERKGROEP May 6 11:19:47 localhost automount[5773]: rm_unwanted_fn: removing directory /home/sbon/Global Network/Windows Network/BONONLINE/LFS20060812 May 6 11:19:47 localhost automount[5773]: rm_unwanted_fn: removing directory /home/sbon/Global Network/Windows Network/BONONLINE May 6 11:19:47 localhost automount[5773]: expired /home/sbon/Global
Network/Windows Network
So far so good, this is to be expected, the timeout (5 min) has expired. But the toplevel directories still exists:
[sbon ~]$ ls -A ~/Global\ Network
SSH hosts Windows Network
But when I (sbon) logout, another script is run by KDM. It removes the line from the /var/run/autofs/auto.master file and gives the running daemon a reload signal (HUP):
[root ~]# /etc/session.d/scripts/stop/stop_automount_session.sh sbon :Reloading the automount daemon.
Reloading automount with map /etc/autofs/auto.master [root ~]# ps aux | grep automount
root 8186 0.0 0.0 3764 604 pts/1 S+ 11:32 0:00 grep
automount
The /var/run/autofs/auto.master file is indeed empty:
root ~]# ls -al /var/run/autofs/auto.master -rw-r--r-- 1 root root 0 2008-05-06 11:32 auto.master
The logfile:
May 6 11:32:15 localhost : Reloading the automount daemon. May 6 11:32:15 localhost bootlog: Reloading automount with map /etc/autofs/auto.master.[ OK ] May 6 11:32:15 localhost automount[5773]: re-reading master map /etc/autofs/auto.master May 6 11:32:15 localhost automount[5773]: lookup_nss_read_master: reading master file /etc/autofs/auto.master May 6 11:32:15 localhost automount[5773]: parse_init: parse(sun): init gathered global options: (null) May 6 11:32:15 localhost automount[5773]: lookup_read_master: lookup(file): read entry +/var/run/autofs/auto.master May 6 11:32:15 localhost automount[5773]: lookup_nss_read_master: reading master file /var/run/autofs/auto.master May 6 11:32:15 localhost automount[5773]: parse_init: parse(sun): init gathered global options: (null) May 6 11:32:15 localhost automount[5773]: shutdown_entry: /home/sbon/Global Network May 6 11:32:15 localhost automount[5773]: st_prepare_shutdown: state 1 path /home/sbon/Global Network May 6 11:32:15 localhost automount[5773]: expire_proc: exp_proc = 3080784816 path /home/sbon/Global Network May 6 11:32:15 localhost automount[5773]: expire_cleanup: got thid 3080784816 path /home/sbon/Global Network stat 0 May 6 11:32:15 localhost automount[5773]: expire_cleanup: sigchld: exp 3080784816 finished, switching from 5 to 7 May 6 11:32:15 localhost automount[5773]: umount_multi: path /home/sbon/Global Network incl 0 May 6 11:32:15 localhost automount[5773]: rm_unwanted_fn: removing directory /home/sbon/Global Network/Windows Network May 6 11:32:15 localhost automount[5773]: rm_unwanted_fn: removing directory /home/sbon/Global Network/SSH hosts May 6 11:32:15 localhost automount[5773]: umounted indirect mount /home/sbon/Global Network May 6 11:32:15 localhost automount[5773]: automount_path_to_fifo: fifo name /var/run/autofs.fifo-home-sbon-Global Network May 6 11:32:15 localhost automount[5773]: shut down path /home/sbon/Global Network May 6 11:32:15 localhost automount[5773]: autofs stopped
So this is what happens.
The messages the init script gives are maybe not very familiar. I've written this script myself. But it's sure
it gives the right signal.
Futher I've compiled autofs with the following options:
./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --without-sasl --without-hesiod --enable-force-shutdown
I hope this helps.
Cheers,
Stef Bon
Ian Kent
maintainerQuoted 248 lines · Stef Bon
Quoted 11 lines · Ian Kent
Quoted 8 lines · Stef Bon
It's also ok when a line is added. But there are some problems when stopping.
When stopping a session (by logging out), the line in/var/run/autofs/auto.masteris removed and the
daemon gets a reload. Now, when there are no other lines here, and there also no other mountpoints in the main mastermap, the daemon stops.Quoted 4 lines
You'll need to provide a debug log as well as the explanation, ensure you are capturing all the output to syslog.
OK, I've added the debug option. Now I show you what happens.
First at boottime the automount daemon is started, with an empty masterfile:
May 6 10:54:46 localhost automount[5773]: Starting automounter version 5.0.3, master map /etc/autofs/auto.master May 6 10:54:46 localhost automount[5773]: using kernel protocol version 5.00 May 6 10:54:46 localhost automount[5773]: lookup_nss_read_master: reading master file /etc/autofs/auto.master May 6 10:54:46 localhost automount[5773]: parse_init: parse(sun): init gathered global options: (null) May 6 10:54:46 localhost automount[5773]: lookup_read_master: lookup(file): read entry +/var/run/autofs/auto.master May 6 10:54:46 localhost automount[5773]: lookup_nss_read_master: reading master file /var/run/autofs/auto.master May 6 10:54:46 localhost automount[5773]: parse_init: parse(sun): init gathered global options: (null) May 6 10:54:46 localhost automount[5773]: no mounts in table May 6 10:54:46 localhost bootlog: Starting automount... [ OK ]Ok it detects the master file is empty, but it keeps on running. I can test it with:
[root ~]#/etc/rc.d/init.d/autofsstatus
automount is running with pid 5773 and map/etc/autofs/auto.masterThen, when a session starts, an entry is added to the
/var/run/autofs/auto.masterfile:
KDM runs a script after login of sbon:
/etc/session.d/scripts/start/add_network_mountpoint.shsbonThis command adds a line to the
/var/run/autofs/auto.masterfile and gives the running daemon a reload signal:
[root ~]# cat/var/run/autofs/auto.master
/home/sbon/Global\ Network/etc/autofs/session/auto.network.sbon-browseAnd the logfile gives:
May 6 11:02:40 localhost bootlog: Reloading automount with map /etc/autofs/auto.master.[ OK ] May 6 11:02:40 localhost automount[5773]: re-reading master map /etc/autofs/auto.master May 6 11:02:40 localhost automount[5773]: lookup_nss_read_master: reading master file /etc/autofs/auto.master May 6 11:02:40 localhost automount[5773]: parse_init: parse(sun): init gathered global options: (null) May 6 11:02:40 localhost automount[5773]: lookup_read_master: lookup(file): read entry +/var/run/autofs/auto.master May 6 11:02:40 localhost automount[5773]: lookup_nss_read_master: reading master file /var/run/autofs/auto.master May 6 11:02:40 localhost automount[5773]: parse_init: parse(sun): init gathered global options: (null) May 6 11:02:40 localhost automount[5773]: lookup_read_master: lookup(file): read entry /home/sbon/Global\ Network May 6 11:02:40 localhost automount[5773]: master_do_mount: mounting /home/sbon/Global Network May 6 11:02:40 localhost automount[5773]: automount_path_to_fifo: fifo name /var/run/autofs.fifo-home-sbon-Global Network May 6 11:02:40 localhost automount[5773]: lookup_nss_read_map: reading map file /etc/autofs/session/auto.network.sbon May 6 11:02:40 localhost automount[5773]: parse_init: parse(sun): init gathered global options: (null) May 6 11:02:40 localhost automount[5773]: mounted indirect mount on /home/sbon/Global Network with timeout 300, freq 75 seconds May 6 11:02:40 localhost automount[5773]: ghosting enabledNow checking the contents of
/proc/mounts:
[root ~]# cat/proc/mounts
..
..
../etc/autofs/session/auto.network.sbon/home/sbon/Global\040Network autofs rw,fd=5,pgrp=5773,timeout=300,minproto=5,maxproto=5,indirect 0 0This is the only autofs related line here.
The networkservices are not yet visible to sbon:
[root ~]# ls -A /home/sbon/Global\ Network
(no output here)
so there is another script which activates the networks (it needs to be
run with permissions of the user logging in:[sbon ~]$
/opt/kde-4.0/env/50activate_networks.sh
: Activating network Windows Network
: Activating network SSH hostsNow the log file:
May 6 11:13:42 localhost automount[5773]: expire_cleanup: got thid 3083566000 path /home/sbon/Global Network stat 0 May 6 11:13:42 localhost automount[5773]: expire_cleanup: sigchld: exp 3083566000 finished, switching from 2 to 1 May 6 11:13:42 localhost automount[5773]: st_ready: st_ready(): state = 2 path /home/sbon/Global Network May 6 11:14:46 localhost : Activating network Windows Network. May 6 11:14:46 localhost automount[5773]: handle_packet: type = 3 May 6 11:14:46 localhost automount[5773]: handle_packet_missing_indirect: token 16, name Windows Network, request pid 6924 May 6 11:14:46 localhost automount[5773]: attempting to mount entry /home/sbon/Global Network/Windows Network May 6 11:14:46 localhost automount[5773]: lookup_mount: lookup(program): looking up Windows Network May 6 11:14:47 localhost automount[5773]: lookup_mount:lookup(program): Windows Network -> -fstype=cifs,credentials=/home/sbon/.autofssession/smb/mount.cred /BONONLINE/LFS20060812/bononline -rw,ip=192.168.0.2 ://LFS20060812/bononline /BONONLINE/LFS20060812/ftp -rw,ip=192.168.0.2 ://LFS20060812/ftp /BONONLINE/LFS20060812/sbon -rw,ip=192.168.0.2 ://LFS20060812/sbon /BONONLINE/LFS20060812/video -rw,ip=192.168.0.2://LFS20060812/video /CWWERKGROEP/ROUTER/cwdocumenten -rw,ip=192.168.0.1 ://ROUTER/cwdocumenten /CWWERKGROEP/ROUTER/public -rw,ip=192.168.0.1 ://ROUTER/public /CWWERKGROEP/ROUTER/sbon -rw,ip=192.168.0.1 ://ROUTER/sbon
A lot more messages about
parse_mapent: gathered options, mount_multi-triggers.
Futher in the log file:May 6 11:14:47 localhost : Activating network SSH hosts. May 6 11:14:47 localhost automount[5773]: handle_packet: type = 3 May 6 11:14:47 localhost automount[5773]: handle_packet_missing_indirect: token 17, name SSH hosts, request pid 7052 May 6 11:14:47 localhost automount[5773]: attempting to mount entry /home/sbon/Global Network/SSH hosts May 6 11:14:47 localhost automount[5773]: lookup_mount: lookup(program): looking up SSH hosts May 6 11:14:47 localhost automount[5773]: lookup_mount:lookup(program): SSH hosts -> -fstype=sshfs /151.1.143.116
(quoted diff) +0
-7-rw,nodev,nonempty,noatime ://[email protected]:/ /192.168.0.3 -rw,nodev,nonempty,noatime ://[email protected]:/ /192.168.0.1 -rw,nodev,nonempty,noatime ://[email protected]:/ /192.168.0.15 -rw,nodev,nonempty,noatime ://[email protected]:/ /195.243.111.226 -rw,nodev,nonempty,noatime ://[email protected]:/ /192.168.0.10 -rw,nodev,nonempty,noatime ://[email protected]:/ /192.168.0.2 -rw,nodev,nonempty,noatime ://[email protected]://87.212.7.82-rw,nodev,nonempty,noatime ://[email protected]:/
Also here a lot of messages like
mount_autofs_offset,mount_multi_triggers, but that's normal I guess.The networks are now visible:
[sbon ~]$ ls -A ~/Global\ Network
SSH hosts Windows Networkand I can browse it. When I do not do that, I get messages like:
May 6 11:19:47 localhost automount[5773]: cache_delete_offset_list: deleting offset key /home/sbon/Global Network/Windows Network/CWWERKGROEP/ROUTER/public May 6 11:19:47 localhost automount[5773]: cache_delete_offset_list: deleting offset key /home/sbon/Global Network/Windows Network/CWWERKGROEP/ROUTER/sbon May 6 11:19:47 localhost automount[5773]: rm_unwanted_fn: removing directory /home/sbon/Global Network/Windows Network/CWWERKGROEP/ROUTER May 6 11:19:47 localhost automount[5773]: rm_unwanted_fn: removing directory /home/sbon/Global Network/Windows Network/CWWERKGROEP May 6 11:19:47 localhost automount[5773]: rm_unwanted_fn: removing directory /home/sbon/Global Network/Windows Network/BONONLINE/LFS20060812 May 6 11:19:47 localhost automount[5773]: rm_unwanted_fn: removing directory /home/sbon/Global Network/Windows Network/BONONLINE May 6 11:19:47 localhost automount[5773]: expired /home/sbon/GlobalNetwork/Windows Network
So far so good, this is to be expected, the timeout (5 min) has expired. But the toplevel directories still exists:
[sbon ~]$ ls -A ~/Global\ Network
SSH hosts Windows NetworkBut when I (sbon) logout, another script is run by KDM. It removes the line from the
/var/run/autofs/auto.masterfile and gives the running daemon a reload signal (HUP):[root ~]#
/etc/session.d/scripts/stop/stop_automount_session.shsbon :Reloading the automount daemon.
Reloading automount with map/etc/autofs/auto.master[root ~]# ps aux | grep automount
root 8186 0.0 0.0 3764 604 pts/1 S+ 11:32 0:00 grep
automountThe
/var/run/autofs/auto.masterfile is indeed empty:root ~]# ls -al
/var/run/autofs/auto.master-rw-r--r-- 1 root root 0 2008-05-06 11:32 auto.masterThe logfile:
May 6 11:32:15 localhost : Reloading the automount daemon. May 6 11:32:15 localhost bootlog: Reloading automount with map /etc/autofs/auto.master.[ OK ] May 6 11:32:15 localhost automount[5773]: re-reading master map /etc/autofs/auto.master May 6 11:32:15 localhost automount[5773]: lookup_nss_read_master: reading master file /etc/autofs/auto.master May 6 11:32:15 localhost automount[5773]: parse_init: parse(sun): init gathered global options: (null) May 6 11:32:15 localhost automount[5773]: lookup_read_master: lookup(file): read entry +/var/run/autofs/auto.master May 6 11:32:15 localhost automount[5773]: lookup_nss_read_master: reading master file /var/run/autofs/auto.master May 6 11:32:15 localhost automount[5773]: parse_init: parse(sun): init gathered global options: (null) May 6 11:32:15 localhost automount[5773]: shutdown_entry: /home/sbon/Global Network May 6 11:32:15 localhost automount[5773]: st_prepare_shutdown: state 1 path /home/sbon/Global Network May 6 11:32:15 localhost automount[5773]: expire_proc: exp_proc = 3080784816 path /home/sbon/Global Network May 6 11:32:15 localhost automount[5773]: expire_cleanup: got thid 3080784816 path /home/sbon/Global Network stat 0 May 6 11:32:15 localhost automount[5773]: expire_cleanup: sigchld: exp 3080784816 finished, switching from 5 to 7 May 6 11:32:15 localhost automount[5773]: umount_multi: path /home/sbon/Global Network incl 0 May 6 11:32:15 localhost automount[5773]: rm_unwanted_fn: removing directory /home/sbon/Global Network/Windows Network May 6 11:32:15 localhost automount[5773]: rm_unwanted_fn: removing directory /home/sbon/Global Network/SSH hosts May 6 11:32:15 localhost automount[5773]: umounted indirect mount /home/sbon/Global Network May 6 11:32:15 localhost automount[5773]: automount_path_to_fifo: fifo name /var/run/autofs.fifo-home-sbon-Global Network May 6 11:32:15 localhost automount[5773]: shut down path /home/sbon/Global Network May 6 11:32:15 localhost automount[5773]: autofs stopped
Quoted 1 line
So this is what happens.
So, autofs just exits.
The problem is that autofs needs to know when to exit and that amounts to checking if any active mounts are left. But that check breaks down because we need to avoid it unless we've actually been asked to shutdown and, at the moment, this isn't known to the function that does the check. The condition is checked every time a mount point shuts down.
I think I can fix this fairly easily but, for it to be a simple fix, we will need a patch I'm working on to be merged first.
So you're stuck, for a while anyway.
Ian
Quoted 13 lines · Ian Kent
Quoted 4 lines
May 6 11:32:15 localhost automount[5773]: autofs stoppedSo this is what happens.
So, autofs just exits.
The problem is that autofs needs to know when to exit and that amounts to checking if any active mounts are left. But that check breaks down because we need to avoid it unless we've actually been asked to shutdown and, at the moment, this isn't known to the function that does the check. The condition is checked every time a mount point shuts down.
Quoted 5 lines
I think I can fix this fairly easily but, for it to be a simple fix, we will need a patch I'm working on to be merged first.
So you're stuck, for a while anyway.
Well I'm not really stuck. The way I've solved it is to add another mountpoint to /etc/autofs/auto.master
which remains there. Then there is no problem.
And I can wait.
Thank you for looking to this problem.
With all these steps I hope I can create a contruction which allows a more powerfull access to network resources
than there exist today.
Stef Bon