Why might `du` show much less than `df` even with no deleted open files?
AdvancedConceptStorage & Memory
Answer
Data can be hidden under a mount point: files written to /data before a disk was mounted on /data still occupy the root filesystem but are invisible. Check with a bind mount of root:
sudo mount --bind / /mnt/rootonly
sudo du -sh /mnt/rootonly/data
Other causes: ext4 reserved blocks (5% by default, see tune2fs -l), filesystem metadata/journal, and snapshots on btrfs/ZFS.
More on Storage & Memory
How do you list disks, partitions and filesystems?IntermediateMBR vs GPT partition tables?IntermediateWalk through adding a new disk and mounting it permanently.IntermediateExplain the six fields of an /etc/fstab line.IntermediateWhy use UUIDs and `nofail` in fstab?IntermediateWhat does a bad fstab entry do, and how do you recover?Advanced