Delays in freeing disk space with Dropbox Smart Sync on MacOS/APFS - what dangers lurk?

Tom*_*ker 5 macos dropbox apfs macos-high-sierra macos-mojave

As explained by Dropbox, Smart Sync is a feature "that helps you save space on your hard drive. Access every file and folder in your Dropbox account from your computer, using virtually no hard drive space. ... With Smart Sync, content on your computer is available as either online-only, local, or in mixed state folders."

Last night and this morning, I moved a large quantity of files from an external disk into Dropbox folders on my MacBook (MacOS Mojave Version 10.14.4), then selected those Dropbox folders to be "online-only". The files rather quickly synched with Dropbox on the cloud -- I saw them appear in the local folders of a desktop computer that shares the dropbox -- but the grey icons (for "online only") took a long time to display in Finder. (More than twenty hours later, two larger folders still show the blue icon, for "synching", even though their contents have long appeared on the other computer.)

With growing alarm, I watched as each new directory added to Dropbox ratcheted up the amount of space used on the MacBook to dangerous levels (93%) even as large directories marked as "online only" continued to sync to the Dropbox cloud. I could only restore available space by moving some content back to an external disk.

Confusingly, information about how much space really remained was inconsistent. df showed 58 GB available:

Filesystem    1G-blocks       Used  Available Capacity Mounted on
/dev/disk1s1        465        403         58      88% /
Run Code Online (Sandbox Code Playgroud)

while About this Mac => Storage showed 232 GB available.

According to one source, "the Storage tab in About This Mac ... can be useful as it is the only guide to what types of data are taking up storage space, but when you want to know how much space is used or free on any volume or disk, use Disk Utility: it’s much more likely to be accurate." Confusingly, however, my Disk Utility displayed both results:

  • 433.68 GB used, 3.95 GB on other volumes, 62.45 GB free
  • Capacity 500.07 GB, Available: 232 GB (169.55 GB purgeable), Used: 433 GB

As explained by Dropbox, "setting files to be online only will free up space on your hard drive within minutes (as long as your computer is online and able to sync to Dropbox). However: ... macOS 10.13 (High Sierra) uses ... APFS. With APFS, the operating system takes snapshots of the file system and available hard drive space. These snapshots may not update after you've used Smart Sync to set Dropbox files as online only. This means that hard drive space you freed up with Smart Sync may not be immediately reflected or available if this snapshot hasn't updated. This hard drive space should eventually be freed up by the OS, but the amount of time this will take can vary. This isn't a behavior specific to Dropbox, but instead the designed behavior of macOS." On APFS, the placeholders for "online-only files use a small amount of space on your hard drive to store information about the file, such as its name and size. This uses less space than the full file." Indeed, files marked as "online-only" continue to show their non-zero (online) sizes (e.g., with lsos.path.getsize()),好像它们仍在本地可用。

我认为这是MacOS(即APFS)问题,而不是Dropbox特有的问题。

我的问题:如果“磁盘工具”显示232 GB“可用”,但仅显示62.45 GB“可用”,后果是什么?如果我要向磁盘添加另外100 GB的文件,会发生不好的事情吗?

我当然不愿意仅仅为了“实验”而添加比无空间更多的内容,但是我看到这种情况会无意间发生。

小智 2

这对我有帮助:https://www.cbackup.com/articles/dropbox-take-up-space-on-mac-6688.hmtl.html#A1

解决方案 4. 清除 Dropbox 缓存文件夹 通常,您的 Dropbox 根文件夹中存储着一个包含 Dropbox 缓存的隐藏文件夹,名为“.dropbox.cache”。只有当操作系统启用了查看隐藏文件和文件夹的功能时,您才能看到该文件夹​​。

如果您从 Dropbox 删除了大量文件,但计算机的硬盘没有反映这些删除,则删除的文件可能会保存在缓存文件夹中。因此,您可以按照以下步骤手动清除缓存以清理硬盘上的一些空间:

  1. 打开 Finder,然后从“前往”菜单中选择“前往文件夹...”。

  2. 应出现一个对话框。现在将以下行复制并粘贴到框中,然后按回车键:

〜/Dropbox/.dropbox.cache

  1. 这将直接带您进入 Dropbox 缓存文件夹。将缓存中的文件从 Dropbox 缓存文件夹拖到废纸篓中,即可将其删除。