2
votes

I found quite a few documents advertising or explaining how to enable geo-redundant (or geo-replicated) MS Azure storage accounts. Finding some document explaining how to access the secondary storage turned out more difficult.

From the little (potentially outdated) information I found, my understanding is that in order to access the secondary location for geo-redundant storage accounts I just set the location mode to LocationMode.SECONDARY_ONLY and then proceed as usual. If I do that however (in Java, using the SDK vs 0.6.0 and azure-storage-1.2.0.jar library), a StorageException is thrown, caused by a java.net.UnknownHostException.

I also found, that the hostname for the secondary location should be -secondary..core.windows.net. And while .cloud.core.windows.net resolves for my (geo redundant) storage account, -secondary.cloud.core.windows.net does not.

So, where do I err and how do I access the secondary location (it's also my understanding that I must access the secondary location in order to use the getServiceStats() method of a CloudBlobClient object)?

1

1 Answers

2
votes

Make sure the storage account type is Read-only Access to Geo Redundant Storage (RA-GRS), not just Geo Redundant Storage (GRS). Otherwise you won't be able to access the secondary directly.