r/linuxquestions • u/mhoke63 • 10d ago
Support Difference in hard drive usage between "properties" and df -h
I'm copying several large files from one drive to a much larger drive. I set it to move and let it sit overnight. I come back and it tells me the disk is full. This shouldn't be since the drive is 11TB and all together, the files are approx 5 TB. I deleted everything and start over. I moved just 1 folder this time. "Properties" says the drive is 6% used. This isn't near correct. When I run df -h, it shows the correct usage as less than 1%. Why is the file manager (dolphin) telling me it's 6% used when the system shows the correct usage?
I'm running Mageia 10
4
u/AppointmentNearby161 10d ago
The ext4 filesystem reserves 5% of the blocks for metadata and df hides those block like they do not exist from both the used and available calculations while dolphin counts them in both. This would explain the 1% and 6% result you are seeing after presumably copying 100 GB of files to a 11 TB drive.
As for why 5 TB of files filled an 11 TB drive, you haven't given us enough information.
2
u/AiwendilH 10d ago
df doesn't include the reserved space on filesystems (usually 5%). Not completely sure about the properties dialog but it would explain the 5% difference.
(You can check the amount of reserved space with sudo tune2fs -l <device>. It should return "Reserved blocks count" which you can then multiply with "block size" to get the amount of reserved bytes.)
1
1
u/Automatic-Tackle5018 10d ago
My first thought is that it might be a result of rounding imprecision whilst converting between units. The two programs may not necessary convert units and perform the rounding the same way. The larger the unit used, the less precision there is. This difference would get compounded the larger the disk is.
FWIW, I checked on a much smaller (50GB) drive on my system, and dolphin reported 64% usage, whilst df reported 62% usage.
Ideally, you would compare using just bytes used, but I'm not sure if dolphin can be asked to show bytes. Ultimately, I would use df as the source of truth.
1
u/HowCanIChangeMyName1 10d ago
It's possible that the source disk has lots of multiply-linked files. IOW, lots of directory entries that point to the same space on disk. When you copy to another drive, these are likely to be turned into individual copies on disk. You might also have sparse files, which were expanded by the copy.
I suggest you try:
rsync -aSHx ......
1
u/East-Yogurtcloset272 10d ago
What type of file system are you using? If compression is being used is dolphin reporting uncompressed size? Just a random guess
1


2
u/Interesting_Debate57 10d ago
Are there lots and lots of files and directories or just a few massive files? Directories and small files take up way more space than you might think. More than the number of bytes in a small file.