All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about timeout option.
@ 2008-04-27 14:14 Stef Bon
  2008-04-27 15:59 ` Ian Kent
  0 siblings, 1 reply; 4+ messages in thread
From: Stef Bon @ 2008-04-27 14:14 UTC (permalink / raw)
  To: autofs

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 ://sbon@192.168.0.3:/ \
/192.168.0.1 -rw,nodev,nonempty,noatime ://sbon@192.168.0.1:/ \
/192.168.0.15 -rw,nodev,nonempty,noatime ://sbon@192.168.0.15:/ \
/195.243.111.226 -rw,nodev,nonempty,noatime ://sbon@195.243.111.226:/ \
/192.168.0.10 -rw,nodev,nonempty,noatime ://sbon@192.168.0.10:/ \
/192.168.0.2 -rw,nodev,nonempty,noatime ://sbon@192.168.0.2:/

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question about timeout option.
  2008-04-27 14:14 Question about timeout option Stef Bon
@ 2008-04-27 15:59 ` Ian Kent
  2008-04-28  8:08   ` Stef Bon
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Kent @ 2008-04-27 15:59 UTC (permalink / raw)
  To: Stef Bon; +Cc: autofs


On Sun, 2008-04-27 at 16:14 +0200, Stef Bon wrote:
> 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.

> 
> 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 ://sbon@192.168.0.3:/ \
> /192.168.0.1 -rw,nodev,nonempty,noatime ://sbon@192.168.0.1:/ \
> /192.168.0.15 -rw,nodev,nonempty,noatime ://sbon@192.168.0.15:/ \
> /195.243.111.226 -rw,nodev,nonempty,noatime ://sbon@195.243.111.226:/ \
> /192.168.0.10 -rw,nodev,nonempty,noatime ://sbon@192.168.0.10:/ \
> /192.168.0.2 -rw,nodev,nonempty,noatime ://sbon@192.168.0.2:/
> 
> 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
> autofs@linux.kernel.org
> http://linux.kernel.org/mailman/listinfo/autofs

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question about timeout option.
  2008-04-27 15:59 ` Ian Kent
@ 2008-04-28  8:08   ` Stef Bon
  2008-04-28  9:01     ` Ian Kent
  0 siblings, 1 reply; 4+ messages in thread
From: Stef Bon @ 2008-04-28  8:08 UTC (permalink / raw)
  To: Ian Kent; +Cc: autofs

Ian Kent wrote:
> On Sun, 2008-04-27 at 16:14 +0200, Stef Bon wrote:
>   
>> 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).
>   
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.
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question about timeout option.
  2008-04-28  8:08   ` Stef Bon
@ 2008-04-28  9:01     ` Ian Kent
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Kent @ 2008-04-28  9:01 UTC (permalink / raw)
  To: Stef Bon; +Cc: autofs


On Mon, 2008-04-28 at 10:08 +0200, Stef Bon wrote:
> Ian Kent wrote:
> > On Sun, 2008-04-27 at 16:14 +0200, Stef Bon wrote:
> >   
> >> 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).
> >   
> 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.

> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-04-28  9:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-27 14:14 Question about timeout option Stef Bon
2008-04-27 15:59 ` Ian Kent
2008-04-28  8:08   ` Stef Bon
2008-04-28  9:01     ` Ian Kent

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.