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.
diskutilreports identical values for both volumes --Device Block Size: 512 BytesandAllocation Block Size: 4096 Bytes-- from my understanding, Allocation Block Size is cluster size. And indeed, creating a single-byte file on both volumes results in usage of 8 (512 B-sized) blocks according todu, which is 4K. So definitely matching 4K cluster sizes on both disks. (And 4K is the MSFS default anyways it seems.) – crazygringo Jan 19 '22 at 20:15.Spotlight-V100directory either. Nor is there any Time Machine data except a 0-size root file that disables Time Machine. – crazygringo Jan 19 '22 at 20:25$Recycle.Bin,System Volume Information, andthumbs.dbfor differences? – doneal24 Jan 19 '22 at 17:35.Trashes,.ReadyDLNA, etc. are essentially empty and are counted byduanyways. – crazygringo Jan 19 '22 at 18:09FolloworDirect? – Gerald Schneider Jan 20 '22 at 06:07Mirror, or maybeUpdateinstead? What is theDelete filesoption set to? – Gerald Schneider Jan 20 '22 at 06:12dureturns virtually identical block counts and includes hidden files. – crazygringo Jan 20 '22 at 14:42