DEV Community

Cover image for Provide shared file storage for the company offices
Oluwasegun Michael Adesiyan
Oluwasegun Michael Adesiyan

Posted on

Provide shared file storage for the company offices

Here we move from blob storage(bucket of files) to Azure Files (shared folders/office storage for company offices) which act like a shared network drive that employees in different offices can access, but it lives in the cloud.

Employees can connect to it using familiar tools (Windows Explorer, macOS Finder, or Linux mounts) via the SMB protocol (the same one used for shared folders in offices).

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

  • Select + Create.
    create

  • For Resource group select Create new. Give your resource group a name, RG-FinanceFiles , and select OK to save your changes.
    create new
    New Resource group created
    resource group

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

  • Set the Performance to Premium.
    premium

  • Set the Premium account type to File shares.
    file share

  • Set the Redundancy to Zone-redundant storage.(This ensures copies are spread across zones in the same region for resilience)
    zone

  • Select Review and then Create the storage account. (Premium + ZRS ensures fast, reliable access for employees across offices.)
    review

validation

create

  • Wait for the resource to deploy.

  • Select Go to resource.
    Go to resource

Create and configure a file share with directory.

  1. Create a file share for the corporate office.
  • In the storage account, in the Data storage section, select the File shares blade.
    file share

  • Select + File share and provide a Name. ,corporate-share
    select

named

  • Review the other options, but take the defaults.
    defaults

  • Select Create
    (_This is the shared folder employees will connect to.
    _)
    create

create

  1. Add a directory to the file share for the finance department. For future testing, upload a file.
  • Select your file share (corporate-share). and select + Add directory.
    add dir

  • Name the new directory finance.
    finance

  • Select Browse and then select the **finance **directory.
    browse
    fin dir

  • Notice you can Add directory to further organize your file share.
    add dir

  • Upload a file of your choosing.
    (Directories help organize files by department (Finance, HR, etc.).
    upload

upload

Configure and test snapshots.

Snapshots = point-in-time copies of the file share.
Protects against accidental deletion.
Lets you restore files later.

  1. Similar to blob storage, you need to protect against accidental deletion of files. You decide to use snapshots.
  • Select your file share.
    file

  • In the Operations section, select the Snapshots blade.
    snapshot

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

  • Select OK.
    ok

  • Select your snapshot and verify your file directory and uploaded file are included.
    Snapshots = safety net for shared files.
    snapshot

file dir

  1. Practice using snapshots to restore a file.
  • Return to your file share.
    file share

  • Browse to your file directory.
    browse

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

delete

deleted

  • Select the Snapshots blade and then select your snapshot.
    snapshot

  • Navigate to the file you want to restore,
    file

  • Select the file and the select Restore.
    restore<br>

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

Restored file name

Configure restricting storage access to selected virtual networks.

For security, you can limit access so only employees inside the company’s network can connect.

  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.
    Virtual networks

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

create

  • Wait for the resource to deploy.

  • Select Go to resource.
    Go to resource

    • In the Settings section, select the **Subnets **blade. subnets
  • Select the **default **subnet.

    default

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

    Microsoft.Storage

  • Do not make any other changes.

    changes

  • Be sure to Save your changes.

    add

add

  1. The storage account should only be accessed from the virtual network you just created.
  • Return to your files storage account
    files storage account

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

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

save

ip

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

  • Select your virtual network and subnet, select Add.
    Add

  • Be sure to Save your changes.
    save

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

This ensures only employees inside the corporate network can access the file share.

Azure Files = cloud-based shared folders accessible via SMB/NFS.
Premium File Shares = fast performance for office workloads.
Snapshots = protect against accidental deletion.
Virtual Network restrictions = secure access only for employees

Top comments (0)