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.
Pioneers in Cloud Consulting & Migration Services
- Reduced infrastructural costs
- Accelerated application deployment
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.
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
- Open the Azure portal.
- Locate the Storage Account:
- Go to “Storage accounts” and select the storage account that contains the Azure Block Blob.
Generate SAS Token
3. Navigate to the container that holds the block blob.
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
- Open the Azure portal.
- 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.
- Make a copy of the SAS token after choosing “Generate SAS”.
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.
1 |
azcopy copy "https://<source-storage-account>.blob.core.windows.net/<source-container>/<source-blob>?<source-sas-token>" "https://<destination-storage-account>.blob.core.windows.net/<destination-container>/<destination-blob>?<destination-sas-token>" --blob-type PageBlob |
Run the Command
Run the above command in the Azure Cloud Shell or your local terminal configured with Azure CLI.
1 |
azcopy copy "https://mystorageaccount.blob.core.windows.net/mycontainer/myblockblob?<source-sas-token>""https://mystorageaccount.blob.core.windows.net/mycontainer/mypageblob?<destination-sas-token>" --blob-type PageBlob |
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.
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
- In the Azure interface, navigate to “Disks” and select “Create”.
Fill Disk Details
- Enter the following details:
- Subscription
- Resource Group
- Disk Name
- Region
Source Type
3. Select “Storage blob” and paste the SAS URL of the Azure Page Blob or browse the disk location in the container.
Finalize Creation
- Configure size and performance options.
- Click “Review + create”.
- Click “Create”.
Conclusion
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
About CloudThat
CloudThat is an award-winning company and the first in India to offer cloud training and consulting services worldwide. As a Microsoft Solutions Partner, AWS Advanced Tier Training Partner, and Google Cloud Platform Partner, CloudThat has empowered over 850,000 professionals through 600+ cloud certifications winning global recognition for its training excellence including 20 MCT Trainers in Microsoft’s Global Top 100 and an impressive 12 awards in the last 8 years. CloudThat specializes in Cloud Migration, Data Platforms, DevOps, IoT, and cutting-edge technologies like Gen AI & AI/ML. It has delivered over 500 consulting projects for 250+ organizations in 30+ countries as it continues to empower professionals and enterprises to thrive in the digital-first world.
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.
Comments