Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We've a problem with the following behavior of samba:

"(from man) Reloading the configuration file will not affect connections to any service that is already established. Either the user will have to disconnect from the service, or smbd killed and restarted"

But what is happening to active connections on a restart of the smbd? For example what is happening to open/copied files while restarting? I couldn't find anything about this issue in the documentation or in the web. Does anymore know more?

share|improve this question

migrated from stackoverflow.com Sep 1 '10 at 1:06

This question came from our site for professional and enthusiast programmers.

    
Different app, different behavior. Can you describe your real problem more specifically? -- It depends on how Samba is set up (security = share?, = ads?, = server? ...) Some apps create temporary local copies and work on these. They cache the file's original location. If on a Samba share, once the app is ready to write back to storage, it may not even notice that smbd on the server end meanwhile restarted. -- In general, Samba mimics Windows' file share behavior. Can you pinpoint what difference you see for clients in: (1) windows server share disabled/re-enabled, and (2) smbd restarted? –  Kurt Pfeifle Aug 30 '10 at 21:38

1 Answer 1

The SMB protocol is designed to allow reconnection. Restart Samba, active connections should re-establish. The undefined edge cases are how oplocks are handled during a restart, and any lock contention going on. In the case of oplocks, if SMBD doesn't come back very quickly, there may be cached data on the client that never got flushed to the server and that might leave inconsistent data. For lock contention, if you have multiple connections vying for the same file for some reason, a different client may gain the lock after the restart.

I'm not 100% on the oplocks, though. If SMBD is well behaved it will inform clients to release any oplocks (flush caches) before it actually goes all the way down.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.