Using /mnt volume on Azure


#1

Hello -

We have found significant performance gains in storing our indexes on the ephemeral storage on our Azure VMs. As a reminder, the ephemeral storage is super-fast local SSD that is typically only restricted by the IOPS limit of the VM.

Our application is smart enough to recreate the indexes if they don’t exist, meaning we have a solution in place to recreate indexes in the event ephemeral storage unexpectedly disappears after an outage (also, this should be very rare if you’re properly using availability sets). So the only issue is managing access to the /mnt volume.

We currently have an entry in the rc.local that chowns the /mnt volume to the couchbase user, makes sure the index directory exists, then restarts the couchbase service. However this is clutzy because I don’t like restarting the couchbase service only seconds after the initial start command.

So I believe the correct solution is to control the order of services starting in the init scripts, but I’m not sure how to do this. My understanding is that the walinuxagent is responsible for creating /mnt, so I we were thinking:

  • system start
  • walinuxagent
  • shell-script - make sure /mnt is available, chown to couchbase, create directories
  • start the couchbase service

Any suggestions on how to do this in Ubuntu 14?

Thanks,