<?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 strange - FS usage differs in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-fs-usage-differs/m-p/3540677#M223183</link>
    <description>Hi, &lt;BR /&gt;I am working on copying contents of a dir under a file system to a different file system. I am using rsync here, just to make to same. Below is what I am doing. &lt;BR /&gt;&lt;BR /&gt;rsync -av /ora_dump/CTSPRD2 /ora_dump/NewCTSPRD2 &lt;BR /&gt;&lt;BR /&gt;I dont use compression because it's a local copy. &lt;BR /&gt;&lt;BR /&gt;Problem I am finding is strange till now: &lt;BR /&gt;&lt;BR /&gt;ohms# cd /ora_dump/CTSPRD2 &lt;BR /&gt;ohms# du -sk * &lt;BR /&gt;1296    audit&lt;BR /&gt;1327    audit.old&lt;BR /&gt;712     babu&lt;BR /&gt;1629195 bdump&lt;BR /&gt;19711   cdump&lt;BR /&gt;1       connect_report&lt;BR /&gt;0       exports&lt;BR /&gt;1       ksmsp_report&lt;BR /&gt;166080  monitor&lt;BR /&gt;1253699 perf&lt;BR /&gt;161078  udump&lt;BR /&gt;==========================&lt;BR /&gt;ohms# cd ../NewCTSPRD2 &lt;BR /&gt;ohms# du -sk * &lt;BR /&gt;ohms# du -sk * &lt;BR /&gt;2420    audit&lt;BR /&gt;2506    audit.old&lt;BR /&gt;712     babu&lt;BR /&gt;4908252 bdump&lt;BR /&gt;19710   cdump&lt;BR /&gt;0       connect_report&lt;BR /&gt;0       exports&lt;BR /&gt;0       ksmsp_report&lt;BR /&gt;0       lost+found&lt;BR /&gt;160624  monitor&lt;BR /&gt;1256534 perf&lt;BR /&gt;161148  udump&lt;BR /&gt;=============================&lt;BR /&gt; lvcreate -i 2 -I 64 -L 8192 -n vora_dump_ctsprd2 /dev/vgfs&lt;BR /&gt;==&lt;BR /&gt;newfs -F vxfs -o largefiles -b 2048 /dev/vgfs/rvora_dump_ctsprd2&lt;BR /&gt;====================================&lt;BR /&gt;I have tried chaning block factor to 8192/2048 etc. I can see the same usage difference, &lt;BR /&gt;&lt;BR /&gt;ohms# bdf /ora_dump &lt;BR /&gt;Filesystem          kbytes    used   avail %used Mounted on&lt;BR /&gt;/dev/vgfs/vora_dump&lt;BR /&gt;                   8192000 5445573 2574832   68% /ora_dump&lt;BR /&gt;ohms# bdf /ora_dump/NewCTSPRD2 &lt;BR /&gt;Filesystem          kbytes    used   avail %used Mounted on&lt;BR /&gt;/dev/vgfs/vora_dump_ctsprd2&lt;BR /&gt;                   8388608 6533104 1797578   78% /ora_dump/NewCTSPRD2&lt;BR /&gt;==============================================&lt;BR /&gt;I want to make it happen as ora_dump is common and I have seperate dir/s underneath it. &lt;BR /&gt;Anyone faced this or any suggestions..&lt;BR /&gt;&lt;BR /&gt;Thanks and regards&lt;BR /&gt;Prashant&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 09 May 2005 13:35:00 GMT</pubDate>
    <dc:creator>Prashant Zanwar_4</dc:creator>
    <dc:date>2005-05-09T13:35:00Z</dc:date>
    <item>
      <title>strange - FS usage differs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-fs-usage-differs/m-p/3540677#M223183</link>
      <description>Hi, &lt;BR /&gt;I am working on copying contents of a dir under a file system to a different file system. I am using rsync here, just to make to same. Below is what I am doing. &lt;BR /&gt;&lt;BR /&gt;rsync -av /ora_dump/CTSPRD2 /ora_dump/NewCTSPRD2 &lt;BR /&gt;&lt;BR /&gt;I dont use compression because it's a local copy. &lt;BR /&gt;&lt;BR /&gt;Problem I am finding is strange till now: &lt;BR /&gt;&lt;BR /&gt;ohms# cd /ora_dump/CTSPRD2 &lt;BR /&gt;ohms# du -sk * &lt;BR /&gt;1296    audit&lt;BR /&gt;1327    audit.old&lt;BR /&gt;712     babu&lt;BR /&gt;1629195 bdump&lt;BR /&gt;19711   cdump&lt;BR /&gt;1       connect_report&lt;BR /&gt;0       exports&lt;BR /&gt;1       ksmsp_report&lt;BR /&gt;166080  monitor&lt;BR /&gt;1253699 perf&lt;BR /&gt;161078  udump&lt;BR /&gt;==========================&lt;BR /&gt;ohms# cd ../NewCTSPRD2 &lt;BR /&gt;ohms# du -sk * &lt;BR /&gt;ohms# du -sk * &lt;BR /&gt;2420    audit&lt;BR /&gt;2506    audit.old&lt;BR /&gt;712     babu&lt;BR /&gt;4908252 bdump&lt;BR /&gt;19710   cdump&lt;BR /&gt;0       connect_report&lt;BR /&gt;0       exports&lt;BR /&gt;0       ksmsp_report&lt;BR /&gt;0       lost+found&lt;BR /&gt;160624  monitor&lt;BR /&gt;1256534 perf&lt;BR /&gt;161148  udump&lt;BR /&gt;=============================&lt;BR /&gt; lvcreate -i 2 -I 64 -L 8192 -n vora_dump_ctsprd2 /dev/vgfs&lt;BR /&gt;==&lt;BR /&gt;newfs -F vxfs -o largefiles -b 2048 /dev/vgfs/rvora_dump_ctsprd2&lt;BR /&gt;====================================&lt;BR /&gt;I have tried chaning block factor to 8192/2048 etc. I can see the same usage difference, &lt;BR /&gt;&lt;BR /&gt;ohms# bdf /ora_dump &lt;BR /&gt;Filesystem          kbytes    used   avail %used Mounted on&lt;BR /&gt;/dev/vgfs/vora_dump&lt;BR /&gt;                   8192000 5445573 2574832   68% /ora_dump&lt;BR /&gt;ohms# bdf /ora_dump/NewCTSPRD2 &lt;BR /&gt;Filesystem          kbytes    used   avail %used Mounted on&lt;BR /&gt;/dev/vgfs/vora_dump_ctsprd2&lt;BR /&gt;                   8388608 6533104 1797578   78% /ora_dump/NewCTSPRD2&lt;BR /&gt;==============================================&lt;BR /&gt;I want to make it happen as ora_dump is common and I have seperate dir/s underneath it. &lt;BR /&gt;Anyone faced this or any suggestions..&lt;BR /&gt;&lt;BR /&gt;Thanks and regards&lt;BR /&gt;Prashant&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 09 May 2005 13:35:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-fs-usage-differs/m-p/3540677#M223183</guid>
      <dc:creator>Prashant Zanwar_4</dc:creator>
      <dc:date>2005-05-09T13:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: strange - FS usage differs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-fs-usage-differs/m-p/3540678#M223184</link>
      <description>Files that are in use, will not be copied.&lt;BR /&gt;Are there any files that are in use??&lt;BR /&gt;&lt;BR /&gt;lsof +D /dir1 - source dir.&lt;BR /&gt;fuser -cu /FS - source FS&lt;BR /&gt;&lt;BR /&gt;Anil&lt;BR /&gt;</description>
      <pubDate>Mon, 09 May 2005 13:42:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-fs-usage-differs/m-p/3540678#M223184</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-05-09T13:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: strange - FS usage differs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-fs-usage-differs/m-p/3540679#M223185</link>
      <description>Hmm..Destination is bigger in size. &lt;BR /&gt;Files are getting copied, but are getting double in size at destination. &lt;BR /&gt;if you see bdump size, it's quite big at destination. &lt;BR /&gt;I have copied when file system was down also..offcourse tried oevrwriting..didnt make a difference..&lt;BR /&gt;Files will be use as CTSPRD2 is live. &lt;BR /&gt;Thanks &lt;BR /&gt;Prashant</description>
      <pubDate>Mon, 09 May 2005 14:14:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-fs-usage-differs/m-p/3540679#M223185</guid>
      <dc:creator>Prashant Zanwar_4</dc:creator>
      <dc:date>2005-05-09T14:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: strange - FS usage differs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-fs-usage-differs/m-p/3540680#M223186</link>
      <description>Hi Prashant,&lt;BR /&gt;&lt;BR /&gt;Try to eliminate to copy command.&lt;BR /&gt;Something like&lt;BR /&gt;&lt;BR /&gt;# find /ora_dump/CTSPRD2 | cpio -pcmudv /ora_dump/NewCTSPRD2&lt;BR /&gt;&lt;BR /&gt;Robert-Jan</description>
      <pubDate>Mon, 09 May 2005 14:25:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-fs-usage-differs/m-p/3540680#M223186</guid>
      <dc:creator>Robert-Jan Goossens</dc:creator>
      <dc:date>2005-05-09T14:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: strange - FS usage differs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-fs-usage-differs/m-p/3540681#M223187</link>
      <description>This is probably the result of sparse files. When sparse files are copied the "missing" bytes are filled in with NUL's on the destination file.&lt;BR /&gt;&lt;BR /&gt;You can see this for yourself by doing this:&lt;BR /&gt;mkdir /var/tmp/mydir /var/tmp/mydir2&lt;BR /&gt;cd /var/tmp/mydir&lt;BR /&gt;dd if=/dev/zero bs=1k oseek=1000000 count=1 of=x&lt;BR /&gt;cp x ../mydir2/&lt;BR /&gt;&lt;BR /&gt;du -k /var/tmp/mydir&lt;BR /&gt;du -k /var/tmp/mydir2&lt;BR /&gt;&lt;BR /&gt;Surprisingly, an ls -l of both files will show a 1MB (+1k) file size but the du will report very different results because the two commands are looking at very different things.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 09 May 2005 14:38:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-fs-usage-differs/m-p/3540681#M223187</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-05-09T14:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: strange - FS usage differs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-fs-usage-differs/m-p/3540682#M223188</link>
      <description>As Clay mentioned, you will see a much larger result in the copy due to sparse files, a very normal Unix behavior. If a program crashes and creates a core file, this file almost always copies to a larger size (the extra space is filled with nuls). The file's behavior  is identical, whether the undefined space is filled with zeros or not. Here's what happens: a serial read just advances to the next record and does not know anything about the missing records. The filesystem code will 'fill in' the missing areas with nuls. So the copy has real nuls and will be larger, but both files will comparer exactly the same.&lt;BR /&gt; &lt;BR /&gt;It is also possible for the copied files and direrctories to be smaller. In this case, it is due to 'sparse directories'. When you create a directory (mkdir), it will be 2 blocks in size. Create thousdands of new files in the directory and the size of the directory (ll -d /some_directory) might be 512 blocks. Now purge all the files. The directory is still 512 blocks but contains nothing but 'empty' or reusable records. Directories are not truncated when files are removed, but if you copy the directory, it is created as 2 blocks and then enlarged when necessary.&lt;BR /&gt; &lt;BR /&gt;The only thing you can rely on is the quantity of directories and files. Use find and wc to count for you.</description>
      <pubDate>Mon, 09 May 2005 15:43:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-fs-usage-differs/m-p/3540682#M223188</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2005-05-09T15:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: strange - FS usage differs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-fs-usage-differs/m-p/3540683#M223189</link>
      <description>So I guess while the source file system is not in use,  shall  it be ok to copy..&lt;BR /&gt;Thanks &lt;BR /&gt;Prashant</description>
      <pubDate>Mon, 09 May 2005 15:53:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-fs-usage-differs/m-p/3540683#M223189</guid>
      <dc:creator>Prashant Zanwar_4</dc:creator>
      <dc:date>2005-05-09T15:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: strange - FS usage differs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-fs-usage-differs/m-p/3540684#M223190</link>
      <description>When source files are not in use, difference in size between source and destination should be smaller.&lt;BR /&gt;&lt;BR /&gt;If size still does not match, there may be some  sparse files, so you may want to run rsync with -S option.&lt;BR /&gt;&lt;BR /&gt;-S, --sparse                handle sparse files efficiently</description>
      <pubDate>Mon, 09 May 2005 20:22:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-fs-usage-differs/m-p/3540684#M223190</guid>
      <dc:creator>Ermin Borovac</dc:creator>
      <dc:date>2005-05-09T20:22:31Z</dc:date>
    </item>
  </channel>
</rss>

