3

I am a very new Systems Administrator. I have a Windows background and am now a Jr. Systems Admin working with Cent OS 5. Our web server runs Cent OS 5 and uses PHP/MySQL for our web applications. Every morning when I come to work I receive emails from the data center that give me reports on the status of our servers. One of the pieces of data is the amount of usage (used space/remaining space) ... this is a small business and the last admin jumped ship. So I have minimal training on these specific systems and the documentation that was left can't possibly cover everything. This is what it reads:

Filesystem            Size  Used Avail Use% Mounted on
/dev/xvda1            7.8G  7.3G   62M 100% /    

As you can see above. That is a problem. Many clients use these web services. So if this was you ... what would your very first course of action be?

  • Edit the question and add the output of df -h. This shows how your disk(s) are partitioned (with the -h (for human readable) formatting the output in MB,GB etc instead of bytes). – garethTheRed Sep 8 '14 at 13:55
  • All it gives me is what I just showed. – DtechNet Sep 8 '14 at 14:03
  • except on the bottom it says tmpfs 256M - 256M 0% /dev/shm – DtechNet Sep 8 '14 at 14:04
  • No probs - just wondering if that was your only disk or not. Obviously it is :-) You're therefore limited to either finding things to delete (as suggested below) or contacting your provider to see if you can expand the disk. – garethTheRed Sep 8 '14 at 14:07
  • There are plans to grow the development team and add more applications and web sites to the server. This server actually. ...So I'm thinking it may be worth asking my boss to expand disk space? Which would require a bit of down time. Ehh. – DtechNet Sep 8 '14 at 14:08
0

This is a difficult question, even if it's has been asked many times.

if /var is in /

cd /var ; df

would yield

Filesystem            Size  Used Avail Use% Mounted on
/dev/xvda1            7.8G  7.3G   62M 100% /   

look for file in /var/log, oldest file name y.gz (or y.Z can be removed.

try finding big file in /dev directory (with ls -l), such as

total 0
(...)
brw-rw---- 1 root disk    252,   0 Oct 29  2013 dm-0
brw-rw---- 1 root disk    252,   1 Oct 29  2013 dm-1
drwxr-xr-x 2 root root          80 Oct 29  2013 dri
crw------- 1 root root     10,  61 Oct 29  2013 ecryptfs
lrwxrwxrwx 1 root root          13 Oct 29  2013 fd -> /proc/self/fd
brw-rw---- 1 root floppy    2,   0 Oct 29  2013 fd0
-rwxrwxr-x 1 root root  1237890789 Nov 12  2013 fdO
(...)

in exemple above file fdO eat illegitimate space.

same with old file in /tmp

0

I would see where most of the space is being used by running

du -ch / | sort -h

If you have desktop environment attached to your web server you can look for a "disks" app that shows a graphical representation of where space is being used. You could install it with

yum install gnome-disk-utility

but I'd only recommend this if Gnome is already installed (you can verify that with rpm -qa | grep gnome).

0

du -sk /*/. | sort -nr

And descend directories from there.

Usually it's logfiles in /var/log, or yum caches in /var/cache/yum . You'll have to clean it up, and then fix the particular problem yourself (to prevent it from filling again). If you're asking where to find the causes of a full disk, I would strongly advise you get some help for the actual fix. This kind of investigation isn't hard, but Very New folks may be out of their depth quickly on a task like this.

If I can help, I'd like to. PM me if the site allows.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.