So during a recent training course, at an existing client (they have now been operational for over a year) moving into the advanced material I get asked a question.
"On our servers we have some machines with about 3000 OSDs in the OSD cache. (they only have about 100 apps, some with multiple OSDs but way less than 3000), why is that?"
So, a little bit of info when I looked into it.
They were using app-v 4.6 in Citrix (I love Citrix). But they were using the MSI to install the apps. (yep a bit weird)
They started having a disk for each server, which started to take up a lot of storage when they ramped up their servers (not a lot of apps but a lot of servers). To get over that issue, they added a separate disk, that was when they noticed the extra OSDs.
So, I thought, hmmm, "Does the Citrix provisioning server know about the extra disk?"
"Probably not." Was the reply
So, I thought, it kind of figures that the MSI is installing the App-V app, putting the OSD file in the local cash (on that new extra disk).
Now I have never really looked into the MSI thing, I know it works, and I normally only use it for testing, just to make sure the shortcuts appear as expected and the FTA's work, but not actually in production as an App-V deployment option.
I do know that OSDs have a GUID, and they are put into the local cache, surely that has to be unique too.
So we looked into a bit, listed by the modified date, and there were lots of OSDs with the same date, opened them up in Notepad (other text editors are available) and I saw that they were actually the same OSD.
So, we looked at the app-v agent, checked what OSD the client was looking for.
Deleted all with the same date except the one that was needed, it all worked.
Then we renamed the remaining OSD and we get an error (as you would expect) and sure enough it was the error they had seen when they deleted ALL of the OSDs. Because its a crap MSI you cant repair the MSI to put the OSD back in the cache. (you need to remove it and reinstall it)
Just in case you ever wondered about this, when you install the MSI it creates a random unique name for the OSD file in the OSD cache.
We tested this by:
installing the MSI
rename the OSD
uninstall the MSI
restore the name of the OSD
reinstall the MSI
and it adds another OSD with a different name, but the same date (when the OSD was created)
Solution options for this problem at this particular site...
- tell the Citrix Provisioning services about the new disk and let it format it
- write a script and do a delete *.* of the OSD cache
They chose the second option, easier to add a line in the batch file running the MSI's than engage with the Citrix team.