1847829 Members
5377 Online
104021 Solutions
New Discussion

Re: inodes

 
CA788655
Occasional Contributor

inodes

how add inodes to root filesystem ?
79872 total i-nodes
8 free i-nodes
79864 used i-nodes
5 REPLIES 5
S.K. Chan
Honored Contributor

Re: inodes

I suppose you root FS is not on JFS FS then because if it's JFS, the allocation of inodes are dynamic with the only restriction being the disk space.
If it's HFS FS the only way is to newfs the FS and recreate it with a "-i" option which defined the nbpi (number of bytes per inode). By default (without specifying -i in newfs), your FS will be created with one inode for every 6144 bytes of space in the FS. So if you want to have more inodes, you can set it to 3072 (double the inode count) with the -i option in newfs. Check man pages for newfs.
S.K. Chan
Honored Contributor

Re: inodes

Also do
# man mkfs_hfs
which will show you about the inode setting.
Magdi KAMAL
Respected Contributor

Re: inodes

Hi Robert,

You are really short for this kernel parameter value and you need to increase it.

The kernel parameter name is : "ninode"

Magdi
Bill Hassell
Honored Contributor

Re: inodes

To clarify: ninode is a kernel parameter that controls the size of an in-core cache of recently opened and currently opened HFS files. It has no relationship to the number of inodes on a particular filesystem.

bdf -i will show the available inodes on all filesystems but only has meaning for HFS (vxfs is dynamic, cdfs is meaningless as it can't be changed). You will run out of inodes on an HFS filesystem (but have plenty of space for new files) if you have thousands, perhaps millions of small files.

As mentioned, the fix is to backup the data, and run newfs with the -o nbpi option (see man mkfs_hfs).


Bill Hassell, sysadmin
Trond Haugen
Honored Contributor

Re: inodes

To add to Bills answer as recreating / can be hard. Is your / HFS or JFS and if the latter how is the free diskspace on the filesystem.
Maybe what you should do (annyway) is looking for files in / that shouldn't be there. I know that isn't nessesearly easy but you could start with odd files and dirs in /, non-dev or larger files in /dev. Also find might help you: 'find / -xdev -newer /etc/TIMEZONE'.

Regards,
Trond
Regards,
Trond Haugen
LinkedIn