Block Cloning over SMB does not work from macOS clients
Description
Problem/Justification
Impact
Attachments
Activity

Ricky Haase January 17, 2025 at 2:40 PM
Adding the option as an available option would be perfect and all I or most macOS users might need! Thank you!
I do want to push back a little tho on your statement that it is not block cloning. While yes, all that this configuration option does is enable server-side copy, that is a prerequisite for block cloning happening. Whatever configurations are already in place to leverage block cloning appear to apply when macOS requests a server-side copy. See my observations below:
Notice in the video how the copy is now happening server-side (bandwidth usage) but also there is no reduction is available space on the server? This does not happen when writing new data to the server - the available storage always decreases as new data is written. See ZFS dataset usage below.
Dataset usage before duplication of 29.7 GB folder
Dataset usage after duplication of folder (in finder with fruit:copyfile = yes
in SMB config)
Please correct me if I’m wrong, but doesn’t the increased used/referenced without the decrease in available storage mean that block cloning was used in the copy? If so, then while fruit:copyfile = yes
does not directly enable block cloning, it appears to be the only missing prerequisite to allow macOS to leverage the existing block cloning implementation.

Andrew Walker January 17, 2025 at 1:39 AMEdited
That’s not block cloning. It’s the vfs_fruit copyfile implementation. It’s also a non-standard configuration. We could perhaps enable by default now for future releases. It’s a problem because MacOS doesn’t actually even attempt to perform server-side copies on non-MacOS servers.
We’ll probably never enable vfs_fruit by default due to other reasons, but it’s probably not a bad idea to enable when someone explicitly selects this option.
As of last time I checked MacOS still does not implement the SMB IOCTL for block cloning.

Bug Clerk January 17, 2025 at 1:13 AM
Thank you for submitting this TrueNAS Bug Report! So that we can quickly investigate your issue, please attach a Debug file and any other information related to this issue through our secure and private upload service below. Debug files can be generated in the UI by navigating to System -> Advanced -> Save Debug.
https://ixsystems.atlassian.net/servicedesk/customer/portal/15/group/37/create/153
Details
Assignee
Andrew WalkerAndrew WalkerReporter
Ricky HaaseRicky HaaseLabels
Impact
LowDepartment
ServicesStory Points
1Components
Fix versions
Affects versions
Priority
Low
Details
Details
Assignee

Reporter

Server-Side Copy is not enabled in TrueNAS for macOS clients. This prevents the block cloning feature introduced in 23.10 from working when the copy action is performed from a macOS client over an SMB connection. All that needs to be done to correct is to change the default SMB configuration or at least add an option in the GUI to add the line
fruit:copyfile = yes
to the smb config file.See blog post about the issue: