0

I've used df -h to show me my disk usage:

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2       558G  249G  308G  45% /
udev             10M     0   10M   0% /dev
tmpfs           6.3G  8.8M  6.3G   1% /run
tmpfs            16G     0   16G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs            16G     0   16G   0% /sys/fs/cgroup
tmpfs            16G   20K   16G   1% /tmp
/dev/sda1       511M  180K  511M   1% /boot/efi
tmpfs           3.2G     0  3.2G   0% /run/user/0

I've then used ncduand found some large files in root's home directory, /root/. I've deleted the files and rebooted the machine to remove any open file handles, but the disk space did not clear up.

Why is df not updating/why is the root home directory not considered here? Are there any other directories that are not considered?

Thank you for your help.

Edit: The machine is using btrfs and I unfortunately don't know the setup details, maybe that's important as well.

I've tried the following to reproduce the issue: 1. df -h to check the usage on / 2. du -sh /root to see the folder size 3. create big file in /root 4. du -sh /root shows a bigger folder size 5. df -h does not

I don't understand what's going on :(

Kind regards

Maxbit
  • 111
  • 4

1 Answers1

-1

A possibility is that the files under /root that you deleted where actually hard links to files somewhere else on the filesystem. Thus you deleted the inode, but maybe the files still have active inodes somewhere else on the filesystem.

  • Thanks for the suggestion, but I checked using `ls -l` before deleting and there was just one link. So that cannot be the case :/ (and also ncdu doesn't show the large file anymore) – Maxbit Oct 30 '19 at 12:58
  • A hard link just looks like a file. It is not shown like a symlink. – Gerald Schneider Oct 30 '19 at 13:37
  • From what I know, `ls -l`shows the number of inode references, which was 1. – Maxbit Oct 30 '19 at 14:30