Recently one of my colleague came to me with a problem. He created a new Azure ADLS and he is not able to see the option to Add Directory within the Azure storage containers. I checked his problem. The screenshot of the view that he was seeing is given below. At the top, he is not seeing an option to Add directory.

I have examined the properties carefully and then understood the root cause. At the time of creation, he did not enable the Hierarchical Namespace option. By default this namespace is disabled. If this option is disabled, the storage account will be a simple blob storage. It will not have ADLS Gen2 capabilities. In azure blob storage, there is no “folder”, the “folder” actually is part of the blob name. You cannot create an empty folder inside blob storage. Also the folder and file level ACLs are not supported.

Here the solution is to enable Hierarchical namespace and enable ADLS Gen2 capabilities.

As a result of not selecting this, the directory creation option got disabled in his storage account. This is a storage account level property. This option can be modified after creation of the storage account. But the time required to modify depends upon the number of folders and files inside the storage account. If it is a fresh account without any files, the changes will reflect in a few minutes.

This can be modified in an existing account by clicking on the Hierarchical Namespace Disabled option in the properties and complete the review steps. This will upgrade the storage account with ADLS Gen2 capabilities.

The storage account may be inaccessible for sometime during this upgrade process. After the completion of the upgrade process, you will be able to see the Add Directory option within the containers. The screenshot of the same is given below.

I hope this write up is useful. Feel free to comment if you have any questions or suggestions.