Home » , » If root file system is 100%

If root file system is 100%

Written By mediana saputra on Monday, 18 February 2013 | 01:54


If root file system is 100%

1.First thing to do is look for core files:

find / -name core

2.Then check for mistakes in the /dev directory (usually caused by someone mistyping a device name:
 /dev/rmt/Omn instead of /dev/rmt/0mn, for example)

find /dev -type f

3.1# find / -xdev -size +10000 -exec ll {} \; > /tmp/bigfiles 

will give you a list of all big files ( >10000) under root. 

3.2 10 largest directories in the root filesystem:
$ du -kx / | sort -rn -k1 | head -n 10

3.3 10 largest files in the root filesystem:
$ find / -type f -xdev -print | xargs -e ll | sort -rn -k5 | head -n 10

3.4 Recently modified files in the root filesystem:
$ find / -type f -xdev -mtime -1 -print | xargs ll | sort -rn -k5

4.LVM commands may generate configuration backups automatically, so make a habit of checking the free space on the root 
 filesystem before and after making configuration changes to large VGs.
 You might also consider using the "-A n" option in the LVM commands to disable backup creation, then using "vgcfgbackup" 

5.I've thought of one other place your space may be hiding - beneath a mountpoint.
 You may need to unmount a filesystem (e.g. /home) and then do an ls /home to see if files and directories appear.

6.check your crontab as well,make sure you are not running any scripts that my be looping while tring to write 
to your somewhere under /

7.run cleanup -F 

8.If its critical and we have to immediately free up space as its 100% full then we can use:
#tune2fs -m 0 /dev/sda1 {root partition).  ...........................in this way we can release 5% reserved space.
i.e. for example if your root partition is of 100GB then you will get 5GB space instantly be executing above command.

9.After this we can housekeeping root partition by moving , compressing , deleting etc. and again we can revert 
above using "#tune2fs -m 5 /dev/sda1"

10.Secondly sometimes space gets blocked by deleted open files.we can check it by executing below command.
#lsof /dev/sda1 |grep deleted

11.and if you found any output by executing above command then either we can restart the application or we can kill that pid.
And we will get back that blocked space.

Sadhiq Linux Group

Share this article :

Post a Comment

Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. Turorial Grapich Design and Blog Design - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger