3

I have encountered the weirdest problem ever. There is a samba share on a CentOS fileserver (let's call it SERVER). There are two types of clients Windows 7 and CentOS. So what happens: I edit a script file (simple text file) through a Windows7 workstation, it is a script ment to be run on CentOS clients. SERVER share is used as a common place for the edits. Then it turns out that those edits are invisible to my centOS clients (at least for some time). Like the content of the file is no updating (or is cached on the client so it doesn't get updated). Mounts are done by autofs. Everything seems to work except the problem above. I can't see any rule of that happening -it simply happens. I've never encountered any problems while creating files or deleting (they get created and deleted instanly) but those edit problems makes samba shares very dangerous to use. Any suggestions what might be the source of the problem ?

motobói
  • 1,741
  • 1
  • 12
  • 17
groblus
  • 67
  • 1
  • 5
  • Anything in the samba logs of relevance? In particular I am thinking it could be crashing and restarting on writes from the Windows clients. Check on the file share server itself how quickly the files appear from both types of client. Check the network for packet loss Research to see if delayed writes are a 'thing' on network shares - can't remember. I know you can disable them on physical drives. – SuperBOB Mar 08 '12 at 13:34
  • Is your smbusers file configured correctly? – djangofan Mar 20 '12 at 21:19

1 Answers1

1

Can you try with the mount option strictcache on the CentOS client side? cifs(8) should explain directio (overkill here) and strictcache (should cover).

Newer systems have the equivalent cache={none,strict,loose}, where loose is equivalent to the default behaviour of a CentOS 6 kernel without any particular option.

Pierre Carrier
  • 2,617
  • 18
  • 28