OK this first entry is a bit of a doozy. I have a pre production 3 server RDS Collection in place with about 50 users, using User profile disks. I’d not touched it in a few weeks because the Client kept putting of the migration date.
I return to it today, and no profile disk will load – all users receive temporary profiles. Oh F……
I Immediately start pulling apart permissions on the File share for the profile disks. All looks good. Double check the Session Collection config, all good, check each RD server can access the file server and share, all good.
I rename an existing profile VHDX to VHDXBAK, login, a new VHDX is created and works fine, login after login. Put the old one in its place and, BAM, temp profile.
I’m officially lost now and begin to look at how rapidly I can deploy roaming profiles, but on a whim I try to mound one of the affected VHDXs and get ……
“Sorry, there was a problem mounting the file”
Aha! What’s this? A quick Google later -> Copy (not Move) a VHDX out of that folder and back again – and the existing profile started to work again!
At this point everything is great yeah? Well no, I want to find out just WTF happened. I stumbled across Now were getting somewhere, It looks like the sparse attribute is preventing windows from mounting the VHDX, a quick command of…. Blog post
fsutil sparse queryflag UVHD-S-1-5-21-1813029092-748371496-97160790-2957.vhdx
returns a value of
“This file is set as sparse”
Setting this to 0
fsutil sparse setflag UVHD-S-1-5-21-1813029092-748371496-97160790-2957.vhdx 0
And this VHDX is now mountable and working properly in RDS..
Hmm, OK, now we good yes? Not yet, so what is setting this file as Sparse? Well Michel mentions that Duplication + DFS-R could be the culprit,
The file was a target of DFS-R and the source file was deduplicated. In this case the target file of the replica will have the sparse attribute set
……and yep my VHDs are stored on a Deduped Volume, which is DFS replicated to-from an old 2008 server that is not capable of De-dupe. Normally this works fine, but not for VHDs it seems. It worked fine for months and then keeled over. I suspect it set the sparse flag when DFS has one of its monthly cerebral flatulence episodes.
I Hate DFS-R – this issue has made me hate it even more. Anybody using User Profile Disks on Clustered File servers?