Disk Usage Analyzer (baobab
) reports a size of 29.3 GB for the root partition, out of which 2.5 GB are available:
However, when selecting that device for closer inspection, I am presented with only 7.9 GB of stored data:
There are further inconsistencies between different disk usage tools:
-
> df -h Filesystem Size Used Avail Use% Mounted on udev 7.7G 0 7.7G 0% /dev tmpfs 1.6G 2.2M 1.6G 1% /run /dev/nvme0n1p2 28G 26G 940M 97% / # <- ~30GB root partition tmpfs 7.7G 0 7.7G 0% /dev/shm tmpfs 5.0M 8.0K 5.0M 1% /run/lock /dev/nvme0n1p4 440G 171G 248G 41% /home /dev/nvme0n1p1 96M 50M 47M 52% /boot/efi tmpfs 1.6G 2.5M 1.6G 1% /run/user/1000
-
> lsblk -f NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS nvme0n1 ├─nvme0n1p1 vfat FAT32 14EC-1EA1 46.1M 52% /boot/efi ├─nvme0n1p2 ext4 1.0 6b28d7fa-8554-48df-a1f0-a4a8e7ccfc6e 939.7M 91% / # <- ~10 GB root partition ├─nvme0n1p3 swap 1 e3b8188b-ab13-4d5c-b5fd-e23440f816f1 [SWAP] └─nvme0n1p4 ext4 1.0 a8fbcfb2-70ff-4474-8475-70b948bbc557 247.1G 39% /home
> lsblk -o NAME,FSAVAIL,FSUSE%,SIZE,MOUNTPOINTS NAME FSTYPE FSAVAIL FSUSE% SIZE MOUNTPOINTS nvme0n1 476.9G ├─nvme0n1p1 vfat 46.1M 52% 100M /boot/efi ├─nvme0n1p2 ext4 939.7M 91% 27.9G / # ~10 GB or ~ 30 GB root partition? ├─nvme0n1p3 swap 977M [SWAP] └─nvme0n1p4 ext4 247.1G 39% 447.9G /home
-
> sudo dumpe2fs -h /dev/nvme0n1p2 | grep Block dumpe2fs 1.47.0 (5-Feb-2023) Block count: 7324160 Block size: 4096 Blocks per group: 32768
Multiplying block count by block size gives ~29GB for the filesystem size.
In summary:
baobab
reports roughly 27GB out of 29 GB space used, while simultaneously showing only 7.9 GB being used.df
reports 26 out of 28GB being used (1).lsblk
reports a SIZE of 27.9G but at the same time claims that the 939.7M available space (FSAVAIL) corresponds to 9% (100% minus FSUSE%) of the device, which would give a size of roughly 10 GB (2).dumpe2fs
reports a filesystem size of almost 30GB (3).
Overall there seem to be two conflicting pictures, represented by different tools:
- The partition and filesystem have a size of roughly 30GB and are nearly full.
- The partition and filesystem have a size of roughly 10GB and are nearly full.
What could be the source for this discrepancy?
tune2fs -l
to check). if your program runs as regular user it can't analyze directories only accessible to root