Azure Storage - File Share

In our previous article, Azure Storage – Basics, we learned about Azure Storage and all the services it provides. In this article, we will learn more about Azure File Storage.

Introduction to Azure File Storage

Many of us are familiar with either Dropbox or OneDrive for storing our files on the cloud and also, to share and sync the same across multiple devices.

Azure also provides a similar service called Azure File Storage wherein we can create File Shares using SMB protocol.

You could also use Azure File Share when you are planning to migrate your legacy state applications that use file system for storing and retrieving of files like Excel, Word etc., without making changes to your code-base related to the System.IO namespace.

In this series of articles, we will learn how to create an Azure File Share, store some directories / folders, and store a few files in those directories, as shown below.



We will learn how to create the following.

  • File Share - You can map this file share located on Azure Storage from your local directory on your Windows / Linux / Mac machine.
  • Directory - A logical grouping of files.
  • File Actual file - We will upload a sample file from a Windows machine.

Let’s get started and create a file share using our favorite Azure Management Portal.

Navigate to the storage accounts listing and choose the required Storage Account, as shown below.



As shown in the above screen capture, select Files to navigate to the listing of all the File Shares.



Currently, we don’t have any File Shares in the selected Storage Account. Let’s go ahead and create a new File Service by clicking on + File Share. You will be taken to "New file share" blade, as shown below.



Please provide the following details.

  1. Name of the File Share.
  2. Quota (Size) that you would like to allocate for this File Share. As shown below, you need to provide the size in GB. You can store up to 5 TB in each File Share.


     
Once you provide the details, click on "Create" button.
 
That’s it. We have successfully created a File Share, as shown below.
 

Let’s view the properties of the new File Share named "samplefileshare", by clicking on the ellipses in the above screen capture.

Clicking on the ellipses, a context menu will open.


Clicking on the properties link in the above screen capture, you will be taken to the following Share Properties blade where you can view the properties of the File Share. Please note the important File Share property “URL”



Below is how the File Share URL is formed.

https://<<Storage Account Name>>.file.core.windows.net/<<FileShare name>>


Summary

In the article, we have learned the following.
  • Understood about one of the Azure Storage Services called File Share.
  • How to create a File Share and define its Size.
  • Structure of the File Share URL which could be used while using the File Share programmatically.

I hope you enjoyed reading the article. Your feedback is really appreciated.