1

I have a Centos 7 VM and I want to know what consumes the 126G on the /dev/mapper/centos-root fs. I have 2 mount points and I unmounted them to make sure there's nothing reserving space under them and mounted them again .

enter image description here

I've also ran sudo lsof +aL1 but there was nothing reserving GBs

Is there more efficient way to know what consumes space ?

mrc02_kr
  • 2,003
Mawardy
  • 119
  • 3
  • For the future, please do not post screenshots but copy output from terminal to your question. If you want to know what consumes space you can use du command – mrc02_kr Oct 24 '18 at 09:25
  • Looking at the completely empty /home, probably it's in the /home of the / filesystem. umount /home or bind-mount / to find out... – frostschutz Oct 24 '18 at 09:29
  • see also https://unix.stackexchange.com/a/358331/30851 – frostschutz Oct 24 '18 at 09:34
  • I use this script to find the largest directories: find / -mount -print0|xargs -0 -P 4 --max-lines 1 du -sb|sort -n -r >sizes.txt. The result will be in sizes.txt of your current directory. – peterh Oct 24 '18 at 20:21
  • thanks all for your replies ,@peterh this command gives me xargs: 1: No such file or directory – Mawardy Oct 25 '18 at 10:47
  • @frostschutz /home is almost empty I believe the issue isn't there – Mawardy Oct 25 '18 at 10:58
  • @Mawardy if you can rule out hidden or deleted-but-still-open files, try forcing a filesystem check. – frostschutz Oct 25 '18 at 11:36
  • @frostschutz sorry for my late reply , i've used lsof for that and i've noticed there'r 2x "67108864 byte" deleted files related to pulseaudio , I've killed the two processes but they come again automatically , don't know if that's the reason – Mawardy Nov 10 '18 at 13:36

1 Answers1

1

Run this command (as root) to find the 10 largest directories:

du -a / | sort -n -r | head
dr_
  • 29,602
  • I've unmounted all mount points and ran this command as root it showed that /var was the biggest directory with about 41Gigs nothing else was showed up but the /var directory and it's sub directories , i've also ran ncdu and the same output was presented , df still shows 126G – Mawardy Oct 25 '18 at 10:46
  • Check /var/log, logfiles are the usual culprit. – dr_ Oct 25 '18 at 11:07
  • not too much there , only 82904 bytes – Mawardy Oct 25 '18 at 11:09