[Samba] Samba keeps locks on files

schönfeld / in-medias-res schoenfeld at in-medias-res.com
Mon Jun 19 07:09:36 GMT 2006


Hi there,

we recently migrated from an old novell server to a samba server with DOS
Clients.
Everything went well and while testing the whole setup everything went okay,
too.

Okay a little about the setup now, so that my explanations can be followed.
The system
consists of a linux client, mainly used as a "service gateway", but also
there is a component
installed which is called update-server. Its purpose is to regular check a
specific file on the smbfs
for changes. There are also the already mentioned dos clients which are
faxservers with
special faxcards that need to run under dos. They also access the samba
server and does (but not only)
write entries to the file the update-server checks. The server itself is
Debian GNU/Linux

Well so far, so good. For the first 3 month everything went really well
except some problems
resolving netbios names in the network. But then it occured that the
update-server didn't find
changes in the specific file. A sight in the trace files of the above
mentioned faxservers did show up
permission errors which wouldn't alarm me much, as system is supposed to
work with dos locking and
a locked file results in such a message. But it was to many and everytime
the faxservers tried to
access the same file. Easy to guess: The changes file needed by the update
server. Hmm.. okay i thought
and checked with strace and lsof if the update server helds a lock on the
file. No no. It doesn't. It opens
the file, reads it and another file and closes all files again in a period
of a few ms. But on the samba server
it does show up one or to processes holding locks on a file for more then 2
days, as smbstatus states!
Again: According to strace and lsof that is impossible!

I don't know how i could trace it more, so i would appreciate every hint to
trace the problem down.
Hereafter is the samba configuration file.

Best regards

Patrick Schönfeld

[global]
; Server information
comment = Faccess Fileserver
server string = Faccess Fileserver
netbios name = faccess-fs
log level = 2
; Global configuration
; Elections ->
local master = yes
os level = 65
preferred master = yes
domain master = yes
domain logons = no
wins support = yes
log file = /var/log/samba/log.%m

; Workgroup configuration
workgroup = faccess

; Security
security = share
guest only = yes
create mask = 0777
encrypt passwords = false
guest account = root

; Case configuration
case sensitive = no
preserve case = no
default case = lower

; Netlogon
logon script = %m.bat
logon path = /server/netlogon
root preexec = faxlogon %I %m
#root postexec = faxlogoff %m

; File shares
; ---------------------------------
[Faxpub]
path = /server/sys
guest only = yes
guest ok = yes
read only = no
writable = yes

[netlogon]
path = /server/netlogon
public = no
writeable = no
browsable = no



More information about the samba mailing list