<?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: Inodes !!!!!! in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/inodes/m-p/3131196#M804889</link>
    <description>When you copy files from one filesystem to anither you will almost *ALWAYS* have a different amount of space occupied as well as a different number of inodes used. The reasons are twofold: directories and sparse files. Let's start with directories:&lt;BR /&gt; &lt;BR /&gt;- Directories are just special files that hold information about filenames and inode numbers. When a directory is first created, the size of the directory is 96 bytes. After creating a bunch of files inside the directory, it will grow to accomodate the additional entries. However, if you create 10,000 files in the directory, then remove all but 1 file, the directory will still be several kilobytes in size. The reason is that there are now a bunch of empty slots in the directory but the overhead needed to compress the directory after each file is removed would be enormous, so the directory is left as is with lots of empty slots waiting to be reused. Now if you copy this directory using cp -r or use tar or cpio or any other backup program to copy the directory to a new location, the directory will be created as 96 bytes and the one file fits nicely in this new directory. But the occupied space shown by du or bdf will be different between the original (which is bigger) and the copy (which is smaller). The result is perfectly OK though.&lt;BR /&gt; &lt;BR /&gt;- Sparse files: This is a file that is created by using lseek to write a new record, then skip a million records and write another record at position 1,000,000. The resultant file contains 2 valid records and 999,998 records full of nulls. On the original system, the space will show up in wc and ls -l but the undefined records are not stored nor counted in bdf or du. Depending on the size of the file and the spareseness, the difference in apparent versus actual size may be VERY large. &lt;BR /&gt;&lt;BR /&gt;Create your own sparse file with: &lt;BR /&gt; &lt;BR /&gt;dd if=/etc/issue of=/var/tmp/sparse bs=2048k seek=1 &lt;BR /&gt; &lt;BR /&gt;where you will see the original file is just a few dozen bytes, the result with ls -l or wc -c shows a 2 meg file, but du will show the file as occupying just a bit more than the original /etc/issue file. A cp of the file will create a new file that is the same size (using ls -l or wc -c) but du will now show a MUCH larger size than the original file and it will use more inodes. However, both the original and the copy will diff exactly the same and programs cannot tell any difference between the two files.&lt;BR /&gt; &lt;BR /&gt;So in summary, you can't use bdf or du (or df) to verify a directory copy. Instead, use find to count the files and the directories and if necessary, use ls -l to find the size of both source and destination files and compare those numbers.</description>
    <pubDate>Fri, 28 Nov 2003 15:08:45 GMT</pubDate>
    <dc:creator>Bill Hassell</dc:creator>
    <dc:date>2003-11-28T15:08:45Z</dc:date>
    <item>
      <title>Inodes !!!!!!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/inodes/m-p/3131190#M804883</link>
      <description>In a filesystem (Online JFS), I had 20,000 files and later some of the files got housekept (deleted). Would df -i still show 20000 inoded or would it reduce the number of inodes allocated ?.&lt;BR /&gt;&lt;BR /&gt;Kaps</description>
      <pubDate>Fri, 28 Nov 2003 10:59:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/inodes/m-p/3131190#M804883</guid>
      <dc:creator>KapilRaj</dc:creator>
      <dc:date>2003-11-28T10:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: Inodes !!!!!!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/inodes/m-p/3131191#M804884</link>
      <description>HI Kaps,&lt;BR /&gt;&lt;BR /&gt;In my opinion it should reduce.&lt;BR /&gt;Just did a test on a 11.0 and removes 50 logfiles.&lt;BR /&gt;&lt;BR /&gt;bdf -i /home&lt;BR /&gt;/dev/vg01/lvol10   4374528 4067213  296998   93%  13850  76826   15% /home&lt;BR /&gt;&lt;BR /&gt;bdf -i /home&lt;BR /&gt;/dev/vg01/lvol10   4374528 4067161  297060   93%  13798  76838   15% /home&lt;BR /&gt;&lt;BR /&gt;Hope it helps,&lt;BR /&gt;Robert-Jan</description>
      <pubDate>Fri, 28 Nov 2003 11:06:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/inodes/m-p/3131191#M804884</guid>
      <dc:creator>Robert-Jan Goossens</dc:creator>
      <dc:date>2003-11-28T11:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: Inodes !!!!!!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/inodes/m-p/3131192#M804885</link>
      <description>innodes are created dynamically when they are needed.  They might not get deallocated so fast.&lt;BR /&gt;&lt;BR /&gt;innode useage is not a big deal because the OS will create as many as it needs.  There is no limit to how many innodes can be created.&lt;BR /&gt;&lt;BR /&gt;Answer 1: don't worry about it.&lt;BR /&gt;Answer 2: reboot the system and see if an adjustment is made.&lt;BR /&gt;Answer 3: backup up the data on the filesystem, newfs -F vxfs /vg00/rlvol1 the fs and recreate it.&lt;BR /&gt;Answer 4: If you have online JFS fsadm the fs and defragment it and see it that helps.&lt;BR /&gt;&lt;BR /&gt;Have a nice weekend.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Fri, 28 Nov 2003 11:12:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/inodes/m-p/3131192#M804885</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-11-28T11:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: Inodes !!!!!!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/inodes/m-p/3131193#M804886</link>
      <description>OK....&lt;BR /&gt;&lt;BR /&gt;Thanks for that anybody else hv a diff openion ?. I am pissed off transfering 13,69,374 filesfrom an fs to a diff filesystem and I got confusd as the destination fileystems still shows a lesser percentage of inodes used !!!&lt;BR /&gt;&lt;BR /&gt;Kaps</description>
      <pubDate>Fri, 28 Nov 2003 11:16:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/inodes/m-p/3131193#M804886</guid>
      <dc:creator>KapilRaj</dc:creator>
      <dc:date>2003-11-28T11:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: Inodes !!!!!!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/inodes/m-p/3131194#M804887</link>
      <description>#stat -i &lt;BR /&gt;it should be give the number of inode.&lt;BR /&gt;Bruno</description>
      <pubDate>Fri, 28 Nov 2003 11:20:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/inodes/m-p/3131194#M804887</guid>
      <dc:creator>Bruno Ganino</dc:creator>
      <dc:date>2003-11-28T11:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: Inodes !!!!!!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/inodes/m-p/3131195#M804888</link>
      <description>Steven,&lt;BR /&gt;&lt;BR /&gt;I am sorry ,can not agree to the point that inodes are allocated dynamically and have no limit !. It has a limit even for a JFS. It is the "Number Of Bytes Per Inode" which decides it.&lt;BR /&gt;&lt;BR /&gt;Theory says inodes are allocated on demand and hv no limit .. but reality , NO!&lt;BR /&gt;&lt;BR /&gt;Let's wait for other's comments as well.&lt;BR /&gt;&lt;BR /&gt;Thanks for your suggession ... (Can't re-boot this bloody box as it affects business.. Can u hear a sysadmin crying !!!)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Kaps........</description>
      <pubDate>Fri, 28 Nov 2003 11:21:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/inodes/m-p/3131195#M804888</guid>
      <dc:creator>KapilRaj</dc:creator>
      <dc:date>2003-11-28T11:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: Inodes !!!!!!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/inodes/m-p/3131196#M804889</link>
      <description>When you copy files from one filesystem to anither you will almost *ALWAYS* have a different amount of space occupied as well as a different number of inodes used. The reasons are twofold: directories and sparse files. Let's start with directories:&lt;BR /&gt; &lt;BR /&gt;- Directories are just special files that hold information about filenames and inode numbers. When a directory is first created, the size of the directory is 96 bytes. After creating a bunch of files inside the directory, it will grow to accomodate the additional entries. However, if you create 10,000 files in the directory, then remove all but 1 file, the directory will still be several kilobytes in size. The reason is that there are now a bunch of empty slots in the directory but the overhead needed to compress the directory after each file is removed would be enormous, so the directory is left as is with lots of empty slots waiting to be reused. Now if you copy this directory using cp -r or use tar or cpio or any other backup program to copy the directory to a new location, the directory will be created as 96 bytes and the one file fits nicely in this new directory. But the occupied space shown by du or bdf will be different between the original (which is bigger) and the copy (which is smaller). The result is perfectly OK though.&lt;BR /&gt; &lt;BR /&gt;- Sparse files: This is a file that is created by using lseek to write a new record, then skip a million records and write another record at position 1,000,000. The resultant file contains 2 valid records and 999,998 records full of nulls. On the original system, the space will show up in wc and ls -l but the undefined records are not stored nor counted in bdf or du. Depending on the size of the file and the spareseness, the difference in apparent versus actual size may be VERY large. &lt;BR /&gt;&lt;BR /&gt;Create your own sparse file with: &lt;BR /&gt; &lt;BR /&gt;dd if=/etc/issue of=/var/tmp/sparse bs=2048k seek=1 &lt;BR /&gt; &lt;BR /&gt;where you will see the original file is just a few dozen bytes, the result with ls -l or wc -c shows a 2 meg file, but du will show the file as occupying just a bit more than the original /etc/issue file. A cp of the file will create a new file that is the same size (using ls -l or wc -c) but du will now show a MUCH larger size than the original file and it will use more inodes. However, both the original and the copy will diff exactly the same and programs cannot tell any difference between the two files.&lt;BR /&gt; &lt;BR /&gt;So in summary, you can't use bdf or du (or df) to verify a directory copy. Instead, use find to count the files and the directories and if necessary, use ls -l to find the size of both source and destination files and compare those numbers.</description>
      <pubDate>Fri, 28 Nov 2003 15:08:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/inodes/m-p/3131196#M804889</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2003-11-28T15:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: Inodes !!!!!!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/inodes/m-p/3131197#M804890</link>
      <description>Almost forgot: number_of_bytes_per_inode is only meaningful for HFS filesystems where the number of inodes is fixed at creation (newfs or mkfs) and cannot be increased. JFS uses a very different method to allocate inodes and unfortunately, bdf (and df) are just guessing when they report % i-nodes used. The VxFS filesystem does indeed create inodes on the fly and is limited only by the disk space. That's why the man pages for newfs_hfs and mkfs_hfs are different from newfs_vxfs and mkfs_vxfs. From the man page for mkfs_vxfs:&lt;BR /&gt; &lt;BR /&gt;"Inode allocation is done dynamically.  There are a minimum number of inodes allocated to the file system by mkfs, and any other inode allocations are done on an as-needed basis during file system use."</description>
      <pubDate>Fri, 28 Nov 2003 15:20:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/inodes/m-p/3131197#M804890</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2003-11-28T15:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: Inodes !!!!!!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/inodes/m-p/3131198#M804891</link>
      <description>Thanks and well apreciated !. Your comments make this thread worth reading !!&lt;BR /&gt;&lt;BR /&gt;Kaps</description>
      <pubDate>Sat, 29 Nov 2003 14:11:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/inodes/m-p/3131198#M804891</guid>
      <dc:creator>KapilRaj</dc:creator>
      <dc:date>2003-11-29T14:11:23Z</dc:date>
    </item>
  </channel>
</rss>

