Project

General

Profile

Feature #11017

Support Apple FULL_SYNC feature

Added by Gordon Ross 5 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
2019-05-15
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

Something that came up at the last plug-fest. Apple clients don't trust servers to actually sync data to persistent storage unless we advertise the FULL_SYNC volume attribute in the Apple extension that queries volume properties.

The most obvious way to test this is to attempt to set up Apple "Time Machine" with our server as storage. The setup refuses to use the server unless it has both SMB2 leases and advertises the FULL_SYNC volume property.

Unfortunately, setting up Time Machine is complicated, requiring a functional (Multicast Domain Name Service) MDNS service with registrations for the SMB server and share to be found by Time Machine using MDNS. I tried briefly setting that up and ran out of time trying to get it the MDNS parts work so that Time Machine would find the share.

As an alternative verification method, we can connect using SMB2 from a Mac client and take a network trace. In the volume capabilities part of the SMB2 create response, AAPL create context element, we should see the FULL_SYNC flag when "drilling down" to that level with Wireshark.

History

#1

Updated by Gordon Ross 5 months ago

  • Description updated (diff)
  • Status changed from New to In Progress

Tested per the description.
Fix in production since late 2017

#2

Updated by Electric Monk 4 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 479c108b209ea78791b37ea89ce0f9b6847d7c6b

commit  479c108b209ea78791b37ea89ce0f9b6847d7c6b
Author: Gordon Ross <gwr@nexenta.com>
Date:   2019-06-09T00:49:10.000Z

    11017 Support Apple FULL_SYNC feature
    Reviewed by: Matt Barden <matt.barden@nexenta.com>
    Reviewed by: Evan Layton <evan.layton@nexenta.com>
    Approved by: Garrett D'Amore <garrett@damore.org>

#3

Updated by Toomas Soome 4 months ago

Gordon Ross wrote:

Unfortunately, setting up Time Machine is complicated, requiring a functional (Multicast Domain Name Service) MDNS service with registrations for the SMB server and share to be found by Time Machine using MDNS. I tried briefly setting that up and ran out of time trying to get it the MDNS parts work so that Time Machine would find the share.

Few notes:

1. in addition to zfs quota, there is other quota mechanism - at share root:
root@beastie:/export/TimeMachine# cat .com.apple.TimeMachine.quota.plist

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>GlobalQuota</key>
<integer>3000000000000</integer>
</dict>
</plist>
root@beastie:/export/TimeMachine#

Note, the size is calculates by * 1000.

2. with svc:/system/avahi-bridge-dsd:default (in openindiana at least):
  1. cat /etc/avahi/services/smb.service

    <!DOCTYPE service-group SYSTEM "avahi-service.dtd">
    <service-group>
    <name replace-wildcards="yes">%h</name>
    <service>
    <type>_smb._tcp</type>
    <port>445</port>
    </service>
    <service>
    <type>_device-info._tcp</type>
    <port>1</port>
    <txt-record>model=RackMac</txt-record>
    </service>
    <service>
    <type>_adisk._tcp</type>
    <port>2</port>
    <txt-record>sys=waMa=0,adVF=0x100</txt-record>
    <txt-record>dk0=adVN=TimeMachine,adVF=0x82</txt-record>
    </service>
    </service-group>

The waMa is ethernet mac address, I did put actual address there, not sure if 0 is working too).
The adVN is share name.

Flags are magic flags, described in https://developer.apple.com/library/archive/releasenotes/NetworkingInternetWeb/Time_Machine_SMB_Spec/ and google...

The mdnsd we have, is expecting port values for services, for some reason it does not create just TXT records, but also does want to create SRV and needs port number > 0. This should be investigated.

Also available in: Atom PDF