1

I have a Windows 2003 Enterprise SP2 server, on which I am sharing a folder. In the folder is a file that I am trying to read and import the data on a SLES 11 SP1 server. If I view the file on the Windows server, I can see the entire file. If I view the file on my Windows 7 PC, I can see the entire file. So I think the sharing is fine, since I can view the file on my PC. However, when I have the share mounted on the SLES server using cifs, the file sometimes has part of the last line cut off. Is there some configuration change I need to make (either on the Windows side or on the SLES side)?

JonathanMueller
  • 203
  • 1
  • 10
  • Our package cifs-mount is at version 3.4.3. – JonathanMueller Oct 28 '11 at 16:17
  • Is it a text file? Instead of opening from the shared directory, can you copy the file in question directly to your SLES server so its local, then open it from there? This would help rule out any end-of-line character issue. – Banjer Jan 04 '12 at 20:01

1 Answers1

0

The problem was with the CIFS mount becoming disconnected and not properly re-connecting or trying to use a cache.

The solution was to add "forcedirectio" to the line in /etc/fstab (based on reading http://www.cyberciti.biz/tips/disable-caching-on-the-cifs-nfs-client.html).

To answer Banjer's questions: If I used smbget to download the file, it read correctly.

After reading http://en.opensuse.org/openSUSE:Bugreport_Samba#Debugging_cifs_vfs_client I looked at /proc/fs/cifs/DebugData and was able to catch one time where it said it was disconnected.

JonathanMueller
  • 203
  • 1
  • 10