mojtaba zangeneh mojtaba zangeneh - 3 years ago 145
Linux Question

my root partition is growing fast and no file seems to be increasing in size

In my centos 6 server, it's been a while that I am deleting logs and not required files to avoid my root partition become full,

nothing seems to be that large to fill it,

this is my df output:

[root@server002 lib]# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/vg_server-lv_root
ext4 115G 105G 4.6G 96% /
tmpfs tmpfs 7.8G 0 7.8G 0% /dev/shm
/dev/sda1 ext4 485M 74M 386M 17% /boot
/dev/mapper/vg_server-lv_home
ext4 145G 77G 61G 56% /home


and this is another command:

[root@server002 /]# ls | xargs du -sh
7.1M bin
64M boot
180K dev
27M etc
77G home
331M lib
22M lib64
16K lost+found
4.0K media
4.0K mnt
32M opt
du: cannot access `proc/34422/task/34422/fd/4': No such file or directory
du: cannot access `proc/34422/task/34422/fdinfo/4': No such file or directory
du: cannot access `proc/34422/fd/4': No such file or directory
du: cannot access `proc/34422/fdinfo/4': No such file or directory
du: cannot access `proc/47236/task/47368/fd/426': No such file or directory
du: cannot access `proc/47236/task/47368/fd/430': No such file or directory
du: cannot access `proc/47236/task/47368/fd/505': No such file or directory
du: cannot access `proc/47236/task/34457': No such file or directory
0 proc
407M root
14M sbin
4.0K selinux
4.0K srv
0 sys
1.2M tmp
1.3G usr
15G var


as you can see df shows my root has 105G used spase but nothing in du output is using that amount of space.

can someone tell me what i am missing to check?

tnx

Edited:

I also added -A to ls command to show hidden files and this is the output:

[root@server002 temp]# cd /
[root@server002 /]# ls -A | xargs du -sh
0 .autofsck
0 .autorelabel
7.1M bin
64M boot
180K dev
27M etc
77G home
331M lib
22M lib64
16K lost+found
4.0K media
4.0K mnt
32M opt
du: cannot access `proc/42393/task/42393/fd/4': No such file or directory
du: cannot access `proc/42393/task/42393/fdinfo/4': No such file or directory
du: cannot access `proc/42393/fd/4': No such file or directory
du: cannot access `proc/42393/fdinfo/4': No such file or directory
0 proc
407M root
14M sbin
4.0K selinux
4.0K srv
0 sys
1.2M tmp
1.3G usr
15G var

Answer Source

I restarted my server and everything seem normal now.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download