Category: Linux

If this issue appears even though you have available disk space on the system:

* #df -h

|Filesystem|Size|Used|Avail|Use%|Mounted on|

We need to check available inodes on the server to see how many are available:

* #df -i

|Filesystem|Inodes|IUsed|IFree|IUse%|Mounted on|

If we see inodes are 100%, or nearly 100% used on the filesystem then this indicates there must be a large number of files on the server and we need to find them using the below command. If the below commands stuck at a folder then it will be better to run it using that absolute path.

for i in /*; do echo $i; find $i |wc -l; done

After finding the folder with large number of files delete them and this will make inodes available to the file system.

This could be php session files located in ‘/var/lib/php/session’ folder containing millions of files. To get rid of them use the following:

# Shutdown apache
service httpd stop

# Rename php session directory
mv /var/lib/php/session /var/lib/php/session.old

# Recreate php session directory and set permissions
mkdir /var/lib/php/session
chmod 1777 /var/lib/php/session

# Start Apache
service httpd start

# Delete session files
cd /var/lib/php/session.old
find |xargs rm

The above command might take a day to delete the files depending upon the number of files in that folder.




How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.