Reduce inode usage?



For examble /opt filesystem's inode usage is high means we have to do below steps

# bdf -i /opt : check the FS usage

Create a test directory on your filesystem;

# mkdir /opt/test

Create a script that will create 10000 null files.

# cd /opt/test
# i=1
# while [ $i -lt 10000 ]
> do
> touch $i
> i=`expr $i + 1`
> done

Else you will be watching the terminal for years to get you the prompt or else CTRL + C will do :-D

once files are created do

#bdf -i /opt

Now comes the step to increase inode count.

# pwd
/opt/test

# rm *
# cd ..
# rmdir test

Now check the inode usage again.

# bdf -i /opt

Post a Comment

0 Comments