macOS 14.5 (23F79) on 2024 MacBook Air; Dropbox v200.4.7134
Dropbox has paused syncing, with the little "x" on the menubar icon. On clicking the icon, it says "not enough disk space".
However, this is not correct. In macOS Settings -> General -> Storage, it (correctly) states 1.1TB of 2TB used, and shows 0.9TB available. Once Dropbox is fully synced, at most 1.2TB will be used. I.e. there is plenty of space.
Interestingly, the terminal utility "du" also gets the wrong answer - du thinks 1.9TB of space is in use. Likewise "df" thinks there is less than 100GB free.
Examining the output of du, the problem appears to be double counting. Specifically, the directories in "/System/Volumes/Data/" and "/" contain exactly the same things, and are counted both times to reach the "du" total for disk usage of the drive. Indeed, if we examine the inodes in each place we see they are identical (inode number is the lefthand most number for each entry).
First for "/":
$ ls -i -lh /
total 17
11610314 drwxrwxr-x 91 root admin 2.8K Jun 1 21:16 Applications
11593762 drwxr-xr-x 75 root wheel 2.3K May 15 07:15 Library
1152921500311879701 drwxr-xr-x@ 10 root wheel 320B May 7 00:01 System
16815 drwxr-xr-x 6 root admin 192B May 15 07:15 Users
16825 drwxr-xr-x 4 root wheel 128B May 30 11:57 Volumes
1152921500312524757 drwxr-xr-x@ 39 root wheel 1.2K May 7 00:01 bin
16827 drwxr-xr-x 2 root wheel 64B Jan 12 19:18 cores
330 dr-xr-xr-x 4 root wheel 8.2K May 16 11:51 dev
1152921500312524834 lrwxr-xr-x@ 1 root wheel 11B May 7 00:01 etc -> private/etc
1152921504606781440 lrwxr-xr-x 1 root wheel 25B May 16 11:51 home -> /System/Volumes/Data/home
16824 drwxr-xr-x 4 root wheel 128B Mar 12 22:21 opt
11609361 drwxr-xr-x 6 root wheel 192B May 16 11:51 private
1152921500312524837 drwxr-xr-x@ 64 root wheel 2.0K May 7 00:01 sbin
1152921500312524940 lrwxr-xr-x@ 1 root wheel 11B May 7 00:01 tmp -> private/tmp
1152921500312524941 drwxr-xr-x@ 11 root wheel 352B May 7 00:01 usr
1152921500312558107 lrwxr-xr-x@ 1 root wheel 11B May 7 00:01 var -> private/var
while for /System/Volumes/Data:
$ ls -i -lh /System/Volumes/Data
total 3842
11610314 drwxrwxr-x 91 root admin 2.8K Jun 1 21:16 Applications
2645288 -rw-r--r--@ 1 root wheel 0B Mar 12 06:04 Icon?
11593762 drwxr-xr-x 75 root wheel 2.3K May 15 07:15 Library
17772 drwxr-xr-x 3 root wheel 96B Mar 12 22:20 MobileSoftwareUpdate
11604958 drwxr-xr-x@ 3 root wheel 96B May 7 00:01 System
16815 drwxr-xr-x 6 root admin 192B May 15 07:15 Users
16825 drwxr-xr-x 4 root wheel 128B May 30 11:57 Volumes
16827 drwxr-xr-x 2 root wheel 64B Jan 12 19:18 cores
3 dr-xr-xr-x 2 root wheel 1B May 16 11:51 home
15869 drwxr-xr-x 2 root wheel 64B Jan 12 19:18 mnt
16824 drwxr-xr-x 4 root wheel 128B Mar 12 22:21 opt
11609361 drwxr-xr-x 6 root wheel 192B May 16 11:51 private
17 drwxr-xr-x 2 root wheel 64B Jan 12 19:18 sw
11593309 drwxr-xr-x@ 5 root wheel 160B May 7 00:01 usr
Since the inode numbers (i.e. hard link references) are the same - look at Users, for instance, the biggest one - they are the same on the disk - yet they are being counted twice.
This is doubly curious since the macOS man page for "du" states:
The default behavior of du is to count files with multiple hard links only once.
Also: Directories having multiple hard links ... are counted a single time per du execution.
Something is stopping this inode deduping from working for du. Perhaps Dropbox is invoking du (or df), directly or indirectly, to calculate available space? Or perhaps it is doing the same system calls that du/df are doing, with the same result?
As an additional experiment, I called the C++17 function std::filesystem::space, which also returns the "wrong" answer (i.e. it thinks the disk is nearly full). Per the C++ std spec, std::filesystem::space simply calls statvfs. I'd guess this is what DropBox is doing too, directly or indirectly. On macOS, that is not sufficient.
If someone could suggest a workaround (other than simply freeing up even more space) - and/or refer this to the Dropbox development team - that would be great.
Thanks!