Wednesday, March 4, 2015

inode info

Find where inodes are being used
df -i

Basically an inode is used for each file on the filesystem. So running out of inodes generally means you've got a lot of small files laying around. So the question really becomes, "what directory has a large number of files in it?"

so we can use the following command:
# find / -xdev -printf '%h\n' | sort | uniq -c | sort -k 1 -n
Note: You can always replace the \n with \0 and use sort -z above).
http://unix.stackexchange.com/questions/117093/find-where-inodes-are-being-used

How to check inode information of UFS/VxFS.

1. UFS
# df -n /
/                  : ufs
NOTE1: Type of File-Systems: UFS.
# df -t /
/                  (/dev/dsk/c1t0d0s0 ): 62683504 blocks  7241984 files
                                 total: 124632118 blocks  7501312 files
NOTE2:  Free files: 7241984 (Free inodes)
       Total files: 7501312 (Total inodes)
        Used files:  259328 (Used inodes / 7501312-7241984=259328)
# df -g /
/                  (/dev/dsk/c1t0d0s0 ):          8192 block size          1024 frag size
124632118 total blocks   62683504 free blocks 61437184 available        7501312 total files
  7241984 free files      8388608 filesys id
      ufs fstype       0x00000004 flag             255 filename length
NOTE3: Shows the same information with other information.

# df -o i /
Filesystem             iused   ifree  %iused  Mounted on
/dev/dsk/c1t0d0s0     259328 7241984     3%   /
#
NOTE4: 'i' option shows inode information briefly.

2. VxFS (SOLARIS)
# df -n /mnt
/mnt               : vxfs
NOTE5: Type of File-system is 'vxfs'.

# df -t /mnt
/mnt               (/dev/vx/dsk/tdg/testvol-01):  6254930 blocks   781864 files
                                          total:  6291456 blocks   781868 files
NOTE6:  Free files: 781864 (Free inodes)
       Total files: 781868 (Total inodes)
        Used files:      4 (Used inodes / 781868-781864=4)

# df -g /mnt
/mnt               (/dev/vx/dsk/tdg/testvol-01):     8192 block size          1024 frag size
     6291456 total blocks    6254930 free blocks  5864012 available         781868 total files
      781864 free files     77864769 filesys id
        vxfs fstype       0x00000004 flag             255 filename length

# df -e /mnt
Filesystem              ifree
/dev/vx/dsk/tdg/testvol-01   781864

# df -o s /mnt
Free Extents by Size
          1:          1            2:          0            4:          2
          8:          2           16:          1           32:          2
         64:          1          128:          2          256:          1
        512:          1         1024:          1         2048:          0
       4096:          1         8192:          1        16384:          0
      32768:          1        65536:          1       131072:          1
     262144:          1       524288:          1      1048576:          2
    2097152:          0      4194304:          0      8388608:          0
   16777216:          0     33554432:          0     67108864:          0
  134217728:          0    268435456:          0    536870912:          0
 1073741824:          0   2147483648:          0
#


http://www.symantec.com/business/support/index?page=content&id=TECH144018
 

No comments:

Post a Comment