How to reduce inode size of /var?

Hi,

inode size reached its 100% in /var
Due to this i'am getting the error No space left on device
my crond process is stopped and when i want to restart it
it is showing the below error
Starting crond: crond: can't open or create /var/run/crond.pid: No space left on device

df -i o/p

/dev/mapper/vg00-var 131072 131072 0 100% /var

kindly help me in this...

Look for recently created files

find /var -xdev -mtime -7

Maybe an application created thousands of logfiles?
Delete the older ones, and add (or change) a rule in rotatelog.

128Mb for /var is asking for troubles as you are experiencing.
2Gb for /var if you want to test and toy with the OS.
8Gb or more if it is a production server.

Assuming /var is an ext3 or ext4 filesystem, the answer is no you cannot increase the number of inodes.

You have three options:

  • backup data, recreate file system with increased number of inodes, restore data
  • reduce the number of files under /var
  • increase the size of the logical volume and grow your filesystem