Need to clear space in / File system

What problem/issue/behavior are you having trouble with?
We could find / file system is 96% full , on check we identified 3.5 GB is used by /usr directories. We don’t find which files or directories uses rest of the space.

This server was reboot however it does not help. Still unable to find which files are consumes more space.

[root@testbox /]# df -h | grep -i rootvg
/dev/mapper/rootvg-root 20G 18G 830M 96% /
/dev/mapper/rootvg-usr_local 4.8G 21M 4.6G 1% /usr/local
/dev/mapper/rootvg-lv_usrhdp 50G 1.2G 46G 3% /usr/hdp
/dev/mapper/rootvg-opt 2.0G 594M 1.3G 33% /opt
/dev/mapper/rootvg-opt_IBM_ITM 4.8G 375M 4.2G 9% /opt/IBM/ITM
/dev/mapper/rootvg-home 4.8G 22M 4.6G 1% /home
/dev/mapper/rootvg-var 20G 1.9G 17G 10% /var
/dev/mapper/rootvg-lv_run 4.8G 21M 4.6G 1% /var/run
/dev/mapper/rootvg-lv_www 99G 61M 94G 1% /var/www
/dev/mapper/rootvg-tmp 45G 59M 42G 1% /tmp
/dev/mapper/rootvg-lv_log 197G 25G 162G 14% /var/log
[root@testbox /]#

Red Hat Solution (It’s an example)

The “df” command shows you how much space is being taken up in a particular file system; it does not show you what is taking up that space.
For that, I’d suggest using the “du” command.

Basically, the scenario is that data has been written to place on
the file system, but then hidden when another file system is
mounted on top of it. In this example, let’s say my “/” file
system is 82% full; it shows I’m using 8 GB:

# df –si /
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rhel_rhel83-root 9.7G 8.0G 1.8G 82% /

Yet, summing up the file usage shows I’m really only using 1.3 GB:

# du –si –sum –one-file-system –total /
1.3G /
1.3G total

To find the missing 6.7 GB, I make a temporary directory, remount
the “/” file system to it, and sum up its files:

# mkdir /root_bind

# mount –bind / /root_bind

# du –si –sum –one-file-system –total /root_bind
7.8G /root_bind
7.8G total

Aha! There must be files on “/” that cannot be seen when other
files systems are mounted on top of it. So I search:

# du –si –sum –one-file-system –total /root_bind/*
0 /root_bind/bin
0 /root_bind/boot
0 /root_bind/dev
24M /root_bind/etc
0 /root_bind/home
0 /root_bind/lib
0 /root_bind/lib64
0 /root_bind/media
0 /root_bind/mnt
0 /root_bind/opt
0 /root_bind/proc
41k /root_bind/root
0 /root_bind/root_bind
0 /root_bind/run
0 /root_bind/sbin
0 /root_bind/srv
0 /root_bind/sys
0 /root_bind/tmp
1.3G /root_bind/usr
6.6G /root_bind/var
7.8G total

I note that the var subdirectory uses a lot of storage. My example
machine has another file system that gets mounted on /var under
normal operations. I continue my investigation:

# ll –si /root_bind/var
total 6.3G
-rw-r–r–. 1 root root 2.1G Dec 29 10:39 large_file2.bin
-rw-r–r–. 1 root root 3.2G Dec 29 10:40 large_file3.bin
-rw-r–r–. 1 root root 1.1G Dec 29 10:38 large_file.bin

I found them!