LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   How do I free up space on / directory as it is 100% full (https://www.linuxquestions.org/questions/linux-server-73/how-do-i-free-up-space-on-directory-as-it-is-100-full-806053/)

farnaw4u 05-05-2010 04:54 AM

How do I free up space on / directory as it is 100% full
 
Hi,

i am using Redhat Linux 4 AS ,

i checked space and foud that / is 100% full . like below

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda3 2316536 2179008 19852 100% /
/dev/hda2 101107 9324 86562 10% /boot
/dev/hda6 1683960 70256 1528160 5% /home
none 192012 0 192012 0% /dev/shm

Can anyone advise me as to how to create more space on / directory?
or decrease size in / directory.

Thank you,

unSpawn 05-05-2010 05:16 AM

Since / has no /tmp, /var/tmp and /var split out, and depending on how long the server was not properly managed and what services it runs, those are the "usual suspects", I'd look there first. For example to find files in /var in top-10 order of size try 'du -xmS /var/* /tmp/*|sort -nrk1|head -10' or to find all files in / greater than 100 megs try 'find / -type f -a -size +100M -ls'. Might have to adjust switches on RHEL4. If the results indicate log files then they probably should be compressed and backed up to another system for parsing (Logwatch?) before deletion. If you want to delete logs immediately then make certain the file is not in use with 'fuser -v /path/filename' (else shut down service or application first) then try '$>/path/filename'.

zijuan 05-05-2010 05:33 AM

Quote:

Originally Posted by unSpawn (Post 3957879)
Since / has no /tmp, /var/tmp and /var split out, and depending on how long the server was not properly managed and what services it runs, those are the "usual suspects", I'd look there first. For example to find files in /var in top-10 order of size try 'du -xmS /var/* /tmp/*|sort -nrk1|head -10' or to find all files in / greater than 100 megs try 'find / -type f -a -size +100M -ls'. Might have to adjust switches on RHEL4. If the results indicate log files then they probably should be compressed and backed up to another system for parsing (Logwatch?) before deletion. If you want to delete logs immediately then make certain the file is not in use with 'fuser -v /path/filename' (else shut down service or application first) then try '$>/path/filename'.

Good job!


All times are GMT -5. The time now is 08:55 AM.