DEV Community

Cover image for DEMYSTIFYING AZURE DISKS: FROM CREATION TO INITIALIZATION
Temiloluwa Adediji
Temiloluwa Adediji

Posted on

DEMYSTIFYING AZURE DISKS: FROM CREATION TO INITIALIZATION

In Azure, Virtual Machines (VMs) utilize three types of disks. These are OS disks, Temporary disks and Data disks. Let's discuss the differences between them in detail.

Image description

1. OS Disks

This is the disk on which the operating system (OS) of the VM is domiciled. It contains the system files and other dependency files required for the OS to run.
OS disks are persistent and retain their data even when the VM is stopped. The size of the OS disk depends on the VM size and the OS disk size limit.

2. Temporary Disks

Temporary disks are also known as local temporary storage or ephemeral disks. They provide short-term storage for temporary data and are not persistent.
They are created when the VM is started. They offer high-speed local storage, making them suitable for temporary caching and intermediate data processing. However, when a VM is stopped, data stored on temporary disks is lost making them unsuitable for storing critical or persistent data.

3. Data Disks

Data disks are additional disks attached to a VM. They used for storing user data, application files, databases and any other data that needs to persist beyond the lifetime of the VM.
Like OS disks, data disks are managed as Managed Disks, providing features such as redundancy, backups and simplified management.
They provide scalability as multiple data disks can be attached to a VM to increase storage capacity and performance.

HOW TO CREATE A DATA DISK

1) Sign in to azure and navigate to your VM landing page

Image description

2) On the left pane of your VM landing page, locate settings and select 'Disks'

Image description

3) Under the Data Disk category, click on 'Create and attach a new disk'. Notice that a new entry is created.

Image description

4) Go on to give your disk a name and select a storage type. You can maintain other field as default value.

Image description

5) Apply changes and wait a minute for creation.

Image description

Thumbs Up! You just created a Data Disk!!

Image description

INITIALIZING A DATA DISK

When you create a data disk and attach it to a VM in Azure, the disk is initially raw and needs to be initialized and formatted before it can be used to store data. Initializing and formatting the data disk prepares it for use by creating a file system and partition table on the disk.

1) In your windows VM, go to File Explorer > This PC to view the available disk on the VM. Notice that although, you have added a data disc to your VM in azure, it is not visible yet.

Image description

2) Right click on the windows icon and select 'Disk Management'

Image description

3) Click 'ok' on the pop up to initialize disk

Image description

4) Scroll down and locate the newly created disk. Right click and select 'New Simple Volume...'

Image description

5) Click on 'Next'.

Image description

6) Assign a letter to to your drive and click on 'Next'. This takes you to the Format page

Image description

7) Give your drive a name, maintain the default format settings and click on 'Next'

Image description

8) Click on 'Finish' to complete the process

Image description

9) Return to File Explorer > This PC to see your newly added disk.

Image description

Creating and initializing a data disk on Azure is a straightforward process that allows you to expand storage capacity and meet the data storage needs of your virtual machines. By following the steps outlined in this guide, you can attach a data disk to your Azure VM and initialize it for use in just a few simple steps.

Thank you for reading this guide on creating and initializing a data disk on Azure. I hope you found it helpful in your journey with Azure virtual machines and storage.

Temiloluwa Adediji

Top comments (0)