0

When I run df -h, I have the following output, indicate that /dev/sda6 which mounted on / is using 100% disk space.

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda6              29G   29G   34M 100% /

I navigate to /, I run

du -h -a --max-depth=1 | sort -h

to see which folder use the most spaces. I got only a result of 2.6 GB diskusage.

2,6G    .
1,2G    ./usr
573M    ./opt
448M    ./var
114M    ./lib
93M     ./root
87M     ./home
7,5M    ./etc
5,8M    ./sbin
5,7M    ./bin
4,3M    ./lost+found
3,6M    ./lib32
8,0K    ./dev
0       ./vmlinuz
0       ./tmp
0       ./sys
0       ./srv
0       ./selinux
0       ./proc
0       ./mnt
0       ./media
0       ./lib64
0       ./initrd.img
0       ./forcefsck
0       ./ext
0       ./dead.letter
0       ./boot
0       ./000-default-ssl

Running du -h -s -x / as suggested in the comments also shows only 2.6 GB used, where df -h says I have 29GB used for /dev/sda6 which is mounted at /.

Where are the rest of the files?

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
Zhenyu
  • 133
  • 2
    Why did you run with --max-depth=1. Are you not interested in the whole file tree? Do du -h -s -x / instead. – Kusalananda May 13 '18 at 14:51
  • du -h -s -x / also show 2.6 GB used, where df -h says I have 29GB used for /dev/sda6 which is mounted at / – Zhenyu May 13 '18 at 15:57
  • 1
    A log file that was deleted but still being filled in? try lsof -n |egrep -w 'DEL|deleted'. See if there's a deleted file still in use that rings a bell. Also what is the filesystem type? – A.B May 13 '18 at 16:15
  • @A.B I ran df -T, and it shows xfs under type. I updated my question, i posted the output of lsof -n |egrep -w 'DEL|deleted' – Zhenyu May 13 '18 at 16:30
  • well I hoped you'd look at lsof and its meaning. anyway nothing useful in this lsof. (no more idea here) – A.B May 13 '18 at 16:35
  • 1
    bind mount the fs to another location and then du that. mount --bind / /mnt; du -sh /mnt – jordanm May 13 '18 at 16:48
  • What filesystem is it? I can mount a certain Btrfs subvolume as / while leaving other subvolumes completely inaccessible in the current directory tree. Still df reports the usage of the whole filesystem. – Kamil Maciorowski May 13 '18 at 17:04

0 Answers0