Provide shared file storage for the company offices



This content originally appeared on DEV Community and was authored by Isaiah Izibili

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.

select storage account

  • Select + Create.

select create

  • For Resource group select Create new. Give your resource group a name and select OK to save your changes.

Resource group

  • Provide a Storage account name. Ensure the name meets the naming requirements.

storage name

  • Set the Performance to Premium.

premium

  • Set the Premium account type to File shares.

file share

  • Set the Redundancy to Zone-redundant storage.

zone redundant

  • Select Review and then Create the storage account.

Review and create

Create

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

Resource

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.

file share

  • Select + File share and provide a Name.

share name

  • Review the other options, but take the defaults.

Review

  • Select Create

Create

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.

directory finance

  • Select Browse and then select the finance directory.

Browse

  • Notice you can Add directory to further organize your file share.
  • Upload a file of your choosing.

upload file

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.

Select file share

  • In the Operations section, select the Snapshots blade.

select snapshots blade

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

add snapshot comment optional

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

select snapshot and verify file directory

2. Practice using snapshots to restore a file.

  • Return to your file share.

return to file share

  • Browse to your file directory.

file directory

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

locate uploaded file

delete

  • Select the Snapshots blade and then select your snapshot.

confirm delete

  • Navigate to the file you want to restore,

file to restore

  • Select the file and the select Restore.

restore

  • Provide a Restored file name.

file name

  • Verify your file directory has the restored file.

verify file directory

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.

select virture network

  • Select Create. Select your resource group. and give the virtual network a name.

Select create

Give virtual network name

  • Take the defaults for other parameters, select Review + create, and then Create.

Review and create

create

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

Go to resource group

  • In the Settings section, select the Subnets blade.

select subnets blade

  • Select the default subnet.

select defaul subnet

  • In the Service endpoints section choose Microsoft.Storage in the Services drop-down.

microsoft storage

  • Do not make any other changes.
  • Be sure to Save your changes.

Review and save

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.

file storage

  • In the Security + networking section, select the Networking blade.

networking section

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

Enabled from selected virtual networks

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

add existing virtual network

  • Select your virtual network and subnet, select Add.

Select your virtual network and subnet

  • Be sure to Save your changes.

Save

  • 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.

verify


This content originally appeared on DEV Community and was authored by Isaiah Izibili