Search code examples
azureazure-blob-storagesubdirectorymount

How to mount the subpath of blockBlob container of storage account on the vm?


I have a storage account name storeabc of blockblob type inside that I have a container named testcontainer. I created a folder inside the container named testfolder.

I can successfully mount the container(till the container only). using the below command.

mount -o sec=sys,vers=3,nolock,proto=tcp storeabc.blob.core.windows.net:/storeabc/testcontainer /nfsdata

However, I was looking for a way to mount the folder i.e. testfolder.

I tried, mount -o sec=sys,vers=3,nolock,proto=tcp storeabc.blob.core.windows.net:/storeabc/testcontainer/testfolder /nfsdata

which ends up with the error.

mount.nfs: mounting storeabc.blob.core.windows.net:/storeabc/testcontainer/testfolder failed, reason given by server: No such file or directory

TIA.


Solution

  • mount.nfs: mounting storeabc.blob.core.windows.net:/storeabc/testcontainer/testfolder failed, reason given by server: No such file or directory

    According to this MS-document Known issues with Network File System (NFS) 3.0 protocol support for Azure Blob Storage .you can only mount the root directory i.e (Container). Mounting sub directories in azure blob storage not yet supported.

     mount -o sec=sys,vers=3,nolock,proto=tcp <storage-account-name>.blob.core.windows.net:/<storage-account-name>/<container-name>  /nfsdata
     
    

    Please try to type the commands and avoid copy pasting as hidden characters in that command can cause these error.

    Reference: Mount Azure Blob Storage by using the NFS 3.0 protocol | Microsoft Docs