Score:0

Find what is using disk space in CentOS 7 (du vs df vs lsof)

cn flag

I have a server, CentOS 7, that show disk usage on DF way higher than you can see on DU and I trying to understand why

DF shows 38GB used DU shows 14GB

There is no mount point on any folder

Checking LSOF for deleted files, there are couple, but nothing big, around 2GB files deleted, what leave us with around 20GB used by "only god knows what"

Any idea how to identify it?

DF

Filesystem           Size  Used Avail Use% Mounted on
/dev/mapper/ol-root   45G   38G  6.9G  85% /
devtmpfs              12G     0   12G   0% /dev
tmpfs                 12G  140K   12G   1% /dev/shm
tmpfs                 12G  265M   12G   3% /run
tmpfs                 12G     0   12G   0% /sys/fs/cgroup
/dev/sda1            497M  310M  188M  63% /boot
tmpfs                2.4G     0  2.4G   0% /run/user/0
tmpfs                2.4G     0  2.4G   0% /run/user/99200048
tmpfs                2.4G     0  2.4G   0% /run/user/99200006

DF

1:> du -sxh
13G     .
in flag
Does this answer your question? [Disk full, du tells different. How to further investigate?](https://serverfault.com/questions/275206/disk-full-du-tells-different-how-to-further-investigate)
Score:1
cn flag

Found out the problem,

XFS was defragmented, after run xfs_repair (log using a cd live then run it on your lvm/partition), it released the space, now total space is 14GB used.

Got it on that note: https://access.redhat.com/solutions/3634691

Thanks for the replies.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.