1752752 Members
5270 Online
108789 Solutions
New Discussion

SAMBA/CIFS issue

 
John Gillings
Honored Contributor

Re: SAMBA/CIFS issue

Tim, Ross,
Clash of world views... *ix vs VMS?

I don't have a SAMBA/CIFS system to test, but something that might help, depending on how the files are written.

When a file is created, the creation date is written, and the modification date set the same. On closing the file, the modification date is updated.

So, one way you may be able to find when those 0 block files are complete, is to check that RDT > CDT. Lots of caveats, but it's easy to check, and may be sufficiently accurate for your purposes.
A crucible of informative mistakes
Paul Nunez
Respected Contributor

Re: SAMBA/CIFS issue

Hi,

Just did a little test, copying a large zip file to a share on a CIFS v1.1 eco1 ps010 server and then tried to delete/unzip/open for read, the zip file using DCL commands and each attempt produced the expected "file currently locked by another user" error.

If your file is large enough, you can see the lock and sharing modes the client is using by doing $ SMBSTATUS during the copy operation (use "$ smbstatus --locks" to see just the lock info).

There are some smb.conf parameters which affect data buffering such as "strict sync" and "sync always".

Also, a new parameter "vms file flush" was added in v1.1 eco1 ps008. It will cause CIFS to flush the file buffers to disk if/when a client sends an SMB Flush request.

You may need to get a network trace and look at the NT Create AndX SMB request to see what locking and share modes are being requested.

On the other hand, as Volker pointed out, we do try to retain Advanced Server behavior as much as possible (if the Advanced Server behavior is deemed appropriate). Thus, if there's not an option in CIFS to replicate that behavior, an new parameter is usually added to enable the desired behavior.

OPLOCKS aren't a locking mechanism, so don't recommend changing OPLOCK related smb.conf parameters.

HTH,

Paul