Hi,

I have one NAS which I can access via NFS or Samba.
This storage is accessed by 2 linux servers with Samba where I re-export the 
NAS share. This is sort of an active/active loadbalancing cluster.
The only thing not working is locking... If a client opens a Word-File via 
server1 and another opens the same via server2 it won't inform the user that he 
can only open the file readonly.
I was hoping, that the NFS server will tell Samba that the file is already in 
use (rw) - didn't happen.
When I switched from NFS to Samba on the NAS and checked the NAS-Server, 
Server1 and Server2 with smbstatus I see the following:
NAS:
Locked files:
Pid          Uid        DenyMode   Access      R/W        Oplock           
SharePath   Name   Time
--------------------------------------------------------------------------------------------------
6893         0          DENY_NONE  0x19b       RDWR       NONE             
/export/storage   smbshare/bla/bla1.docx

Server1:
Locked files:
Pid          Uid        DenyMode   Access      R/W        Oplock           
SharePath   Name   Time
--------------------------------------------------------------------------------------------------
2004         0          DENY_WRITE 0x2019f     RDWR       NONE             
/import/999999/smbshare   bla/bla1.docx

Sever2:
Locked files:
Pid          Uid        DenyMode   Access      R/W        Oplock           
SharePath   Name   Time
--------------------------------------------------------------------------------------------------
1442         0          DENY_WRITE 0x2019f     RDWR       NONE             
/import/999999/smbshare   bla/bla1.docx
 
Of course every server has its own locking DB but why does the NAS not set 
DenyMode to DENY_WRITE I'd hope that this would do the trick...
I also tried to use ctdb on the 2 servers but afaik it'll only work with a 
Cluster-FS and not with a NFS or Samba share. At least ping_pong stopped 
working as soon as I started it on the 2nd server.

Does anyone has any idea how I can get file locking working with this setup (1 
NAS and 2 active Samba servers)?

Thanks & Regards,
Björn 
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Reply via email to