[linux-cifs-client] RE: [linux-cifs-client} further testing, locking or lack of issue and other.

Tory M Blue tmblue at pacbell.net
Fri Oct 8 21:11:38 GMT 2004


Soo, a couple of things.

I have included a message I sent to the Samba list earlier this week with no
response, so we went down the path of creating our own locking process,
utilizing a Database, since CIFs/SMB/NFS were not handling the file locks
correctly. Which caused files to be overwritten and counts to be zero'd etc.

After creating the locking mechanism using a DB we ran into further issues
with SMB/CIFS

There are some locking issues with SMB/CIFS, "If the theory is correct it is
a bug somewhere in the FS where the file descriptor is being cached and not
heeding the rename of another process on the same machine". WE have multiple
machines that need to access a file, the systems currently make a copy of
the original, open it, modify then renames the new file to the original file
name.  This is the most simplistic explanation.

Initially we had these issues with Samba, but they are the same with CIFS
and well NFS!) But no issues on the local filesystem:

Information prior sent to the Samba list, with no response.

Samba Ver: Version 3.0.6
OS: Linux sc8-a1-ln101 2.4.21-20.ELsmp #1 SMP Wed Aug 18 20:46:40 EDT 2004
i686 i686 i386 GNU/Linux
Java: j2sdk1.4.2_03

Using smbmount only. Accessing a Network Appliance share (NAS) from multiple
Linux boxes. Running into issues with file locking. We are doing this as we
migrate away from MS and to Linux, however we need Case insensitivity in the
short term (will end up going longer then I like), but thus the need for
some type of SMB/CIFS Filesystem.

We are using "java.nio.channels.FileLock"

We are seeing locks not honored and also lots of  java.io.IOException:
Resource deadlock avoided. We see this in both NFS and SMB FS mounts.
Locking is just not working correctly

Oct  2 16:29:20 sc8-a7-lri4 kernel: smb_readpage_sync: launch/AllServers.xml
open failed, error=-2 
Oct  2 16:29:55 sc8-a7-lri4 kernel: smb_open:
Clickthrough-4.status/AllServers.xml open failed, result=-2 
Oct  2 16:29:55 sc8-a7-lri4 kernel: smb_open:
Clickthrough-4.status/AllServers.xml open failed, result=-2 
Oct  2 16:29:55 sc8-a7-lri4 kernel: smb_readpage_sync:
Clickthrough-4.status/AllServers.xml open failed, error=-2 
Oct  2 16:29:56 sc8-a7-lri4 kernel: smb_open:
Clickthrough-4.status/AllServers.xml open failed, result=-2 
Oct  2 16:29:56 sc8-a7-lri4 kernel: smb_open:
Clickthrough-4.status/AllServers.xml open failed, result=-2 
Oct  2 16:29:56 sc8-a7-lri4 kernel: smb_readpage_sync:
Clickthrough-4.status/AllServers.xml open failed, error=-2 
Oct  2 16:29:56 sc8-a7-lri4 kernel: smb_open:
Clickthrough-4.status/AllServers.xml open failed, result=-2 
Oct  2 16:29:56 sc8-a7-lri4 kernel: smb_open:
Clickthrough-4.status/AllServers.xml open failed, result=-2 
Oct  2 16:29:56 sc8-a7-lri4 kernel: smb_readpage_sync:
Clickthrough-4.status/AllServers.xml open failed, error=-2

Everything works fine on the local FS, it's just failing over a NFS and SMB
share. But again the SMB/CIFS share is critical and I'll be forced to
continue down the windows path, if we can't figure this out.

On the CIFs front, it's pretty slow in our environment, quite a bit slower
then SMB and still does some weird things with files, Web interfaces etc
(can't explain it, trying to track it down). CIFS is the right way to go,
but the performance issues we are seeing with lots of reads and many small
writes using CIFS and not seeing it when using SMB, may pause the use of
CIFS.

I have many test environments and testing SMB/NFS/CIFS, if anyone has a tool
they like to use for perf tests etc, let me know, and I'll provide some data

Tory



More information about the linux-cifs-client mailing list