To preface: there are lots of other useful questions (e.g. this and this) on possible causes for different sizes reported by df
and du
. None of the explanations apply to my exceedingly simple case, however, hence this new question.
I have a very simple scenario: I have two identical 5 TB Seagate hard drives purchased at the same time (a few months ago), with their original NTFS formatting. Hard drive A is full of a few thousand mostly large files (gigabyte-sized), and FreeFileSync is used to mirror drive A to drive B on a nightly basis.
Already from the first time it was mirrored, I discovered the files on drive B took up nearly 3% more space than on drive A, and this has continued through now (a few months later). With identical files on both, df
reports (in 512 B blocks):
Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
/dev/disk4s2 9767276536 8946736496 820540040 92% 6149 4294961146 0% /Volumes/A
/dev/disk5s2 9767276536 9199664896 567611640 95% 5719 4294961576 0% /Volumes/B
While du -d 0
in the root of each drive reports (again in 512 B blocks) only a 0.002% difference:
A: 8939999664
B: 8940229723
So I'm trying to figure out what could possibly be possibly be resulting in 3% less available space on drive B -- a difference of 121 GB across these two 5 TB drives.
I've ruled out every suggestion I've found elsewhere -- it's not an issue of file fragmentation since du
shows similar block usage, there are no symlinks or hard links of any kind, no volumes mounted on either, no hidden logs, I'm not running out of inodes, I've run du
as root, no files marked for deletion still with open handles, the root .Trash
folder is empty on both. I've read du
doesn't count blocks used by directories themselves and other filesystem data, but I can't see how that would add up to 121 GB of missing space -- plus the directories are obviously identical between drives, and it's only around a thousand directories total. When I verify the filesystems, both disks show no errors. I wonder if the issue could be bad blocks, but I can't seem to find any references on how to detect if a filesystem is already compensating for that. These disks are fairly new, also, and the discrepancy has existed from day 1.
The issue is of immediate importance because when disk A gets nearly full as files are added, mirroring fails because disk B runs out of space first. I've "solved" it for the time being by using disk B for writing and disk A for mirroring to avoid that problem, but I'd still like to understand what could possibly be using the mystery 121 GB of space.