DEV Community

Cover image for How to Create and configure a storage account for Azure Files.
nadico chris
nadico chris

Posted on

How to Create and configure a storage account for Azure Files.

Task Content:

  • Create a storage account specifically for file shares.
  • Configure a file share and directory.
  • Configure snapshots and practice restoring files.
  • Restrict access to a specific virtual network and subnet._

Create and configure a storage account for Azure Files

1- Create a storage account for the finance department’s shared files. Learn more about storage accounts for Azure Files deployments.

  • In the portal, search for and select Storage accounts

Image description

  • Select + Create.

Image description

  • For Resource group select Create new. Give your resource group a name and select OK to save your changes.
  • Provide a Storage account name. Ensure the name meets the naming requirements.
  • Set the Performance to Premium.

Image description

  • Set the Premium account type to File shares.
  • Set the Redundancy to Zone-redundant storage.
  • Select Review and then Create the storage account.

Image description

Image description

  • Select Go to resource

Image description

Create and configure a file share with directory

1- Create a file share for the corporate office. Learn more about Azure File tiers.

  • In the storage account, in the Data storage section, select the File shares blade.
  • Select + File share and provide a Name.

Image description

  • Provide Name
  • Review the other options, but take the defaults. Select Create

Image description

Image description
2- Add a directory to the file share for the finance department. For future testing, upload a file.

  • Select your file share and select + Add directory.
  • Name the new directory finance.

Image description

  • Select Browse and then select the finance directory

Image description

Image description

Image description

Configure and test snapshots

1- Similar to blob storage, you need to protect against accidental deletion of files. You decide to use snapshots. Learn more about file snapshots

  • Select your file share.
  • In the Operations section, select the Snapshots blade

Image description

  • Select + Add snapshot. The comment is optional. Select OK

Image description

  • Select your snapshot and verify your file directory and uploaded file are included.

Image description

2- Practice using snapshots to *restore a file.
*

  • Return to your file share.
  • Locate your uploaded file and in the Properties pane select Delete then Select Yes to confirm the deletion.

Image description

  • Select the Snapshots blade and then select your snapshot
  • Navigate to the file you want to restore,

Image description

  • - Select the file and the select Restore.

Image description

  • Provide a Restored file name and select ok
  • Verify your file directory has the restored file.

Image description

Image description

Configure restricting storage access to selected virtual networks.

1- This tasks in this section require a virtual network with subnet. In a production environment these resources would already be created.

  • Search for and select Virtual networks

Image description

  • Select Create. Select your resource group. and give the virtual network a name.
  • Take the defaults for other parameters, select Review + create, and then Create.

Image description

  • Wait for the resource to deploy.
  • Select Go to resource.

Image description

  • In the Settings section, select the Subnets blade.

Image description

  • Select the default subnet.

Image description

  • In the Service endpoints section choose Microsoft.Storage in the Services drop-down.
  • Do not make any other changes
  • Be sure to Save your changes

Image description

Image description

Image description

2- The storage account should only be accessed from the virtual network you just created. Learn more about using private storage endpoints..

  • Return to your files storage account.
  • In the Security + networking section, select the Networking blade

Image description

  • Change the Public network access to Enabled from selected virtual networks and IP addresses.

Image description

  • In the Virtual networks section, select Add existing virtual network.

Image description

  • Select your virtual network and subnet, select Add

Image description

Image description

  • Select the Storage browser and navigate to your file share.
  • Verify the message not authorized to perform this operation. You are not connecting from the virtual network.

Image description

Top comments (0)