1

The strangest thing is happening right now, so I'm just going to do my best to explain:

I have two hosts: a MacBook Pro ("MBPro"), and an iMac ("iMac"), both running Mojave 10.14.6. On each, I have created identical environments (user with matching uid, directory structure, etc.), and I have an encrypted sparsebundle located at /Users/me/local/my.sparsebundle (in case someone steals one of my devices, my data stays protected). I mount this sparsebundle to a local directory on each host like so:

hdiutil attach /Users/me/local/my.sparsebundle -mountpoint /Users/me/mountpoint

To synchronize these two devices, I use rsync (matching versions built from source on both machines):

iMac:me me$ rsync --version
rsync  version 3.2.3  protocol version 31
MBPro:me me$ rsync --version
rsync  version 3.2.3  protocol version 31

For almost a year now, I've been using the following command to synchronize the two sparsebundles (in this example, both sparsebundles are mounted, and I am trying to copy from MBPro to iMac):

rsync -ai --bwlimit=6000 --iconv=utf-8-mac,utf-8-mac --update --delete-after -f "- /.fseventsd" -f "- /.DocumentRevisions-V100" -f "- /.TemporaryItems" -f "- /.Trashes" -f "- .DS_Store" --info=progress2 me@MBPro:/Users/me/mountpoint/ /Users/me/mountpoint/

Recently, I stopped using iMac for a while and was working only on MBPro. The sparsebundle on MBPro grew +10GB, and now suddenly I cannot rsync the two. It successfully copied 8 of those 10 new GB from MBPro to iMac, but then it quit with an error like so:

rsync: [receiver] rename "/Users/me/mountpoint/path/to/file" -> "path/to/file": No such file or directory (2)
rsync error: error in file IO (code 11) at receiver.c(378) [receiver=3.2.3]
rsync: [generator] recv_generator: mkdir "/Users/me/mountpoint/path/to/anotherdir" failed: No such file or directory (2)
*** Skipping any contents from this failed directory ***
rsync: [generator] write error: Broken pipe (32)
rsync: connection unexpected closed (168888333 bytes received so far) [generator]

I've restarted the transfer 3 times and it keeps breaking at the same point. So, I'm thinking, "well, let's see what's going on there."

iMac:me me$ ls -al mountpoint/path/to [tab][tab]
file otherfile anotherfile anotherdir

Bash completion shows that mountpoint/path/to/anotherdirectory and mountpoint/path/to/file both exist, but wait!

iMac:me me$ ls -al mountpoint/path/to [return]
total 0
drwxr-xr-x  9 m  staff  288 Jun 27 08:28 .
drwxr-xr-x  7 m  staff  224 Jun 20 16:41 ..

Nothing's there. Bash completion and rsync both think these files/directories exist, but they don't. The parent directory mountpoint/path/to is actually empty.

Is there something about sparsebundles that I'm not aware of? Some kind of magic hidden cache or something that's making both bash completion and rsync think these files and directories exist when they actually don't? FYI I've tried unmounting and remounting the sparsebundle on iMac, but that didn't change anything. I got that idea from this answer here: https://apple.stackexchange.com/a/18494/410429 thinking perhaps the file was open somehow through the rsync process, but neither lsof nor sudo lsof report any open files.

0 Answers0