Last week I began testing the Apple Portable Home Directories feature. I’d heard a lot of good buzz, but my experience was pretty terrible. Of course I was doing things my own way, and not the Apple way, which is always a bit dicey.
Almost Proper
Wanting to get PHDs working, I decided to try doing things a bit more by the book. I set up our NFS Home Account Server as an NFS Reshare and shared it out over AFP. I also set my home accounts up properly in WGM, using the AFP share as my network home, and a local folder as my local one.
But PHD kept incorrectly syncing things, to the point where I’ve actually now lost some data. Seems PHD, when it syncs, is for some reason using the data on the network drive as the master data set. Files I’ve modified before leaving for work have been reverted back to their old versions — the ones on the network — over night. (Which is weird considering the fact that I was logged out.)
I’m sure this works in a perfectly standard environment, with no existing users and no NFS Reshares, when set up from scratch. But I have to say, I could not be more frustrated with PHDs. So I’m giving up for now and setting my home account back to the local drive. Of course, even reverting back to a non-managed, non-PHD, local account is difficult in this case.
Cache Insanity
The reason for this — and one of the things that’s made testing PHDs so difficult in general — is the insane level of caching the server does with regards to PHDs. Caching is so aggressive that, even after disabling PHDs on the server and restarting the client machine, the SyncAgent on the client continues to attempt to sync my homes. If I try to stop it I get an error that says I can’t stop it because I don’t have a PHD. I’m a big fan of irony, but not in my server software, thank you very much.
So now the PHD service is incorrectly syncing my local home account with a network home it shouldn’t even see. Thousands of conflicts are occurring. I’m losing data. Though I’ve disabled the service, the settings persist. This is terrible. Horrible. Godawful.
And there is no sanctioned, GUI way to stop this from happening.
Freedom!
Eventually I was able to stop the errant syncing by running the ever-trusty:
sudo dscacheutil -flushcache
Jesus! What a kludge!
You can imagine how difficult this has made my testing. I can’t be sure that any change I’ve made on the server is actually happening on the client, so it’s impossible to know where this is failing or what I might be doing wrong without starting from scratch every time I make a configuration change. And starting from scratch is pretty damned difficult as well, as the PHD settings are persistent to a fault.
Is That All There Is?
I’m not sure what to do with PHDs at this point. I don’t think they’re useful for our environment, or for any existing users. Testing them is downright painful. And data loss is a real possibility, and not a risk I’m willing to take with other users’ data.
So, after a couple weeks of some very frustrating testing, I’m afraid I’ll have to pass on PHDs. It’s a nice idea, but not ready for prime time from where I sit.
There’s a slight chance I’ll try PHDs from scratch with a fresh home account, just to see if it works at all. But we’ll see. I’m pretty annoyed at this point.
More annoyed than I ever was with Windows Roaming Profiles. And that’s a feat.


6 Comments
Yeah it’s unfortunate when there are issues out there. I have also ran into caching issues with just general MCX settings where I have had to a sudo dscacheutil -flushcache to fix things. So not just a PHD issue.
I have had some luck in the past with PHD (when a user already had a local account) by creating the “new” account first by logging on through the server, then logging back out in a different local admin account and changing the local folder to the new created PHD account. Then with log back in and do the menu bar sync.
Yeah, the caching has always been a bit much for my tastes, even in 10.4. I’m not quite sure why Apple is so aggressive with the caching. (And isn’t cache supposed to get checked and cleared regularly or on changes?) 10.5 seems to have made great strides in refreshing cache overall, but when it comes to PHDs it’s like the Tiger days. There is no apparent way to clear the settings from the client Mac. And that’s pretty damned annoying.
I may try your method if I ever decide to mess with PHDs again. Thanks!
-systemsboy
We have PHDs set up for most of our staff and on the most part, it’s working pretty well though we have a standard OS X Server setup with OD and AFP home directories though we’ve had our fair share of sync conflicts that just pop out of nowhere.
One thing I’d recommend is to make sure that your local account doesn’t have the same username as the one on the server. What I’ve done before is delete the local account record then rename/rechown the local home directory to the usernae of the network account. When you try syncing after that, you get a prompt asking you where the last modified files are located.
If you ever mess around with PHDs again, the logs at ~/Library/Logs/FileSyncAgent.log and /Library/Logs/FileSyncAgent/FileSyncAgent-verbose.log are really useful. They can be a little dense but they give way more info than the FileSyncAgent GUI.
Thanks Patrick! Sounds like good info.
I do plan on revisiting PHDs at some point. I will include your log info as well as some other links and information I’ve found along the way.
It’s reassuring to hear that others are experiencing oddities as well. Looks like there are still some kinks in the PHD system, and not just with non-standard installations.
Thanks again.
-systemsboy
We’re using mobile accounts and PHDs with NFS homes on NetApps. Almost all of our laptop users are using mibile accounts + PHDs, and some of our desktop users are as well.
It’s not perfect, but works pretty well. I think your issue where automatic syncing wasn’t working with NFS homes might be described here with a workaround:
http://managingosx.wordpress.com/2009/02/19/leopard-mobileaccounts-and-nfs-homes/
-Greg
Greg,
Thanks! I have actually read your site since abandoning all hope of actually using PHDs in our lab. It’s really useful for understanding what’s going on in the background with PHDs.
The fix you propose in your article is, as you say, ugly indeed. I too would call that a bug, or at least a bad implementation. Still, if I get a chance I may give it a try, just to see if I can get it working.
Thanks again!
-systemsboy