wiki:sysadminDiskSpace

If disk space problems start occurring, the first step is to narrow down where the problem is with df -h:

uowadmin@carbon:~$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/LogVol00-VolGroup01
                      1.9G  250M  1.6G  14% /
tmpfs                 9.9G     0  9.9G   0% /lib/init/rw
udev                   10M  868K  9.2M   9% /dev
tmpfs                 9.9G     0  9.9G   0% /dev/shm
/dev/cciss/c0d0p1     471M   39M  409M   9% /boot
/dev/mapper/LogVol00-VolGroup04
                      961M  328M  585M  36% /home
/dev/mapper/LogVol00-VolGroup05
                      961M  118M  795M  13% /opt
/dev/mapper/LogVol00-VolGroup06
                      961M   27M  886M   3% /tmp
/dev/mapper/LogVol00-VolGroup02
                      9.4G  1.2G  7.8G  13% /usr
/dev/mapper/LogVol00-VolGroup03
                      4.7G  195M  4.3G   5% /usr/local
/dev/mapper/LogVol00-VolGroup07
                      6.0G  3.2G  2.5G  57% /var
/dev/mapper/LogVol00-VolGroup08
                      1.9G   47M  1.8G   3% /var/log
/dev/mapper/LogVol00-VolGroup09
                       30G  3.3G   25G  12% /data
131.104.100.167:/nfs-cluster
                      2.0G   38M  1.8G   3% /nfs-cluster
131.104.100.167:/openils
                       20G  8.3G   11G  45% /openils

The culprit should be revealed by the percentages. You can navigate to a directory and use du -hs to get a summary of its usage and ls -lh to zero in on particular file(s):

uowadmin@carbon:/tmp$ du -hs
9.4M	.
uowadmin@carbon:/tmp$ ls -lh
total 9.4M
-rw-r--r-- 1 conifer conifer 9.2M 2011-07-25 17:47 boreal_prod.tar.gz
-rw-r--r-- 1 opensrf opensrf    0 2011-09-12 17:47 fileQrk4l1
-rw-r--r-- 1 root    root      34 2011-02-18 06:12 files.tmp
-rw-r--r-- 1 opensrf opensrf    8 2011-06-15 16:16 foo
-rw-r--r-- 1 opensrf opensrf 1.2K 2011-06-15 16:17 foot.pl
-rw-r--r-- 1 opensrf opensrf  440 2011-03-08 16:55 issns
drwx------ 2 root    root     16K 2009-03-09 15:40 lost+found
-rwxr-xr-x 1 conifer conifer  12K 2011-07-25 18:09 marc2bre.pl
-rw-r--r-- 1 root    root     25K 2011-05-22 07:59 offline.pl
-rw-r--r-- 1 opensrf opensrf    6 2011-06-15 16:46 oils_sip.pid
-rwxr-xr-x 1 conifer conifer 3.3K 2011-07-25 18:09 parallel_pg_loader.pl
-rw-r--r-- 1 opensrf opensrf  70K 2011-09-15 23:53 sip.log

For a log file, examining recent content might give some clues to a process or error that is generating too many messages. After doing this homework, a quick way to zero out a log file is to use the syntax:

echo "" > log_file
Last modified 11 years ago Last modified on Oct 20, 2011, 10:18:50 AM