<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SAMBA/CIFS issue in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/samba-cifs-issue/m-p/4634997#M98825</link>
    <description>Hi Ross,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; However, it seems that the exclusive lock is successful even though the file&lt;BR /&gt;&amp;gt;&amp;gt; is still in the process of being copied across.&lt;BR /&gt;Hmmm. This is intresting.&lt;BR /&gt;&lt;BR /&gt;Even though the files may be getting cached in the client, the operation on the&lt;BR /&gt;file is not complete. So i would have expected the exclusive mode lock to fail&lt;BR /&gt;as the file is currently being operated upon.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; Which is why I am suggesting turning oplocks off.&lt;BR /&gt;Doing this would prevent caching of files on the client, but i am not sure&lt;BR /&gt;whether this would solve the problem.&lt;BR /&gt;&lt;BR /&gt;Looks like its worth a try. May be you can give it a try and check if the problem&lt;BR /&gt;goes away.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Murali</description>
    <pubDate>Wed, 19 May 2010 01:22:50 GMT</pubDate>
    <dc:creator>P Muralidhar Kini</dc:creator>
    <dc:date>2010-05-19T01:22:50Z</dc:date>
    <item>
      <title>SAMBA/CIFS issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/samba-cifs-issue/m-p/4634990#M98818</link>
      <description>We have SAMBA/CIFS version 1.1 on Itanium 8.3 OpenVMS. We are copying files to the servers from widows environment. Then processing the file by a inhouse utility. We are finding that the file being writen to OpenVMS disk appears not to be write locked while being written through SAMBA. We were using pathworks till this week and our utility picked up that theer was a lock against teh new file being written, thus left the file alone. Now the utility is picking up 0 block files, it appears the file is being written to at the time and there is a typ ahead buffer or cache instead of block written file. Is there anyway to force SAMBA to accept writes without buffering, thus direct writes no buffering, so the file is complete before it is copied ?&lt;BR /&gt;&lt;BR /&gt;I hope somone can help ?&lt;BR /&gt;&lt;BR /&gt;Regards &lt;BR /&gt;&lt;BR /&gt;Tim Walsh</description>
      <pubDate>Tue, 18 May 2010 06:29:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/samba-cifs-issue/m-p/4634990#M98818</guid>
      <dc:creator>Timothy P Walsh</dc:creator>
      <dc:date>2010-05-18T06:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: SAMBA/CIFS issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/samba-cifs-issue/m-p/4634991#M98819</link>
      <description>Hi Tim,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; We are finding that the file being writen to OpenVMS disk appears not to be&lt;BR /&gt;&amp;gt;&amp;gt; write locked while being written through SAMBA.&lt;BR /&gt;Is there any particular command that you have used to find out that locks are&lt;BR /&gt;not taken on the file during the copy operation?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; Now the utility is picking up 0 block files&lt;BR /&gt;The file copy from the windows to VMS server is in progress and hence the file&lt;BR /&gt;should be locked during this time.&lt;BR /&gt;&lt;BR /&gt;The inhouse utility is finding that the file operation is in progress and hence&lt;BR /&gt;picking up only zero block files. The file content is still not completely updated&lt;BR /&gt;to the file.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; Is there anyway to force SAMBA to accept writes without buffering, thus direct&lt;BR /&gt;&amp;gt;&amp;gt; writes no buffering, so the file is complete before it is copied &lt;BR /&gt;It depends on the copy operation as to what lock it takes on the file.&lt;BR /&gt;i.e. what mode. The lock mode might prevent any other utility from accessing&lt;BR /&gt;the file. Something like a Exclusive lock will prevent others from accessing the&lt;BR /&gt;file.&lt;BR /&gt;&lt;BR /&gt;Secondly, it would be good if the inhouse utility gets the complete updated file&lt;BR /&gt;rather than a intermediate copy of the file. &lt;BR /&gt;Does getting a intermediate copy of the file cause any problems to the inhouse&lt;BR /&gt;utility?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Murali</description>
      <pubDate>Tue, 18 May 2010 06:59:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/samba-cifs-issue/m-p/4634991#M98819</guid>
      <dc:creator>P Muralidhar Kini</dc:creator>
      <dc:date>2010-05-18T06:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: SAMBA/CIFS issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/samba-cifs-issue/m-p/4634992#M98820</link>
      <description>Here's some generic reading on the locking mechanisms:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/locking.html" target="_blank"&gt;http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/locking.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.snia.org/tech_activities/CIFS/CIFS-TR-1p00_FINAL.pdf" target="_blank"&gt;http://www.snia.org/tech_activities/CIFS/CIFS-TR-1p00_FINAL.pdf&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Check your Samba logs.  &lt;BR /&gt;&lt;BR /&gt;Check testparm.&lt;BR /&gt;&lt;BR /&gt;Check the CIFS sources, too, as there used to be a  do_file_lock call that was pretty mellow in the CIFS source pool. (I haven't looked at the 1.1 code.)  The older code allowed everything; there was no locking.&lt;BR /&gt;&lt;BR /&gt;My guess is that CIFS isn't honoring the Windows locking mechanisms here, and isn't detecting the sharable flags correctly for your needs or isn't propagating the lock status over into the VMS locks.  &lt;BR /&gt;&lt;BR /&gt;Which means you'll probably want to move to a scheme where you rename the files into visibility (to your VMS pieces) within the share and avoid the issue you're encountering.&lt;BR /&gt;&lt;BR /&gt;Or detect the zero-block file and come back in a few minutes.  If your file format has an integrity check, run it.  If not, consider adding it and running it.&lt;BR /&gt;&lt;BR /&gt;There are several knobs around deny locks and oplocks that *might* be applicable, but I'd tend to go for the simplest available approach here.   Potentially as far as removing CIFS from the sequence and sftp or ftp the files over to VMS, or (depending on the application) serve the data up on-line.  Which is the approach I'd likely take here.  You'll still have to contend with files in flight and the locks that result (or with a database update), but you'll have fewer cogs spinning.&lt;BR /&gt;</description>
      <pubDate>Tue, 18 May 2010 09:56:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/samba-cifs-issue/m-p/4634992#M98820</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2010-05-18T09:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: SAMBA/CIFS issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/samba-cifs-issue/m-p/4634993#M98821</link>
      <description>Let me think in simple way -&lt;BR /&gt;&amp;gt;&amp;gt;We were using pathworks till this week and our utility picked up that theer was a lock against teh new file being written, thus left the file alone. &lt;BR /&gt;Does it mean that our utility was getting file currently locked by another user and not touching that file? &lt;BR /&gt;&amp;gt;&amp;gt;Now the utility is picking up 0 block files, it appears the file is being written to at the time and there is a typ ahead buffer or cache instead of block written file. &lt;BR /&gt; Now your utility is able to open the file but and able to read it with no data. Is this the case?&lt;BR /&gt;&lt;BR /&gt;Lokanath&lt;BR /&gt;</description>
      <pubDate>Tue, 18 May 2010 16:05:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/samba-cifs-issue/m-p/4634993#M98821</guid>
      <dc:creator>lokanath bagh</dc:creator>
      <dc:date>2010-05-18T16:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: SAMBA/CIFS issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/samba-cifs-issue/m-p/4634994#M98822</link>
      <description>&lt;!--!*#--&gt;Hi all,&lt;BR /&gt;My name is Ross and I am one of the application developers working with Tim. &lt;BR /&gt;Let me apologize in advance for the length of my post.&lt;BR /&gt;&lt;BR /&gt;To answer some of the questions:&lt;BR /&gt;1. Does getting a intermediate copy of the file cause any problems to the inhouse&lt;BR /&gt;utility?&lt;BR /&gt;ANS: Yes. It will cause problems. We need to ensure that the file transfer to the Samba share is complete before processing.&lt;BR /&gt;&lt;BR /&gt;2. At present, we have no control over the application that moves the files to the Samba share. It is a Windows application that uses FTP to transfer the files directly to the input directory of the application that consumes the data files. The files are copied without a rename.&lt;BR /&gt;The application that consumes these files is a COBOL application running under VMS on an Integrity server. The application attempts to open the file for sole access (ALLOWING NO OTHERS). If it detects that the file is locked by another user then it will not process the file. &lt;BR /&gt;&lt;BR /&gt;It looks like the COBOL application is not detecting a lock on the file while the file is being copied to the Samba share and therefore processes the file while it is still empty.&lt;BR /&gt;&lt;BR /&gt;From some of the reading I have done, my hunch is that it may have to do with the 'oplocks' parameter in CIFS/Samba that defaults to 'ON'. I believe that turning 'oplocks' OFF may resolve this issue because the locking would then be handled on the server (not at the client). I have also read recommendations that oplocks be turned off in a mixed environment such as ours (Windows applications and VMS/COBOL applications accessign the same share).&lt;BR /&gt;&lt;BR /&gt;Do you believe that this could solve our issue?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Ross</description>
      <pubDate>Wed, 19 May 2010 00:15:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/samba-cifs-issue/m-p/4634994#M98822</guid>
      <dc:creator>Ross Perri</dc:creator>
      <dc:date>2010-05-19T00:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: SAMBA/CIFS issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/samba-cifs-issue/m-p/4634995#M98823</link>
      <description>Hi Ross,&lt;BR /&gt;&lt;BR /&gt;From you response, the requirement is clear.&lt;BR /&gt;You dont want the in-house utility to process the files which are being modified.&lt;BR /&gt;&lt;BR /&gt;OPLOCKS(opportunistic locking) is a file locking protocol to improve&lt;BR /&gt;performance by controlling caching of files on the client. I am not sure whether&lt;BR /&gt;it can be used inorder to achive mutual exclusion.&lt;BR /&gt;&lt;BR /&gt;However to know whether the file is in use or not, may be you can try to get a&lt;BR /&gt;exclusive lock on it. Only if this succeds then the inhouse utility can proceed&lt;BR /&gt;to process the file.&lt;BR /&gt;&lt;BR /&gt;May be you can give this a try.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Murli</description>
      <pubDate>Wed, 19 May 2010 00:32:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/samba-cifs-issue/m-p/4634995#M98823</guid>
      <dc:creator>P Muralidhar Kini</dc:creator>
      <dc:date>2010-05-19T00:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: SAMBA/CIFS issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/samba-cifs-issue/m-p/4634996#M98824</link>
      <description>&lt;!--!*#--&gt;Hi Murli,&lt;BR /&gt;&lt;BR /&gt;Thanks for the reply. Just to clarify, that is exactly what we are doing. We attempt to open the file for exclusive access (i.e. exclusive lock). However, it seems that the exclusive lock is successful even though the file is still in the process of being copied across.&lt;BR /&gt;Which is why I am suggesting turning oplocks off. As you emntioned in your post, oplocks '...improve performance by controlling caching of files on the client'. I believe this is what we need to avoid. The caching on the client may be why we end up with zero-block files.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Ross&lt;BR /&gt;</description>
      <pubDate>Wed, 19 May 2010 01:09:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/samba-cifs-issue/m-p/4634996#M98824</guid>
      <dc:creator>Ross Perri</dc:creator>
      <dc:date>2010-05-19T01:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: SAMBA/CIFS issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/samba-cifs-issue/m-p/4634997#M98825</link>
      <description>Hi Ross,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; However, it seems that the exclusive lock is successful even though the file&lt;BR /&gt;&amp;gt;&amp;gt; is still in the process of being copied across.&lt;BR /&gt;Hmmm. This is intresting.&lt;BR /&gt;&lt;BR /&gt;Even though the files may be getting cached in the client, the operation on the&lt;BR /&gt;file is not complete. So i would have expected the exclusive mode lock to fail&lt;BR /&gt;as the file is currently being operated upon.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; Which is why I am suggesting turning oplocks off.&lt;BR /&gt;Doing this would prevent caching of files on the client, but i am not sure&lt;BR /&gt;whether this would solve the problem.&lt;BR /&gt;&lt;BR /&gt;Looks like its worth a try. May be you can give it a try and check if the problem&lt;BR /&gt;goes away.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Murali</description>
      <pubDate>Wed, 19 May 2010 01:22:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/samba-cifs-issue/m-p/4634997#M98825</guid>
      <dc:creator>P Muralidhar Kini</dc:creator>
      <dc:date>2010-05-19T01:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAMBA/CIFS issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/samba-cifs-issue/m-p/4634998#M98826</link>
      <description>Tim, Ross,&lt;BR /&gt;&lt;BR /&gt;may I suggest, that you log a call with HP to try to get to the real CIFS engineers and thus reduce speculation about what behaviour of CIFS does not match the previous behaviour as seen with Pathworks/Advanced Server. HP is certainly very interested to make CIFS behaviour like Pathworks - whenever possible.&lt;BR /&gt;&lt;BR /&gt;Volker.</description>
      <pubDate>Wed, 19 May 2010 04:42:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/samba-cifs-issue/m-p/4634998#M98826</guid>
      <dc:creator>Volker Halle</dc:creator>
      <dc:date>2010-05-19T04:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: SAMBA/CIFS issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/samba-cifs-issue/m-p/4634999#M98827</link>
      <description>just testing to make sure ITRC works before (re)typing a response...</description>
      <pubDate>Sun, 23 May 2010 19:53:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/samba-cifs-issue/m-p/4634999#M98827</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2010-05-23T19:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: SAMBA/CIFS issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/samba-cifs-issue/m-p/4635000#M98828</link>
      <description>Tim, Ross,&lt;BR /&gt;  Clash of world views... *ix vs VMS?&lt;BR /&gt;&lt;BR /&gt;I don't have a SAMBA/CIFS system to test, but something that might help, depending on how the files are written. &lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;So, one way you may be able to find when those 0 block files are complete, is to check that RDT &amp;gt; CDT. Lots of caveats, but it's easy to check, and may be sufficiently accurate for your purposes.</description>
      <pubDate>Sun, 23 May 2010 19:57:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/samba-cifs-issue/m-p/4635000#M98828</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2010-05-23T19:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAMBA/CIFS issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/samba-cifs-issue/m-p/4635001#M98829</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;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).&lt;BR /&gt;&lt;BR /&gt;There are some smb.conf parameters which affect data buffering such as "strict sync" and "sync always".&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;OPLOCKS aren't a locking mechanism, so don't recommend changing OPLOCK related smb.conf parameters.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;&lt;BR /&gt;Paul&lt;BR /&gt;</description>
      <pubDate>Mon, 24 May 2010 11:01:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/samba-cifs-issue/m-p/4635001#M98829</guid>
      <dc:creator>Paul Nunez</dc:creator>
      <dc:date>2010-05-24T11:01:17Z</dc:date>
    </item>
  </channel>
</rss>

