[Samba] Samba 4.22 breaks Time Machine
jdistler-samba at golem.ph.utexas.edu
jdistler-samba at golem.ph.utexas.edu
Mon Mar 10 16:19:51 UTC 2025
> On Mar 10, 2025, at 09:06, Ralph Boehme <slow at samba.org> wrote:
>
>> Could we at least agree that the warning in the Samba 4.22.0 Release Notes:
>>>> As a possible workaround it is possible to prevent creation of .DS_Store files
>>>> (a Finder thingy to store directory view settings) on network mounts by running
>>>>
>>>> $ defaults write com.apple.desktopservices DSDontWriteNetworkStores true
>>>>
>>>> on the Mac.
>> is ... inadequate?
>> "Samba 4.22.0 (and later) is therefore incompatible with all current (macOS 15.x and earlier) versions of Apple's Time Machine."
>> is the minimal warning that should be in the Release Notes of 4.22.1.
>
> yeah, I get it. :) Sorry, but this wasn't clear when the decision had to be made.
>
> Unfortunately there are no release notes coming with bugfix releases. I guess all we can do is file a bugreport and hope folks will find this thread.
Too bad. A Bug Report would be good. As would some notification here:
https://wiki.samba.org/index.php/Configure_Samba_to_Work_Better_with_Mac_OS_X
The issue is (kinda) noted there:
>> Time Machine may not work correctly without posix_rename. Time Machine appears to initially create a sparsebundle named with the file system UUID (something like 2C25DB10-6C01-598B-9C11-383D64CA7A37_2024-08-31-175707.sparsebundle). It then renames the entire bundle to your machine name (something like "My MacBook.sparsebundle"). With posix_rename set to no you may get the error "The backup disk image could not be created".
But that's not completely accurate. As far as I can tell, Time Machine *also* uses posix_rename when expanding the .sparsebundle (by adding new "band" files). So even existing backups will fail at unpredictable times, when more storage is needed.
> Can you try the attached completely untested patch? It should fix the rename issue and from quickly scanning the code it shouldn't have unwanted side effects, at least not on a Time Machine only share.
I can install it, but I don't think I can adequately test it.
I don't have space on my NAS to create a new Time Machine share, and I am (in light of the experience of the past few days) reluctant to wipe out any of the existing Time Machine shares to create a new one for testing purposes.
So the only failure mode that I can test is when *existing* Time Machine backups start failing.
On the bright side, it *might* be that Sequoia (macOS 15) is OK. All of the Time Machine failures that I've seen have been with clients running Sonoma (macOS 14). I would not, however, bet a lot of money that Samba 4.22 and Sequoia are compatible, without more testing.
Perhaps someone with space on their NAS *and* ready access to an older mac client (my personal machine is running Sequoia) can try out your patch.
>
> -slow<fruit-posix.patch>
More information about the samba
mailing list