Unable to Mount container through Blobfuse at secondary location

kumar kaushal 176 Reputation points Microsoft Employee
2022-01-24T23:03:25.003+00:00

Issue description :

I have a Linux ubuntu 20.04 VM1 at location Central India as the primary location . Then i created a storage account which has the following properties .

Replication
:
Read-access geo-zone-redundant storage (RA-GZRS)
Primary/Secondary Location
:
Primary: Central India, Secondary: South India

Container name -DATA

Then i followed the step as illustrated in the article to install Blob-fuse and configure https://learn.microsoft.com/en-us/azure/storage/blobs/storage-how-to-mount-container-linux

It worked . This was at the primary site Linux ubuntu 20.04 VM1 at Central india. I made sure that the fuse_connection.cfg has the below details :

accountName myaccount
accountKey storageaccesskey
containerName mycontainer

Since the storage account is Read only that means i should be able to read the container from the secondary location . Then i created a new VM at South india by name called Linux ubuntu 20.04 VM1 . And tried to mount the container through blobfuse . In the fuse_connection.cfg i made sure that

accountName myaccount-secondary
accountKey storageaccesskey
containerName mycontainer

I get the error message as listed below : Why i am getting the below error message ?

root@linuxvm2:~# Unable to start blobfuse due to a lack of credentials. Please check the readme for valid auth setups.
Unmounting blobfuse.
Unmounted blobfuse successfully.

"When read access to the secondary is enabled, your application can be read from the secondary endpoint as well as from the primary endpoint. The secondary endpoint appends the suffix –secondary to the account name. For example, if your primary endpoint for Blob storage is myaccount.blob.core.windows.net, then the secondary endpoint is myaccount-secondary.blob.core.windows.net. The account access keys for your storage account are the same for both the primary and secondary endpoints."

https://learn.microsoft.com/en-us/azure/storage/common/storage-redundancy

Azure Storage
Azure Storage
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,538 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,201 questions
0 comments No comments
{count} votes

Accepted answer
  1. deherman-MSFT 38,021 Reputation points Microsoft Employee Moderator
    2022-01-25T20:27:24.997+00:00

    @kumar kaushal
    This should work if you use the blobEndpoint option in the configuration file.

    accountName storageaccountname  
    accountKey youraccesskey  
    containerName blobfuse  
    blobEndpoint https://storageaccountname-secondary.blob.core.windows.net  
    

    Please test and let me know if you run into any issues.

    -------------------------------

    Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. kumar kaushal 176 Reputation points Microsoft Employee
    2022-01-27T10:18:36.467+00:00

    @deherman-MSFT .. I have one more question .Now since this is secondary it should be only read only . That means i should not be able to modify the contents of the blob.txt .

    I did a VI blob.txt and got the below :

    root@linuxvm2:~/mycontainer/test# cat blob.txt
    hello world
    root@linuxvm2:~/mycontainer/test#

    root@linuxvm2:~/mycontainer/test# cat blob.txt
    hello world

    "blob.txt"
    E209: Error closing "blob.txy~"
    "blob.txt" E512: Close failed
    WARNING: Original file may be lost or damaged
    don't quit the editor until the file is successfully written!
    Press ENTER or type command to continue

    This basically confirms that we are not able to write to the original file from the secondary as this is read only . Is my understanding correct ?


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.