Manage Storage Accounts in Azure Stack

Learn how to manage storage accounts in Azure Stack to create, find, recover, and reclaim storage capacity based on business needs.

LAB : Azure Stack – Manage Storage Accounts in Azure Stack

Exercise 1 : Create a storage account

Storage accounts include Blob and Table services, and the unique namespace for your​​ storage data objects. By default, the data in your account is available only to you, the storage account owner.

Username :​​ azurestackadmin@azurestack.local

Password : Pa55w.rd1234

  • Click​​ New​​ >​​ Data + Storage​​ >​​ Storage account.
  • In the​​ Create storage account​​ blade, type a name for​​ your storage account. Create a new​​ Resource Group, or select an existing one, then click​​ Create​​ to create the storage account.
  • To see your new storage account, click​​ All resources, then search for the storage account and click its name.


Exercise 2 :​​ Find a storage account

The list of storage accounts in the region can be viewed in Azure Stack by:

Username :​​ azurestackadmin@azurestack.local

Password : Pa55w.rd1234

  • On the default dashboard – find the​​ Region management​​ list and click the region you want to explore. For example​​ (local).
  • Select​​ Storage​​ from the​​ Resource Providers​​ list.
  • Now, on the storage Resource Provider administrator blade – scroll down to the​​ Storage accounts​​ tab and click it.
  • The resulting page is the list of storage accounts in that region.

By default, the first 10 accounts are displayed. You can choose to fetch more by clicking the​​ Load more​​ link at the bottom of the list.

  • If you are interested in a particular storage account – you can​​ filter and fetch the relevant accounts​​ only:

Click​​ Filter​​ at the top of the blade.

On the Filter blade, it allows you to specify​​ account name,​​ subscription ID​​ or​​ status​​ to fine-tune the list of storage accounts to be displayed. Use them as appropriate.​​ 

Click​​ Update. The list should refresh accordingly.

  • To reset the​​ filter: click​​ Filter, clear out the selections and update.
  • The search text box (on the top of the storage accounts list blade) lets you highlight the selected text in the list of accounts. This is really handy in the case when the full name or id is not easily available.

You can use free text here to help find the account you are interested in.

  • Once you have located the accounts you are interested in viewing, you can click the particular account to view certain details. A new blade opens with the account​​ details such as: the type of the account, creation time, location, etc.

Exercise 3 :​​ Recover a deleted account

  • Browse to the storage accounts list.
  • Locate that particular account in the list. You may need to filter.
  • Check the​​ state​​ of the account. It​​ should say​​ Deleted.
  • Click the account which opens the account details blade.
  • On top of this blade, locate the​​ Recover​​ button and click it.​​ 

Click​​ Yes​​ to confirm.

  • The recovery is now in​​ process…wait​​ for an indication that it was successful. You can also click the “bell” icon at the top of the portal to view progress indications.

Once the recovered account is successfully synchronized, it can be used again.

Some Gotchas

  • Your deleted account shows state as​​ out of retention.

This means that the deleted account has exceeded the retention period and may not be recoverable.

  • Your deleted account does not show in the accounts list.

This could mean that the deleted account has already been garbage collected. In this case it cannot be recovered.​​ 

Exercise 4 :​​ Set the retention period

The retention period setting allows a cloud operator to specify a time period in days (between 0 and 9999 days) during which any deleted account can potentially be recovered.​​ 

The​​ default retention period​​ is set to​​ 15 days.​​ 

Setting the value to “0” means that any deleted account is immediately out of retention and marked for periodic garbage collection.

  • In to the Azure Stack administration portal, on the default dashboard – find the​​ Region management​​ list and click the region​​ you want to explore – for example​​ (local).
  • Select​​ Storage​​ from the​​ Resource Providers​​ list.
  • Now, on the Storage Resource Provider administrator blade – scroll down to the​​ Configuration​​ tab and click it. ​​ 
  • Edit the retention period value. Set the number of​​ days and then save it.

This value is immediately effective and is set for your entire region.

Exercise 5 : Reclaim capacity

One of the side effects of having a retention period is that a deleted account continues to consume capacity until it comes out​​ of the retention period.​​ 

As a cloud operator, you may need a way to reclaim the deleted account space even though the retention period has not yet expired.

You can reclaim capacity using either the portal or PowerShell.

Task 1 : To reclaim capacity using the portal:

  • Navigate to the storage accounts blade.
  • Click​​ Reclaim space​​ at the top of the blade.

Read the message and then click​​ OK.

  • Wait for success notification See the bell icon on the portal.
  • Refresh the Storage accounts page. The deleted​​ accounts are no longer shown in the list because they have been purged.

Task 2 : To reclaim capacity using PowerShell:

  • Confirm that you have Azure PowerShell installed and configured.
  • Run the following cmdlet:


If you run this cmdlet you​​ permanently delete the account and its contents. It is not recoverable. Use this with care.

Clear-ACSStorageAccount -ResourceGroupName system.local -FarmName <farm ID>

Exercise 6 : Migrate a container

Due to uneven storage use by tenants, an cloud​​ operator may find one or more underlying tenant shares using more space than others. If this occurs, the cloud operator can attempt to free up some space on the stressed share by manually migrating some blob containers to another share.

You must use PowerShell to migrate containers.


Blob container migration does not support live migration and currently is an offline operation. During migration and until it is complete the underlying blobs in that container cannot be used and are “offline”.

Task 1 : To migrate containers using PowerShell

  • Confirm that you have Azure PowerShell installed and configured.​​ 
  • Get the farm name:

$farm = Get-ACSFarm -ResourceGroupName system.local

  • Get the shares:

$shares = Get-ACSShare -ResourceGroupName system.local -FarmName​​ $farm.FarmName

  • Get the containers for a given share. Note that count and intent are optional parameters:

$containers = Get-ACSContainer -ResourceGroupName system.local -FarmName $farm.FarmName -ShareName $shares[0].ShareName -Count 4 -Intent Migration

  • Then​​ examine $containers:


  • Get the best destination shares for the container migration:

$destinationshares= Get-ACSSharesForMigration -ResourceGroupName system.local -FarmName $farm.farmname – SourceShareName $shares[0].ShareName

  • Then examine $destinationshares:


  • Kick off migration for a container, notice this is an async implementation, so one can loop all containers in a share and track the status using the returned job id.

$jobId = Start-ACSContainerMigration​​ -ResourceGroupName system.local -FarmName $farm.farmname – ContainerToMigrate $containers[1] -DestinationShareUncPath $destinationshares.UncPath

  • Then examine $jobId:


  • Check status of the migration job by its job id. When the container migration finishes, MigrationStatus is set to “Completed”.

Get-ACSContainerMigrationStatus -ResourceGroupName system.local -FarmName $farm.farmname -JobId $jobId

  • You can cancel an in-progress migration job. This again is an async operation and can be tracked using​​ $jobid:

Stop-ACSContainerMigration-ResourceGroupName system.local -FarmName $farm.farmname -JobId $jobId-Verbose

  • You can check the status of the cancelled migration:

Get-ACSContainerMigrationStatus-ResourceGroupName system.local -FarmName $farm.farmname​​ -JobId $jobId