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.
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.
Hi Shane,
thanks for your feedback. We knew this Doc from NetApp, but it didn't take us any further. Our conclusion of this Doc: File locking is a difficult thing, even between different Operating Systems. But NetApp with it's "great and outstanding" SecureShare will put it all together (but not in our case). 30 Days ago we logged a Call at NetApp, but they seems to be busy on other cases or the are still searching for an answer -> No valuable response from NetApp yet.
So our problem is still unresolved.