Windows uses the createfile() system to obtain locks, Unix variants typically use the open() system call. Both functions approach locking very differently and unless there is a layer of arbitration and translation this becomes near to impossible. I have never used it personally, but there is reference to SecureShare that may help and/or completely handle this translation layer for you:
http://www.netapp.com/library/tr/3024.pdf
The above PDF has a fairly decent rundown on the the lock methods and the complexities therein, it should at least get you started.
On Mar 23, 2007, at 3:25 AM, masterblaster wrote:
Hi everyone,
currently we have a problem with file locking between Linux and Windows. We use shared access via NFS to files on a FAS3050 filer from Linux and Windows clients. We noticed that file locks, which are set by Linux, only apply to Linux clients and file locks, which are set by Windows, only apply to Windows clients and not vice versa. Question: Is it possible to lock files via NFS from Linux in that way that the files are also locked for Windows client and vice versa (i.e. for OpenOffice Documents) ?
Environment:
- Netapp Filer FAS3050 with Ontap 7.1.1.1
- Linux NFS Client (Suse 10.0)
- Windows XP NFS Client (NFS Client: Microsoft Services for Unix)
- Windows NT with Maestro NFS (from Hummingbird)
Test programs:
- Linux: "flock" command
- Windows: "locktest.exe"
We don't need byte-range or oplocks ! Just the whole file needs to be locked. Any ideas ?
Thanks in advance.
View this message in context: http://www.nabble.com/NFS-File- locking-between-Linux-Windows-tf3452921.html#a9632069 Sent from the Network Appliance - Toasters mailing list archive at Nabble.com.