You shouldn't have to restart Samba. Ouch.

Reading the problem description, it *sounds* as though the TTL of the
registration in the (Microsoft?) WINS server is set too low. To test
this, try setting the 'max ttl' parameter in smb.conf to something low
like 7200. If that fixes the problem... well, ick.

This can't really be the problem because:

- The default TTL used by Windows' WINS server is three days, eleven
hours, and 20 minutes. I did some digging a few years ago and found
that Windows clients will send a refresh at least every 40 minutes (or
half the TTL, whichever is smaller).

- Samba v2.2 used a straight TTL/2 refresh rate. If your Windows WINS
server crashes, you could lose entries this way. You didn't report the
WINS server crashing, however.

- The WINS server is supposed to report back its max TTL (which may be
different than the TTL requested by the client. In this case, the
client is supposed to keep track of the server's TTL (and use 1/2 of the
server's TTL as it's refresh rate).

- If you're running a Samba WINS server, it keeps track of entries even
over a hard crash and restart.

So, unless your WINS server is going down periodically and isn't keeping a
database backup on disk (in case of a crash or restart), you *shouldn't*
be seeing these problems.

Of course, you *are* seeing these problems... so I'm missing something in
my logic.

Hope some of it's helpful.

Chris -)-----

On Mon, Mar 07, 2005 at 11:27:42AM -0700, David Bear wrote:
> for some strange reason, our wins servers occasionally drop samba
> servers out of there name space. to deal with this, I cron'ed a
> restart of samba at midnight everynight. This was a quick solution,
> but a lousy one.
>
> I would rather have some way to have samba regularly send name
> registration requests to wins. Is there a way to do this?
>
> barring that, is there some interface I can query on samba before
> sending it a kill signal to make sure there are no open files? I would
> like a 'gracefull' way to have samba resatart.
>
>
> --
> David Bear
> phone: 480-965-8257
> fax: 480-965-9189
> College of Public Programs/ASU
> Wilson Hall 232
> Tempe, AZ 85287-0803
> "Beware the IP portfolio, everyone will be suspect of trespassing"


--
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/ -)----- Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/ -)----- ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/ -)----- crh@ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/ -)----- crh@ubiqx.org