DEV Community

Cover image for Setting up Azure shared file storage for a department in a Company
Stephen Onyewuchi
Stephen Onyewuchi

Posted on

Setting up Azure shared file storage for a department in a Company

Table of contents

Step 1- Create and configure a storage account for Azure Files.

1. Create a storage account for the finance department’s shared files.

  • In the portal, search for and select Storage accounts.

2024-10-29_22h31_01

  • Select + Create.

2024-10-29_22h34_07

  • 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.
  • Set the Premium account type to File shares.
  • Set the Redundancy to Zone-redundant storage.
  • Select Review and then Create the storage account.

2024-10-29_22h41_12

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

2024-10-29_22h52_46

Step 2- 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.

2024-10-29_22h56_21

  • Select + File share and provide a Name.
  • Review the other options but take the defaults.

2024-10-29_23h29_30

  • Select Review + 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.
  • Select Browse and then select the finance directory.
  • Notice you can Add directory to further organize your file share.

2024-10-29_23h33_34

  • Upload a file of your choosing.

2024-10-29_23h39_59

Step 3- 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.
  • Select + Add snapshot. The comment is optional. Select OK.

2024-10-29_23h44_53

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

2. Practice using snapshots to restore a file.

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

2024-10-29_23h49_11

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

2024-10-29_23h57_35

  • Provide a Restored file name.

2024-10-29_23h56_28

  • Verify your file directory has the restored file.

2024-10-30_00h01_50

Step 4- 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.

2024-10-30_07h37_17

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

2024-10-30_07h40_54

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

2024-10-30_07h46_28

  • Select Go to resource.

2024-10-30_07h51_17

  • In the Settings section, select the Subnets blade.
  • Select the default subnet.
  • In the Service endpoints section choose Microsoft.Storage in the Services drop-down.
  • Do not make any other changes.

2024-10-30_08h02_53

  • Be sure to Save your changes.

2. The storage account should only be accessed from the virtual network you just created.

  • Return to your files storage account.
  • In the Security + networking section, select the Networking blade.
  • Change the Public network access to Enabled from selected virtual networks and IP addresses.
  • In the Virtual networks section, select Add existing virtual network.

2024-10-30_08h11_16

  • Select your virtual network and subnet, select Enable, then Add.
  • Be sure to Save your changes.
  • Select the Storage browser and navigate to your file share.

2024-10-30_08h26_31

  • Verify the message not authorized to perform this operation. You are not connecting from the virtual network.

Back to top

Top comments (2)

Collapse
 
realcloudprojects profile image
Skill Schule

nice!

Collapse
 
sconstephen profile image
Stephen Onyewuchi

Thank you sir