This is a follow-up to my stackoverflow post: how do I mount a page blob as a VHD on worker role instance? After the drive is mounted, I will pass that as the value of –dbpath parameter to mongo instance.
In a nutshell, I’m trying to start a single mongo instance with the data directory on azure blob (for durability). I’m building on the HelloWorld example on Azure’s site– instead of starting Tomcat instance, I will start mongo instance.
I suggest you follow this guide: http://www.codeproject.com/Articles/81413/Windows-Azure-Drives-Part-1-Configure-and-Mounting. This guide explains how to mount the drive but it also shows how you can save the drive letter as an environment variable.
This is interesting for when you’re starting the mongo instance, you can just use this environment variable together with –dbpath. Maybe it would be best to encapsulate all the code in a console application so that you can simply start it before starting the mongo instance.