I'm having a problem with the Samba client for Linux (Red Hat 6.2): I mount a Windows share on my Linux box and run my portable application that opens files (and leaves them open) and uses record locking to prevent data corruption. The problem is that writes from the Windows machines to a file that is currently open on the Linux machine do not show up in the Linux application until it (the Linux app) closes and re-opens the file. Writes FROM the Linux app show up on the Windows machines immediately (no close/re-open necessary) and writes from the Windows apps show up on the other Windows machines just fine, so it doesn't appear to be a problem with the configuration of the server (WinME). I've tried the following smb.conf settings which have failed to solved this problem: oplocks = false strict sync = true sync always = true It sounds like a file caching problem, but the solutions shown on the Samba FAQ seem to be related to Samba Server (not client). Any help would be much appreciated, Rob
I'm having a problem with the Samba client for Linux (Red Hat 6.2): I mount a Windows share on my Linux box and run my portable application that opens files (and leaves them open) and uses record locking to prevent data corruption. The problem is that writes from the Windows machines to a file that is currently open on the Linux machine do not show up in the Linux application until it (the Linux app) closes and re-opens the file. Writes FROM the Linux app show up on the Windows machines immediately (no close/re-open necessary) and writes from the Windows apps show up on the other Windows machines just fine, so it doesn't appear to be a problem with the configuration of the server (WinME). I've tried the following smb.conf settings which have failed to solved this problem: oplocks = false strict sync = true sync always = true It sounds like a file caching problem, but the solutions shown on the Samba FAQ seem to be related to Samba Server (not client). Any help would be much appreciated, Rob
On Sun, 12 Nov 2000, digital man wrote:> I'm having a problem with the Samba client for Linux (Red Hat 6.2):smbclient?> I mount a Windows share on my Linux box and run my portable application that^^^^^ or smbfs? or ?> opens files (and leaves them open) and uses record locking to prevent data > corruption. The problem is that writes from the Windows machines to a file > that is currently open on the Linux machine do not show up in the Linux > application until it (the Linux app) closes and re-opens the file. Writes > FROM the Linux app show up on the Windows machines immediately (no > close/re-open necessary) and writes from the Windows apps show up on the > other Windows machines just fine, so it doesn't appear to be a problem with > the configuration of the server (WinME).[Assuming smbfs ...] Rh6.2, which kernel version? Some versions have problems with noticing that things changed on the server side (if you do tail -f on something on the smb share it will never see any changes). Try updating to 2.2.18-pre21 (or wait for 2.2.18, shouldn't be too far away). Could you explain "record locking" some more? (example programs would be nice, for both win32 and linux, source and binary) I fear that smbfs does not currently implement file locking as it should. It always opens files read/write and hopes that this will block access on the other side (I'm guessing here :) I have a patch to improve smbfs locking from someone, but it still fails on some things I believe it shouldn't. /Urban