question

Roy-2918 avatar image
0 Votes"
Roy-2918 asked Roy-2918 answered

How to create a folder in a blob container by using linux commands ?`

Hi Team,

I have mounted a blobfuse container in one of ubuntu 18 VM

i would like to create a directory in /mycontainer mounted in a VM, i am unable to create a folder.

i tried using a command mkdir test folder , but unfortunately in the azure portal, I cant able see a file called test folder, not have a folder or directory.

for reference link:
https://docs.microsoft.com/en-us/azure/storage/blobs/storage-how-to-mount-container-linux

Any suggestion here will be helpful to achieve here.


msc-operations-managerazure-storage-accountsazure-blob-storageoffice-teams-linux-itproazure-cloud-services-extended-support
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

VidyaNarasimhan-2409 avatar image
0 Votes"
VidyaNarasimhan-2409 answered VidyaNarasimhan-2409 commented

@Roy-2918 can you please download the storage explorer and check the directory structure there? https://azure.microsoft.com/en-us/features/storage-explorer/
Assuming you are not using ADLS storage, the virtual directory structure in portal is visible only when a file has been added/uploaded. You can also try adding a file to the directory you created and then check if the portal shows the directory and the file.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @VidyaNarasimhan-2409

I have installed the storage explorer and created a folder/directory in the blob container, which reflects fine at the Azure portal and does Not uses ADLS for the storage account.

But the requirement is when I try to create a folder in the blob container from the Linux VM where the blob container is mounted, I am unable to see the folder in a blob container, instead of it is showing a normal file that has a blob extension.
!
187575-blob1.jpg




0 Votes 0 ·
blob1.jpg (103.4 KiB)

Hi @Roy-2918 , Blob storage always created a virtual folder that does not actually exist in Azure until you upload blobs/files into it. As you see a similar issue here, https://github.com/Azure/azure-storage-fuse/issues/601 , creating an empty folder creates a zero byte directory-blob marker that shows up in the portal. So, what I was asking earlier is to try copying a folder containing an existing file to the Linux VM container mount and then check whether it shows up in Portal/Storage explorer.
Thanks!

0 Votes 0 ·
Roy-2918 avatar image
1 Vote"
Roy-2918 answered

Hi

I have enabled the ADLS hierarchal namespace for the storage account, post that I am able to create a directory/folder in a blob container by using a commands Linux in VM.

And able to see the created folder in the blob container.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.