• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Solaris : How to determine number of free/used inodes in a file system

by admin

Here is how you find out how many inodes are in the filesystem:

1. Add the numbers of used and free inodes. The df -i option is a ufs-specific option.

# df -oi
Filesystem             iused   ifree  %iused  Mounted on
/dev/dsk/c0t0d0s5       2506  145590     2%   /opt
2506 + 145590 = 148096

2. This closely corresponds to information found by other system commands. Find the number of kbytes in the filesystem:

# df -k
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c0t0d0s5     288855   73739  186231    29%    /opt

Find the number of bytes per inode (nbpi):

# mkfs -m /dev/rdsk/c0t0d0s5
mkfs -F ufs -o
nsect=80,ntrack=19,bsize=8192,fragsize=1024,cgsize=16,free=10,rps=90,
nbpi=2066,opt=t,apc=0,gap=0,nrpos=8,maxcontig=16 /dev/rdsk/c0t0d0s5 615600

3. To find the number of inodes in the filesystem, divide the kbytes by nbpi:

288855 * 1024 / 2066 = 143169

Filed Under: Solaris

Some more articles you might also be interested in …

  1. How to dynamically replace CPU/memory board (dynamic reconfiguration) on SunFire s6800/e12K/e15K/e25K
  2. Solaris ZFS : How to replace a failed disk in rpool (x86)
  3. GUDS – A Script for Gathering Solaris Performance Data
  4. How to Configure TCP Keepalive option in Solaris
  5. How to Configure iSCSI targets on Solaris 10
  6. Solaris Interview Questions and Answers
  7. How to Check Solaris Release and Default Kernel Version
  8. Solaris 10 boot process : SPARC
  9. Beginners Guide to Configuring network virtualization features in Solaris 11
  10. “Warning: Missing charsets in String to FontSet conversion” – how to resolve the xclock warning message

You May Also Like

Primary Sidebar

Recent Posts

  • vgextend Command Examples in Linux
  • setpci command – configure PCI device
  • db_load command – generate db database
  • bsdtar command – Read and write tape archive files

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright