How to view and change access tiers for blobs and file shares of your Azure storage account
Introduction
This will be a short documenting article where I demonstrate how to change the access tiers for blobs and file shares using Azure PowerShell
and Azure CLI
.
Content
- How to view the storage accounts performance SKU with
Azure PowerShell
andAzure CLI
- How to view and change the default blob access tier with
Azure PowerShell
andAzure CLI
- How to view and change the access tier for specific blobs with
Azure PowerShell
andAzure CLI
- How to view and change the access tier of a file share with
Azure PowerShell
andAzure CLI
View the storage account performance SKU
When creating a new storage account, you can choose between Standard
, which uses magnetic drives, and Performance
, which makes use of much faster SSD drives. This decision can't be changed after the account has been created.
🔎 A storage accounts performance SKU can't be changed after it got created!
To view the current SKU you can use Azure PowerShell...
... or Azure CLI...
Of course, you can find the information in the portal as well...
Blob Storage Access Tier
When uploading a block blob you can choose between Hot
, Cool
and the Archive
tier. If not explicitly set, the default is inferred from the setting that was made when creating the storage account. However, Archive
can only be set on the blob level and not on the account.
Changing the default blob access tier
To see which default access tier was set when the account was created:
To actually change the default access tier...
or alternatively use the Azure Portal
Changing the access tier of specific blobs
To change the access tier of a specific blob, you can first list them with az storage blob list
...
... and than change the tier with az storage blob set-tier
...
The same using Azure PowerShell
. To list the blobs and their access tiers
And than to change a specific blob use...
File Share Tier
When creating a share, you can choose between Premium
, Transaction Optimized
, Hot
, and Cool
tiers. Where Cool
is the cheapest and Premium
the most expensive tier. Let's have a quick look at when we should use which:
Cool
is optimized for online archive storage scenariosHot
is optimized for general-purpose file-sharing scenarios such as team shares and Azure File Sync.Transaction optimized
is great for applications that require file storage as a backend store. It enables transactions-heavy workloads that don't need premium-level latency.Premium
is best if you require the lowest possible latencies and is only available if your Storage Account is also of typePremium
(SSD-backed storage)
In case you went for the wrong tier, let's see how we can change it afterward.
Changing the access tier of a file share
First, to see the current access tier in use you can issue:
Get-AzRmStorageShare -ResourceGroupName <group> -StorageAccountName <account> -Name <share-name>
Then finally to change the access tier, we need to pipe the output to the Update-AzRmStorageShare
Cmdlet. In the following case, we are switching from TransactionOptimized
to Hot
.
Get-AzRmStorageShare -ResourceGroupName <group> -StorageAccountName <account> -Name <share> | Update-AzRmStorageShare -AccessTier Hot
Conclusion
That was a quick run down on how we change the access tiers of blobs and file shares to save money or change the configuration to better fit our requirements.
- Performance SKU of a storage account can't be changed after creation
- The
Archive
access tier can not be set as the default tier - Access tiers can be configured on individual blobs
- Creating a new file share defaults to
Transaction optimizied
, which is, for regular file sharing needs, too expensive. Go withHot
instead - To be able to use the
Premium
access tier on a file share, the storage account performance SKU must be ofPremium
as well
Thanks for reading and happy hacking 👨🏻💻