Azure, Cloud Computing

4 Mins Read

A Guide to Convert Block Blob to Page Blob in Azure

Voiced by Amazon Polly

Overview

This guide provides a comprehensive walkthrough for converting the Azure Block Blob to Azure Page Blob in Azure and subsequently creating a managed disk from the Azure Page Blob. Understanding how to manipulate Azure Storage Blobs efficiently is essential for optimizing your storage and performance needs, especially in scenarios involving virtual machine disks and high-performance applications.

Introduction

In this guide, we will walk you through converting Azure Block Blob to Azure Page Blob in Azure and then creating a disk from the Azure Page Blob. Azure Storage Blobs are an essential part of Microsoft Azure’s storage offerings, and knowing how to manipulate them effectively can be crucial for optimizing your storage and performance needs.

Pioneers in Cloud Consulting & Migration Services

  • Reduced infrastructural costs
  • Accelerated application deployment
Get Started

Understanding the Basics

Before we dive into the step-by-step guide, it’s important to understand the difference between Block Blobs and Page Blobs:

  • Azure Block Blobs: These are perfect for holding binary and text data, like media files and documents. They are optimized for sequential read and write operations.
  • Azure Page Blobs: These are optimized for read and write for various tasks. They are ideal for scenarios like virtual machine disks requiring high performance and random access.

Step-by-Step Guide

Step 1: Generate SAS Token for Source Block Blob

A Shared Access Signature (SAS) token provides secure, delegated access to resources in your storage account. We will generate a SAS token for the source Block Blob.

Navigate to the Azure Portal

  1. Open the Azure portal.
  2. Locate the Storage Account:
    • Go to “Storage accounts” and select the storage account that contains the Azure Block Blob.

step1

Generate SAS Token

3. Navigate to the container that holds the block blob.

step1b

4. Select the block blob you wish to convert.

5. In the settings, select “Shared access signature”.

6. Set the necessary permissions (Read, Write, Create, Delete, List, Add) and expiry time.

7. Make a copy of the SAS token after choosing “Generate SAS”.

Step 2: Generate SAS Token for Destination Page Blob

We need to generate a SAS token for the destination Azure Page Blob. The steps are very similar to those for the source Azure Block Blob.

Navigate to the Azure Portal

  1. Open the Azure portal.
  2. Locate the Storage Account:
    • Go to “Storage accounts” and select the storage account where you want to store the page blob.

Generate SAS Token

3. Navigate to the target container.

4. Click on “Shared access signature”.

5. Set the necessary permissions (Read, Write, Create, Delete, List, Add) and expiry time.

step2

  1. Make a copy of the SAS token after choosing “Generate SAS”.

step2b

Step 3: Execute the AzCopy Command to Convert Block Blob to Page Blob

AzCopy is a command-line utility that copies data to and from Azure Storage. We will use AzCopy to convert the Azure Block Blob to Azure Page Blob.

Prepare the Command

Replace the placeholders with the actual values:

  • <source-storage-account>: The source storage account name.
  • <source-container>: The source container name.
  • <source-blob>: The source blob name.
  • <source-sas-token>: The source’s SAS token was created.
  • <destination-storage-account>: The destination storage account name.
  • <destination-container>: The destination container name.
  • <destination-blob>: The destination blob name.
  • <destination-sas-token>: For the destination, the SAS token.

Run the Command

Run the above command in the Azure Cloud Shell or your local terminal configured with Azure CLI.

step3

Step 4: Verify the Conversion

After running the command, navigate to the destination container in the Azure portal and verify that the Azure Page Blob has been created.

step4

Step 5: Create a Disk from the Azure Page Blob

Now that you have Azure Page Blob, you can create a disk. This is particularly useful for scenarios like virtual machine disks.

Navigate to Disks

  1. In the Azure interface, navigate to “Disks” and select “Create”.

Fill Disk Details

  1. Enter the following details:
    • Subscription
    • Resource Group
    • Disk Name
    • Region

step5

Source Type

3. Select “Storage blob” and paste the SAS URL of the Azure Page Blob or browse the disk location in the container.

step5b

Finalize Creation

  1. Configure size and performance options.
  2. Click “Review + create”.
  3. Click “Create”.

Conclusion

Converting Azure Block Blobs to Azure Page Blobs and creating disks from them can be a powerful way to manage your storage needs in Azure.

This guide has walked you through the process step-by-step, from generating SAS tokens to verifying the conversion and creating a disk. With these skills, you’ll be better equipped to handle various storage scenarios in Azure, ensuring optimal performance and efficiency for your applications.

Drop a query if you have any questions regarding Azure Block Blobs and we will get back to you quickly.

Empowering organizations to become ‘data driven’ enterprises with our Cloud experts.

  • Reduced infrastructure costs
  • Timely data-driven decisions
Get Started

About CloudThat

CloudThat is a leading provider of Cloud Training and Consulting services with a global presence in India, the USA, Asia, Europe, and Africa. Specializing in AWS, Microsoft Azure, GCP, VMware, Databricks, and more, the company serves mid-market and enterprise clients, offering comprehensive expertise in Cloud Migration, Data Platforms, DevOps, IoT, AI/ML, and more.

CloudThat is the first Indian Company to win the prestigious Microsoft Partner 2024 Award and is recognized as a top-tier partner with AWS and Microsoft, including the prestigious ‘Think Big’ partner award from AWS and the Microsoft Superstars FY 2023 award in Asia & India. Having trained 650k+ professionals in 500+ cloud certifications and completed 300+ consulting projects globally, CloudThat is an official AWS Advanced Consulting Partner, Microsoft Gold Partner, AWS Training PartnerAWS Migration PartnerAWS Data and Analytics PartnerAWS DevOps Competency PartnerAWS GenAI Competency PartnerAmazon QuickSight Service Delivery PartnerAmazon EKS Service Delivery Partner, AWS Microsoft Workload PartnersAmazon EC2 Service Delivery PartnerAmazon ECS Service Delivery PartnerAWS Glue Service Delivery PartnerAmazon Redshift Service Delivery PartnerAWS Control Tower Service Delivery PartnerAWS WAF Service Delivery Partner and many more.

To get started, go through our Consultancy page and Managed Services PackageCloudThat’s offerings.

FAQs

1. What is the main difference between Azure Block Blobs and Azure Page Blobs in Azure?

ANS: –

  • Azure Block Blobs are optimized for storing text and binary data and are ideal for sequential read and write operations, making them suitable for documents and media files.
  • Azure Page Blobs are used in applications that require high performance and random access, such as virtual machine disks.

2. Why must I generate a Shared Access Signature (SAS) token?

ANS: – Your storage account’s resources can be accessed securely and with delegation using a SAS token. It allows you to grant specific permissions (such as read, write, create, delete, list, and add) for a set duration without exposing your storage account keys.

WRITTEN BY Shaikh Mohammed Fariyaj Najam

Mohammed Fariyaj Shaikh works as a Research Associate at CloudThat. He has strong analytical thinking and problem-solving skills, knowledge of AWS Cloud Services, migration, infrastructure setup, and security, as well as the ability to adopt new technology and learn quickly.

Share

Comments

    Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!