LinHES Forums
http://forums.linhes.org/

[Tip] No disk space, but plenty of space
http://forums.linhes.org/viewtopic.php?f=5&t=23781
Page 1 of 1

Author:  Girkers [ Mon Jun 24, 2013 5:52 am ]
Post subject:  [Tip] No disk space, but plenty of space

I appreciate that quite a few people would already know this, but I came across this issue where my frontend was running really slow. I checked the disk space and there was plenty of space available so I thought I would force a disk check on next reboot, however when I tried to create the file required to force the check I was told that I didn't have any space left. Checking the drives with the command df -h showed I had plenty of space, thus a googling I went.

What I found was that I had run out of inodes http://en.wikipedia.org/wiki/Inode and to check this your run df -i and this will show you how many inodes you have free in a simlar vain as disk usage. I found I was all out.

So I found some temp files and deleted them and that freed up a few hundred inodes but I was still well short. So how did I find what was taking all my inodes I hear you ask, well I found this script that will show you:
Code:
#!/bin/bash
# count_em - count files in all subdirectories under current directory.
echo 'echo $(ls -a "$1" | wc -l) $1' >/tmp/count_em_$$
chmod 700 /tmp/count_em_$$
find . -mount -type d -print0 | xargs -0 -n1 /tmp/count_em_$$ | sort -n
rm -f /tmp/count_em_$$


Create this script in your /tmp directory (it was my root directory that was out of inodes) and then run it. Whatever you do, don't be in a hurry it will take sometime for the script to run and I don't mean like five or ten minutes, when I first tried to run it, it was running for over thirty minutes before I closed my session getting bored of waiting. The script is a little disk intensive as well.

In the end I found that a directory /var/log/hobbit was taking over 1.5M inodes, you try and do a directory listing and it would just sit there. I found the hobbit directly only had log files in it so I cleaned it out, but you cannot simply do a rm -f * as there were too many files. I ended up having to run the following command when I was in the /var/log/hobbit directory:
Code:
find . -type f -delete


Again this took a few minutes but once it was compeleted I have my inodes back again.

I hope this helps someone out of a bind.

Author:  brfransen [ Mon Jun 24, 2013 8:50 am ]
Post subject:  Re: [Tip] No disk space, but plenty of space

This was reported http://linhes.org/issues/913 and fixed http://linhes.org/projects/linhes/repos ... 62cad0ad82 Check for update to make sure you have the latest.

Author:  Girkers [ Tue Jun 25, 2013 6:12 am ]
Post subject:  Re: [Tip] No disk space, but plenty of space

Thanks for pointing this out, I had tried to do an update the other week, however with the LinHES server being up and down it hadn't worked. After I had fixed the issue I had run an update and am now running the latest version.

Cheers

Author:  tama103 [ Wed Jun 26, 2013 10:56 am ]
Post subject:  Re: [Tip] No disk space, but plenty of space

So did it fix your sluggish performance? My frontends get really slow and unresponsive after being active for a few days. The only way to make the system snappy again that I have found was to restart X.

Author:  Girkers [ Wed Jun 26, 2013 3:25 pm ]
Post subject:  Re: [Tip] No disk space, but plenty of space

Yes it did make them a bit better, but obviously this is my observation. The theme I am using made it really obvious that it was slow and once I did this fix it was running much better. YMMV

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/