samba within nfs, locking mechanism fails

Vincenzo De Sanctis vincenzo.desanctis at gmail.com
Mon Feb 25 09:44:56 MST 2013


is CTDB the solution?

2013/2/25 Vincenzo De Sanctis <vincenzo.desanctis at gmail.com>:
> this is the case:
>
> serverA [ CentOs 5.6 kernel 2.6.18-238.12.1.el5.centos.plus, Samba ver. 3.5.21 ]
> serverB [ CentOS 5.6 kernel 2.6.18-348.1.1.el5.centos.plus, Samba ver.
> 3.6.6-0.129.el5 ]
> clientA [ WindowsXP ]
> clientB [ WindowsXP ]
>
>
> The serverA shares via Samba the resource [test]
>
>
> [global]
>
>    workgroup = DMIT
>    netbios name = SAMBA
>    server string = DMIT domain server
>    interfaces = eth0
>    smb ports = 445
>    encrypt passwords = yes
>     smb passwd file = /etc/samba/smbpasswd
>    passdb backend = smbpasswd
>    username map = /etc/samba/smbusers
>    log file = /var/log/samba/pc/%m.log
>    time server = Yes
>    logon script = logon.bat
>    logon path =
>    logon drive = M:
>    logon home = \\%L\%U
>    domain logons = yes
>    os level = 33
>    preferred master = yes
>    domain master = yes
>    local master = yes
>    printjob username = %M\%U
>    hide dot files = No[netlogon]
>    path = /etc/samba/netlogon
> ;   max protocol = smb2
>
>
> [test]
>    comment = test
>    path = /test
>    read only = no
>    writable = yes
>    create mode = 0775
>    force create mode = 0775
>    directory mode = 02775
>    force directory mode = 02775
>    public = no
>    oplocks = no
>
>
> the serverB mounts through nfs the /test resource (mount
> serverA:/test /test)
> This is a very simple serverB smb.conf sonfiguration:
>
> [global]
>
>    workgroup = DMIT
>    domain master = no
>    domain logons = no
>    encrypt passwords = yes
>    security = server
>    password server = serverA
>    interfaces = eth0
>    smb ports = 445
>
> [test]
>    comment = test
>    path = /test
>    read only = no
>    writable = yes
>    create mode = 0775
>    force create mode = 0775
>    directory mode = 02775
>    force directory mode = 02775
>    public = no
>    oplocks = no
>
>
>
> Now on the clientA I open an excel2003 file from \\serverA\test and on
> clientB i open the same file but from \\serverB\test (consider that
> test is the same directory mounter from serverA via nfs)
>
>
> This is what happens:
>
> 1) I can open without problem the file on clientA from \\serverA\test,
> instead I have problem to open the the same file from \\serverB\test
> (after 5min later it goes in timeout)
>
>
> 2) If I add "posix locking = no" on serverA and on serverB both
> excel2003 files open without the locking mechanism.
>
> 3) I tried various combinations changing kernel oplocks, oplocks,
> level2 oplocks, posix locking, locking, strict locking, nt acl support
> but nothing changed.
>
>
> 4) I tried to open the same file from the same serverA (from clientA
> and from clientB) without nfs and now the locking works well (both
> from \\serverA\test)
>
>
> The strange thing is that on my company newtwork there are many old
> samba servers (samba 2.3) and they works well within nfs.
> The proper way to use samba like a cluser is DFS insead of NFS, but
> now I can not consider a migration or an upgrade to all the newtork,
> so the best way at the moment is to use nfs, like the prevoiis
> sysadmin did.
>
>
> Have you had experience about this strange case?
> Are there known bugs regarding the new samba versions + nfs ?
>
> --
> Vincenzo De Sanctis



-- 
Vincenzo De Sanctis


More information about the samba-technical mailing list