Question about timeout option.
Hello,
22 april I posted a message with the question about the timeout option.
Has anybody read it, and possibly have a clue?
Basically explained: I'm using a multiple mounts map to mount the smb shares and the ssh hosts.
The key here is the name of the network. In the case of smb it's "Windows Network", with ssh it's
"SSH hosts".
The autoscript mapped to the mountpoint produces with this key a map like:
/etc/autofs/session/auto.network.sbon "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/ftp -rw,ip=192.168.0.1 ://ROUTER/ftp \
/CWWERKGROEP/ROUTER/public -rw,ip=192.168.0.1 ://ROUTER/public \
/CWWERKGROEP/ROUTER/sbon -rw,ip=192.168.0.1 ://ROUTER/sbon
If the key is "SSH hosts" it't output is:
/etc/autofs/session/auto.network.sbon "SSH hosts"
-fstype=sshfs \
/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]:/
When starting the automounter I have to activate these maps by doing a initial
ls %MOUNTPOINT%/"Windows Network"
and
ls %MOUNTPOINT%/"SSH hosts"
Now I can browse the tree which is created. But when I leave it for a while, this tree will disappear. I have to do the ls commands like above again.
Now a can avoid this behaviour by diabling the timeout by adding the --timeout 0
option in the master file. But this has some disadvantages:
- mounted shares/hosts are not unmounted anymore when not used for a period set by the timeout option
- the current map stays in memory. This means that changes in the underlying network (a host is added for example)
will not get their way into this map.
So, to stay with the first problem, has someone an idea how to solve this "timeout" of the map. How can I make the automounter not "forget" the map, but unmount shares that not used anymore?
Thanks in advance,
Stef Bon
Ian Kent
maintainerQuoted 5 lines · Stef Bon
Hello,
22 april I posted a message with the question about the timeout option.
Has anybody read it, and possibly have a clue?
I read it.
Try using -browse or browse (not --browse).
It might prevent the top directories from being removed after expire (and when you access these it will re-create the sub-directories each time so that will be OK) but it wont be able to create the directories initially because it's a program map and autofs doesn't have a way to ask it for a list of it's keys. I haven't really had any suggestions that I think are workable for doing this.
Quoted 63 lines
Basically explained: I'm using a multiple mounts map to mount the smb shares and the ssh hosts.
The key here is the name of the network. In the case of smb it's "Windows Network", with ssh it's
"SSH hosts".
The autoscript mapped to the mountpoint produces with this key a map like:
/etc/autofs/session/auto.network.sbon"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/ftp -rw,ip=192.168.0.1 ://ROUTER/ftp \ /CWWERKGROEP/ROUTER/public -rw,ip=192.168.0.1 ://ROUTER/public \ /CWWERKGROEP/ROUTER/sbon -rw,ip=192.168.0.1 ://ROUTER/sbonIf the key is "SSH hosts" it't output is:
/etc/autofs/session/auto.network.sbon"SSH hosts"-fstype=sshfs \
/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]:/When starting the automounter I have to activate these maps by doing a initial
ls %MOUNTPOINT%/"Windows Network"
and
ls %MOUNTPOINT%/"SSH hosts"Now I can browse the tree which is created. But when I leave it for a while, this tree will disappear. I have to do the ls commands like above again.
Now a can avoid this behaviour by diabling the timeout by adding the --timeout 0
option in the master file. But this has some disadvantages:
- mounted shares/hosts are not unmounted anymore when not used for a period set by the timeout option
- the current map stays in memory. This means that changes in the underlying network (a host is added for example)
will not get their way into this map.So, to stay with the first problem, has someone an idea how to solve this "timeout" of the map. How can I make the automounter not "forget" the map, but unmount shares that not used anymore?
Thanks in advance,
Stef Bon
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs
Quoted 4 lines · Ian Kent
Quoted 2 lines · Stef Bon
Hello,
Quoted 8 lines
Quoted 4 lines
22 april I posted a message with the question about the timeout option.
Has anybody read it, and possibly have a clue?
I read it.
Try using -browse or browse (not --browse).
Yes, thanks that did it! Somehow the option browse did not get through to the daemon.
In my autofs configuration it was set to "no", and the option in the master file was ignored.
Now I've set it to yes in the configuration file, and everything is ok. I'm still looking why this happened.
Quoted 7 lines
It might prevent the top directories from being removed after expire (and when you access these it will re-create the sub-directories each time so that will be OK) but it wont be able to create the directories initially because it's a program map and autofs doesn't have a way to ask it for a list of it's keys. I haven't really had any suggestions that I think are workable for doing this.
No, I understand. It's not possible to let the automount discover these keys, without knowledge
of the map.
Stef Bon
Ian Kent
maintainerQuoted 7 lines · Stef Bon
Quoted 6 lines · Ian Kent
Quoted 4 lines · Stef Bon
Hello,
22 april I posted a message with the question about the timeout option.
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Has anybody read it, and possibly have a clue?
I read it.
Try using -browse or browse (not --browse).Yes, thanks that did it! Somehow the option browse did not get through to the daemon.
The pattern in the tokenizer is:
-g|--ghost|-?browse { return(OPT_GHOST); }
to match the browse option in non-linux maps. Our option is usually -g or --ghost but we probably should use [-]browse these days to be compatible.
Quoted 2 lines
In my autofs configuration it was set to "no", and the option in the master file was ignored.
I think you'll find that --browse just doesn't work.
The default browse mode is "no" because of the impact this can have for maps with thousands of entries.
Ian