Optimizing Storage Costs with Azure Storage Blob Type Conversion
    • Dark
      Light
    • PDF

    Optimizing Storage Costs with Azure Storage Blob Type Conversion

    • Dark
      Light
    • PDF

    Article Summary

    #ServerlessTips - Azure Cost Management
    Author: Rahul Rai Microsoft MVP

    Azure Storage supports blob-type conversion, allowing users to manage their storage costs more effectively. This feature enables users to convert append and page blobs to block blobs and move them into more cost-efficient access tiers based on usage patterns. You can read more about the blob access tiers in the Microsoft guide on Azure blobs.

    Azure Storage offers three access tiers: hot, cool, and archive. These tiers are designed to help users store their blob data most cost-effectively based on how it’s used. However, Azure Storage access tiers only support block blobs natively. With the new type conversion feature, users can now convert append and page blobs to block blobs and move them into the most cost-efficient tiers.

    The conversion can be done using PowerShell, AZ CLI, or the AzCopy utility. Here’s an example of how you can convert a page blob to a block blob and change its access tier using PowerShell:

    # Set context 
    
    $context = New-AzureStorageContext -StorageAccountName "mystorageaccount" -StorageAccountKey "mykey" 
    
    # Convert page blob to block blob 
    ConvertTo-AzureStorageBlob -Context $context -Container "mycontainer" -Blob "mypageblob.vhd" -DestBlobType BlockBlob 
    
    # Set blob tier 
    Set-AzureStorageBlobTier -Context $context -Container "mycontainer" -Blob "mypageblob.vhd" -Tier Cool 
    
    

    Read the following blog to know more different ways of Azure Storage cost optimization.

    MicrosoftTeams-image 491


    Was this article helpful?