I didn't find any page to post specific bugs, so I think I'll post it here.
Windows Server 2012r2 with enabled User Profile Disks (vhds) does not detach the disk if it can't load profile stored on it.
I mean, if NTUSER.DAT becomes corrupted for some reason (program failure, sudden server restart, connectivity lost to storage volume etc), server behaves in this way:
1. attaches profile VHD
2. tries to load user profile from it, fails
3. creates a temporary profile for this user and logs him in
4. user logs off by himself or by admin
5. windows does not detach user's profile VHD. It is stuck forever until I find it by a) getting user sid,b)finding which server in farm hold this vhd captive,c)log on to server locally, go to disk management and try to detach all attached VHD to see their
filename, d) at last I find the problematic VHD, detach it and delete to clean user's profile.
Confirmed this in test lab environment
Just IMO, I believe default behavior should be to detach profile disk immediately when profile cannot be loaded and user gets temporary profile, that way Windows doesn't have to remember to detach it after user logs off