<?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: File copy versus disk cluster size in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/file-copy-versus-disk-cluster-size/m-p/4480902#M17124</link>
    <description>Is this box reasonably current on its OpenVMS Alpha V7.3-2 patches?  If it is not, do start there.&lt;BR /&gt;&lt;BR /&gt;A DUMP /HEADER /BLOCK=END=0 and a DIRECTORY /FULL before and after the copy, too, please?&lt;BR /&gt;&lt;BR /&gt;And the obvious question, why do you care?  Some sort of a data integrity check in use locally?  Any particular untoward behavior noted?  Sheer curiosity?</description>
    <pubDate>Mon, 17 Aug 2009 19:19:02 GMT</pubDate>
    <dc:creator>Hoff</dc:creator>
    <dc:date>2009-08-17T19:19:02Z</dc:date>
    <item>
      <title>File copy versus disk cluster size</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/file-copy-versus-disk-cluster-size/m-p/4480899#M17121</link>
      <description>When I copy a file on our VMS 7.3-2 system from &lt;BR /&gt;DSKA (cluster size 69) to DSKB (cluster size 9) and back again, the file size (blocks used) changes.  I'm not sure why this happens, but is there any way I can restore the file back to original condition after copying it?&lt;BR /&gt;&lt;BR /&gt;$Dir/size=all DSKA:[xx]temp.fil&lt;BR /&gt;TEMP.FIL;1     2001/2001&lt;BR /&gt;&lt;BR /&gt;$Copy DSKA:[XX]TEMP.FIL DSKB:[XX]TEMP.FIL&lt;BR /&gt;$DIR/SIZE=ALL DSKB:[XX]TEMP.FIL&lt;BR /&gt;TEMP.FIL;1     2001/2007&lt;BR /&gt;&lt;BR /&gt;$Copy DSKB:[XX]TEMP.FIL DSKA:[XX]TEMP2.FIL&lt;BR /&gt;$DIR/SIZE=ALL DSKA:[XX]TEMP2.FIL&lt;BR /&gt;TEMP2.FIL;1    2007/2070&lt;BR /&gt;&lt;BR /&gt;TEMP.FIL info:&lt;BR /&gt;File organization:  Relative, maximum record number: 2147483647&lt;BR /&gt;Shelved state:      Online &lt;BR /&gt;Caching attribute:  Writethrough&lt;BR /&gt;File attributes:    Allocation: 2001, Extend: 0, Bucket size: 2&lt;BR /&gt;                    Global buffer count: 0, No version limit, Contiguous&lt;BR /&gt;Record format:      Fixed length 512 byte records&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;John</description>
      <pubDate>Mon, 17 Aug 2009 17:22:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/file-copy-versus-disk-cluster-size/m-p/4480899#M17121</guid>
      <dc:creator>John Symmonds</dc:creator>
      <dc:date>2009-08-17T17:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: File copy versus disk cluster size</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/file-copy-versus-disk-cluster-size/m-p/4480900#M17122</link>
      <description>&lt;!--!*#--&gt;&amp;gt; File organization: Relative, [...]&lt;BR /&gt;&lt;BR /&gt;Hmmm.  I don't do much with these.&lt;BR /&gt;&lt;BR /&gt;What does BACKUP do?</description>
      <pubDate>Mon, 17 Aug 2009 17:35:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/file-copy-versus-disk-cluster-size/m-p/4480900#M17122</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2009-08-17T17:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: File copy versus disk cluster size</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/file-copy-versus-disk-cluster-size/m-p/4480901#M17123</link>
      <description>&lt;BR /&gt;with backup, &lt;BR /&gt;$DIR/SIZE=ALL DSKA:[XX]TEMP2.FIL&lt;BR /&gt;TEMP2.FIL;1 2001/2070&lt;BR /&gt;&lt;BR /&gt;This seems better.  Is COPY broken or should I have expected this behaviour?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 17 Aug 2009 19:08:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/file-copy-versus-disk-cluster-size/m-p/4480901#M17123</guid>
      <dc:creator>John Symmonds</dc:creator>
      <dc:date>2009-08-17T19:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: File copy versus disk cluster size</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/file-copy-versus-disk-cluster-size/m-p/4480902#M17124</link>
      <description>Is this box reasonably current on its OpenVMS Alpha V7.3-2 patches?  If it is not, do start there.&lt;BR /&gt;&lt;BR /&gt;A DUMP /HEADER /BLOCK=END=0 and a DIRECTORY /FULL before and after the copy, too, please?&lt;BR /&gt;&lt;BR /&gt;And the obvious question, why do you care?  Some sort of a data integrity check in use locally?  Any particular untoward behavior noted?  Sheer curiosity?</description>
      <pubDate>Mon, 17 Aug 2009 19:19:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/file-copy-versus-disk-cluster-size/m-p/4480902#M17124</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-08-17T19:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: File copy versus disk cluster size</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/file-copy-versus-disk-cluster-size/m-p/4480903#M17125</link>
      <description>&lt;BR /&gt;All the latest patches as of mid-July 2009 have been applied.&lt;BR /&gt;&lt;BR /&gt;The reason that it matters is that the program which uses this file, uses the 'blocks used' in it's index calculation so it could encounter errors if that number changes.  We are looking into migrating our disk storage to a SAN which will probably have different disk cluster sizes.&lt;BR /&gt;&lt;BR /&gt;I've attached a text file which has the Dir/full and Dump/header output for all 3 files.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;John</description>
      <pubDate>Mon, 17 Aug 2009 19:52:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/file-copy-versus-disk-cluster-size/m-p/4480903#M17125</guid>
      <dc:creator>John Symmonds</dc:creator>
      <dc:date>2009-08-17T19:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: File copy versus disk cluster size</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/file-copy-versus-disk-cluster-size/m-p/4480904#M17126</link>
      <description>&lt;!--!*#--&gt;The used-block count from directory comes from the RMS file attruibute EBK (end-of-block), and of course there is a companion attribute, FFB (first-free-byte).&lt;BR /&gt;&lt;BR /&gt;The RMS manual says this:&lt;BR /&gt;&lt;BR /&gt;XAB$L_EBK Field&lt;BR /&gt;&lt;SNIP&gt;&lt;BR /&gt;The XAB$L_EBK field is meaningful for sequential files only.&lt;BR /&gt;&lt;BR /&gt;XAB$W_FFB Field&lt;BR /&gt;&lt;SNIP&gt;&lt;BR /&gt;The XAB$W_FFB field is meaningful for sequential files only. &lt;BR /&gt;&lt;/SNIP&gt;&lt;/SNIP&gt;</description>
      <pubDate>Mon, 17 Aug 2009 21:42:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/file-copy-versus-disk-cluster-size/m-p/4480904#M17126</guid>
      <dc:creator>Jess Goodman</dc:creator>
      <dc:date>2009-08-17T21:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: File copy versus disk cluster size</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/file-copy-versus-disk-cluster-size/m-p/4480905#M17127</link>
      <description>2001 is a multiple of 69 blocks and the end of file marker is notionally the start of the next block.&lt;BR /&gt;&lt;BR /&gt;2007 is a multiple of 9 blocks (disk allocation on that disk) and the end of file marker is given a block 2002.&lt;BR /&gt;&lt;BR /&gt;Copying it back to the first disk is seen as copying 2002 blocks, which according to cluster size needs 2070 blocks (the next multiple of 69 blocks)&lt;BR /&gt;&lt;BR /&gt;I think the problem lies in having records of 512 bytes because this forces the EOF marker to refer to the next block, whose existence is inconsistent.&lt;BR /&gt;</description>
      <pubDate>Mon, 17 Aug 2009 22:14:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/file-copy-versus-disk-cluster-size/m-p/4480905#M17127</guid>
      <dc:creator>John McL</dc:creator>
      <dc:date>2009-08-17T22:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: File copy versus disk cluster size</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/file-copy-versus-disk-cluster-size/m-p/4480906#M17128</link>
      <description>RMS _does_ maintain the EBK for relative file.&lt;BR /&gt;If the file is extended by RMS for record processing (Copy uses block processing) then the EOF is set to the allocated block minus one, and on the extent all buckets are initialized to make sure no data magically appears.&lt;BR /&gt;&lt;BR /&gt;The reason for the growth itself is easy right? Just a matter of lowest common denominator.&lt;BR /&gt;But the transition from 2001/2007 to 2007/2070 looks very suspect. If High Water Marking is not enabled then that may have given the file a few more record than it had.  &lt;BR /&gt;&lt;BR /&gt;I'd be tempted to check with DUMP/RECO=(COUNT=1,START=1001) on the original and final.&lt;BR /&gt;&lt;BR /&gt;I would also get onto an 8.3 system (EISNER?) to repeat the experiment but have no time right now to do a solid experiment.&lt;BR /&gt;&lt;BR /&gt;For proper experiments, just use and MD or LD device with selected cluster sizes and. Perhaps disable HWM and pre-fill space with a pattern (PERL, CONVERT/PAD, whatever)  delete  file to get the dirty space next and do the copy experiment.&lt;BR /&gt;&lt;BR /&gt;Using the EOF is relatively scary, as you can only use that when also taking the bucket size and record size into consideration.&lt;BR /&gt;&lt;BR /&gt;This file is really SILLY... a record size of 512 will be pre-pended with a 1 byte flag which will cause a maximum of 1 record per bucket --&amp;gt; 50% waste and 1 IO per record.&lt;BR /&gt;&lt;BR /&gt;Please consider / experiment with a convert to a bucket size of 8 or 16 or so but test extensively as the EOF calculations will changes, and convert 'packs' records.&lt;BR /&gt;&lt;BR /&gt;Hope this helps some,&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Mon, 17 Aug 2009 23:03:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/file-copy-versus-disk-cluster-size/m-p/4480906#M17128</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2009-08-17T23:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: File copy versus disk cluster size</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/file-copy-versus-disk-cluster-size/m-p/4480907#M17129</link>
      <description>What effect does $ SET FILE/ATTRIB=(EBK:2002,FFB:0) &lt;FILENAME&gt; have on the file?&lt;BR /&gt;&lt;BR /&gt;(It would be a good idea to take a copy of the file and test this command on the copy.)&lt;BR /&gt;&lt;BR /&gt;If it resets the two fields in the file header (seen with the DUMP/HEADER) then if the size hasn't trimmed immediately you might try a SET FILE/TRUNCATE &lt;FILENAME&gt;.&lt;BR /&gt;&lt;BR /&gt;I think the question is whether COPY is happy with a relative file finishing precisely on a block (and cluster) boundary.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FILENAME&gt;&lt;/FILENAME&gt;</description>
      <pubDate>Tue, 18 Aug 2009 03:13:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/file-copy-versus-disk-cluster-size/m-p/4480907#M17129</guid>
      <dc:creator>John McL</dc:creator>
      <dc:date>2009-08-18T03:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: File copy versus disk cluster size</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/file-copy-versus-disk-cluster-size/m-p/4480908#M17130</link>
      <description>Actually.. I spoke too soon.&lt;BR /&gt;&lt;BR /&gt;The true EOF for a relative file is maintained in the header. You can see that easily enough with $ ANAL/RMS/INT.&lt;BR /&gt;&lt;BR /&gt;RMS Actually 'fixes' the File system EOF to match this when opening the file shared.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; but is there any way I can restore the file back to original condition after copying it?&lt;BR /&gt;&lt;BR /&gt;Yes!&lt;BR /&gt;&lt;BR /&gt;Watch this (8.3):&lt;BR /&gt;&lt;BR /&gt;$ convert/fdl="fil; org rel; rec; for fix; siz 512"/pad/trun tt: tmp.old&lt;BR /&gt;aap&lt;BR /&gt;noot&lt;BR /&gt;mies&lt;BR /&gt;$ &lt;BR /&gt;$ mcr sysman io connect mda1 /driver=sys$mddriver/noadap&lt;BR /&gt;$ ini mda1: hein/clus=23/size=5000/max=20/nohigh&lt;BR /&gt;$ mou mda1: hein&lt;BR /&gt;$ copy/log tmp.old mda1:[000000]tmp.tmp&lt;BR /&gt;%COPY-S-COPIED, TMP.OLD;1 copied to MDA1:[000000]TMP.TMP;1 (9 blocks)&lt;BR /&gt;$ copy/log  mda1:[000000]tmp.tmp sys$login:tmp.new&lt;BR /&gt;%COPY-S-COPIED, MDA1:[000000]TMP.TMP;1 copied to TMP.NEW;1 (23 blocks)&lt;BR /&gt;$ dir/size=all tmp.old;,.new;,MDA1:[000000]TMP.TMP;&lt;BR /&gt;&lt;BR /&gt;TMP.NEW;1                 23/24&lt;BR /&gt;TMP.OLD;1                  9/9&lt;BR /&gt;Directory MDA1:[000000]&lt;BR /&gt;TMP.TMP;1                  9/23&lt;BR /&gt;&lt;BR /&gt;$ open/read/write/share=write new tmp.new&lt;BR /&gt;$ close new&lt;BR /&gt;$ dir /size=all tmp.new;&lt;BR /&gt;TMP.NEW;1                  9/24&lt;BR /&gt;$ set file/trun tmp.new&lt;BR /&gt;$ dir /size=all tmp.new;&lt;BR /&gt;TMP.NEW;1                  9/9&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Also, the RMS DEFAULT for creating a 512 byte fixed length record relative file is a 2 block bucket. So RMS is silly as well. It's excuse is that it can not read your mind. It does not know how the file will be used. You should.&lt;BR /&gt;&lt;BR /&gt;Those 512 byte records more often than not proves that a little knowledge is a dangerous thing to have, or 'some folks know just enough to be dangerous'. They know about 512 byte blocks, and will 'fill out' a record to a 'nice' 512. Why? In this example, due to the flag byte, it becomes horrible.&lt;BR /&gt;&lt;BR /&gt;Hope this helps better,&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Tue, 18 Aug 2009 03:16:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/file-copy-versus-disk-cluster-size/m-p/4480908#M17130</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2009-08-18T03:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: File copy versus disk cluster size</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/file-copy-versus-disk-cluster-size/m-p/4480909#M17131</link>
      <description>Argh... I wrote 'header' but intended 'prologue'. &lt;BR /&gt;That would be the 'internal header', or VBN 1.&lt;BR /&gt;&lt;BR /&gt;John McL, Relative file are organized in BUCKETS and therefore is is utterly irrelevant whether the record size has a special value.&lt;BR /&gt;&lt;BR /&gt;Yes you can SET FILE/ATTR=EBK=xxx for a relative file.&lt;BR /&gt;RMS itself will ignore and read up until the prologue EOF.&lt;BR /&gt;If you then truncate, RMS will silently stop reading at the HIGH (allocated) block.&lt;BR /&gt;&lt;BR /&gt;ANAL/RMS will complain. For example:&lt;BR /&gt;$ dir/size=all tmp.new.&lt;BR /&gt;TMP.NEW;1                  2/6&lt;BR /&gt;$ anal/rms tmp.new&lt;BR /&gt;:&lt;BR /&gt;        End-of-File VBN: 10&lt;BR /&gt;        Prolog Version: 1&lt;BR /&gt;***  Attempt to read block with invalid VBN 6.&lt;BR /&gt;Unrecoverable error encountered in structure of file.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Tue, 18 Aug 2009 03:25:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/file-copy-versus-disk-cluster-size/m-p/4480909#M17131</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2009-08-18T03:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: File copy versus disk cluster size</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/file-copy-versus-disk-cluster-size/m-p/4480910#M17132</link>
      <description>&lt;BR /&gt;Ok here's what I've learned so far:&lt;BR /&gt;&lt;BR /&gt;1) We should use BACKUP to copy files like this whenever possible.&lt;BR /&gt;2) Our file is not very well thought-out.&lt;BR /&gt;3) RMS fixes the file system EOF when the file is opened for shared access.&lt;BR /&gt;4) I've got a lot of reading to do in my spare time to understand some of this.&lt;BR /&gt;&lt;BR /&gt;Also, I have to spend some time to understand how this file is used in our system. &lt;BR /&gt;Thanks a LOT for all the info.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;John</description>
      <pubDate>Tue, 18 Aug 2009 17:12:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/file-copy-versus-disk-cluster-size/m-p/4480910#M17132</guid>
      <dc:creator>John Symmonds</dc:creator>
      <dc:date>2009-08-18T17:12:04Z</dc:date>
    </item>
  </channel>
</rss>

