Mac OS X Server,  Mac Security,  Mass Deployment,  Xsan

AFP, Xsan, Failover & Tokens

When an AFP connection moves to idle, a token is used to establish a reconnect. By default, AFP stores tokens in the local /etc/AFP.conf. But in order to have users reconnect if they move between servers, as in a failoverd event or even in a more active/active relationship with a load balancer you need to move the shared cache to a shared location. To do so you’ll edit the /Library/Preferences/com.apple.AppleFileServer.plist file using the defaults command. The key that you’ll need to change is the reconnectKeyLocation, specifying the string in the key that corresponds to the path to the local server that is running afp to the volume. Therefore, if the location is on an Xsan volume called SAN and you want to put the conf file containing the tokens into the etc folder of that volume you would use the following command:

defaults write /Library/Preferences/com.apple.AppleFileServer reconnectKeyLocation /SAN/etc/AFP.conf

This will allow you to use AFP with Xsan, without having issues with the reconnect.  Happy sharing!