Prev Next

Cloud / Azure Disk Storage Interview questions

Last updated

1. What is Azure Disk Storage? 2. What is an Azure managed disk? 3. What are the types of Azure managed disks? 4. What is an OS disk in Azure? 5. What is a data disk in Azure? 6. What is the temporary disk in an Azure VM? 7. What is Azure Ultra Disk? 8. What is Azure Premium SSD v2? 9. What is Azure Premium SSD? 10. What is Azure Standard SSD? 11. What is Azure Standard HDD? 12. What is host caching in Azure disks? 13. What are Azure disk snapshots? 14. What is an incremental snapshot in Azure? 15. What is server-side encryption for Azure managed disks? 16. What is a disk encryption set in Azure? 17. What is the purpose of disk bursting? 18. How do you resize an Azure managed disk? 19. What is a shared disk in Azure? 20. What is an ephemeral OS disk in Azure? 21. What is the difference between managed and unmanaged disks? 22. What is the difference between Premium SSD and Premium SSD v2? 23. What is the difference between Ultra Disk and Premium SSD v2? 24. How do you choose the right Azure disk type? 25. How does host caching work for Azure disks? 26. Why does VM size matter for Azure disk performance? 27. How do you stripe multiple disks for higher performance? 28. How do you create and restore a disk from a snapshot? 29. When should you use zone-redundant storage (ZRS) disks? 30. How does Azure Backup protect managed disks? 31. What is the difference between Azure Disk Encryption and encryption at host? 32. How do you secure managed disk export and network access? 33. How can you monitor Azure disk performance? 34. What is the difference between Azure disks, Azure Files and Blob storage? 35. How does the Azure Disk CSI driver work in AKS? 36. How do you change the SKU of an existing managed disk? 37. How are Azure managed disks billed? 38. How do you troubleshoot slow disk performance on an Azure VM? 39. What is the difference between credit-based and on-demand disk bursting? 40. Explain the internal working of Azure managed disk storage? 41. Explain the lifecycle of an Azure managed disk? 42. How does throttling work at the disk and VM level? 43. How do you design a highly available shared-disk cluster in Azure? 44. How would you optimize SQL Server storage on Azure VMs? 45. How do you migrate an on-premises VHD to an Azure managed disk? 46. What happens to managed disks when a VM is deallocated or deleted? 47. Why is Premium SSD v2 often cheaper than Premium SSD for databases? 48. How would you design disaster recovery for managed disks? 49. How can you rotate customer-managed disk keys without downtime? 50. Which is better and why: managed disks or Elastic SAN?

1. What is Azure Disk Storage?

Azure Disk Storage provides block-level storage volumes for Azure virtual machines. A disk behaves like the physical drive in an on-premises server, except the platform handles placement, replication and scaling for you.

Disks are exposed to the VM as raw block devices. They hold the operating system, application data, logs and databases, and they stay durable even if the VM is stopped or moved to another host.

Under the hood each managed disk is stored with multiple synchronous copies (three within one datacenter for LRS, or across zones for ZRS).

Take quiz
Azure Disk Storage is best described as:
An object store for unstructured blobs
A message queue for VM events
A managed SMB file share service
Block-level storage volumes for Azure VMs
Where is an Azure VM's operating system normally stored?
On a managed OS disk
Only on the temporary disk
In Azure Table storage
In Azure Key Vault

2. What is an Azure managed disk?

A managed disk is an Azure resource (Microsoft.Compute/disks) where you pick only the disk type and size. Azure creates and manages the underlying storage, so there is no storage account for you to plan, throttle or secure.

  • Supports RBAC, tags and Azure Policy on the disk itself
  • Works with availability zones and availability sets
  • Integrates with snapshots, images, Azure Backup and encryption sets

Unmanaged disks (VHDs in your own storage account) were retired on September 30, 2025, so new designs should always use managed disks.

Take quiz
What do you specify when creating a managed disk?
The storage account name and container
The disk type and size
The VHD file path
The page blob URI
Which benefit do managed disks have over unmanaged disks?
Disks are never billed
Disks can store block blobs
No storage account to plan or throttle
The VM gets more RAM

3. What are the types of Azure managed disks?

Azure offers five managed disk types, ordered roughly from highest to lowest performance:

Disk type Backed by Typical use
Ultra Disk SSD Tier-0 databases, very high IOPS and low latency
Premium SSD v2 SSD Production databases needing tunable IOPS and throughput
Premium SSD SSD General production workloads, OS disks
Standard SSD SSD Web servers, light apps, dev/test
Standard HDD HDD Backups, rarely accessed data

Only Premium SSD, Standard SSD and Standard HDD can be used as OS disks.

Pick the type from measured IOPS and latency needs, not by defaulting to the fastest one. Ultra Disk and Premium SSD v2 are also zonal, so the VM must sit in the same zone.

Take quiz
Which managed disk type is HDD-backed?
Standard HDD
Premium SSD
Standard SSD
Ultra Disk
Which type targets the most demanding, latency-sensitive workloads?
Standard SSD
Ultra Disk
Standard HDD
Premium SSD

4. What is an OS disk in Azure?

The OS disk holds the boot volume of a VM. It is created from a marketplace image, a custom image or a snapshot and shows up as C: on Windows or the root device on Linux.

It can be Premium SSD, Standard SSD or Standard HDD. Ultra Disk and Premium SSD v2 cannot be used as OS disks. The default host caching setting for an OS disk is ReadWrite.

If the VM is stateless you can place the OS disk on local storage instead, using an ephemeral OS disk.

Take quiz
Which disk types cannot be used as an OS disk?
Standard HDD only
Only Standard SSD
Ultra Disk and Premium SSD v2
Premium SSD and Standard SSD
What is the default host caching for an OS disk?
ReadOnly
None
WriteOnly
ReadWrite

5. What is a data disk in Azure?

A data disk is an additional managed disk attached to a VM to store application data, database files or logs. How many you can attach depends on the VM size, and each disk can be up to 32 TiB (64 TiB for Ultra and Premium SSD v2).

A new data disk arrives as an unformatted device. Inside the guest you must initialize it, create a partition, format it and mount it. The default host caching for data disks is None.

az vm disk attach --resource-group rg-app --vm-name vm01 --name data01 --new --size-gb 512 --sku Premium_LRS

Take quiz
After attaching a new data disk to a Linux VM, what must you do first?
Partition, format and mount it
Nothing, it mounts automatically
Convert it into an OS disk
Restart the storage account
What limits how many data disks a VM can have?
The resource group name
The VM size
The number of snapshots
The Key Vault tier

6. What is the temporary disk in an Azure VM?

The temporary disk is local storage on the physical host. It appears as D: on Windows and /dev/sdb (mounted at /mnt) on Linux. Not every VM size has one.

Its contents are not persistent. Data can be lost when the VM is redeployed, resized, or moved to another host after a failure. Because it is local it is fast, so it suits page files and scratch data.

Never keep your only copy of important data there, and note that Azure Backup does not cover it.

Take quiz
Which is a safe use of the temporary disk?
Storing the only copy of a database
Storing encryption keys
Holding the sole backups
Page file or scratch data
When can temporary disk contents be lost?
When the VM is redeployed or moved to another host
Never
Only when the resource group is deleted
Only when the VM name changes

7. What is Azure Ultra Disk?

Ultra Disk is the highest-performance managed disk, built for latency-sensitive tier-0 workloads such as SAP HANA and large transactional databases. It scales to 64 TiB, 400,000 IOPS and 10,000 MB/s per disk with sub-millisecond latency.

Capacity, IOPS and throughput are set independently, and you can change IOPS and throughput on a running disk without detaching it.

  • Data disk only, never an OS disk
  • Host caching is not supported
  • Available only in selected regions and zones (create it with a zone)
Take quiz
What can Ultra Disk adjust independently of capacity?
OS image
IOPS and throughput
Region and zone
Encryption algorithm
What is the host caching support for Ultra Disk?
ReadWrite only
ReadOnly only
Not supported
Always on

8. What is Azure Premium SSD v2?

Premium SSD v2 lets you provision capacity, IOPS and throughput separately instead of buying a fixed size tier. Capacity can be set in 1 GiB steps up to 64 TiB, with up to 80,000 IOPS and 1,200 MB/s per disk.

Every disk includes a free baseline of 3,000 IOPS and 125 MB/s. You pay extra only for what you add beyond that.

Limitations: data disk only, no host caching, and the disk is zonal, so it must be created in the same zone as its VM.

Take quiz
What baseline does Premium SSD v2 include at no extra cost?
400,000 IOPS and 10,000 MB/s
No baseline at all
120 IOPS and 25 MB/s
3,000 IOPS and 125 MB/s
How is Premium SSD v2 capacity chosen?
Any size in 1 GiB steps
Only fixed P-tier sizes
It grows automatically with data
Only multiples of 1 TiB

9. What is Azure Premium SSD?

Premium SSD is the standard choice for production workloads and boot volumes. It comes in fixed size tiers from P1 (4 GiB) to P80 (32 TiB), and IOPS and throughput are tied to the tier you choose.

Tier Size Max IOPS Max throughput
P10 128 GiB 500 100 MB/s
P20 512 GiB 2,300 150 MB/s
P30 1 TiB 5,000 200 MB/s
P40 2 TiB 7,500 250 MB/s

It supports OS disks, host caching, shared disks, zone-redundant storage and bursting.

Pick the smallest tier that meets your IOPS and throughput target, because you are billed for the full tier, not for the data stored.

Take quiz
In Premium SSD, performance is determined by:
The number of snapshots
The blob container name
The provisioned size tier (P-tier)
The VM image used
Which is a valid Premium SSD size tier?
H30
Z30
U30
P30

10. What is Azure Standard SSD?

Standard SSD is a low-cost SSD option for workloads that need steadier latency than HDD but not high IOPS. Typical fits are web servers, dev/test environments and lightly used enterprise applications.

Sizes follow the E-series naming (E1 to E80). It can be used as an OS disk and supports zone-redundant storage.

It is not designed for IOPS-hungry production databases; move those to Premium SSD, Premium SSD v2 or Ultra Disk.

Compared with Standard HDD it gives lower and more consistent latency for a modest price increase, which makes it the usual first upgrade for a dev/test VM that feels sluggish. Billing is by tier plus storage transactions.

Take quiz
Which workload suits Standard SSD best?
Web servers and dev/test
Tier-0 transactional databases
Petabyte-scale archives
SAP HANA log volumes
How are Standard SSD size tiers named?
U-tiers
E-tiers such as E10
S-tiers only
Q-tiers

11. What is Azure Standard HDD?

Standard HDD is the cheapest managed disk, backed by magnetic drives. It fits backups, infrequently accessed data and non-critical dev/test machines where latency is not a concern.

Tiers use the S-series naming (S4 to S80). Latency is higher and more variable than SSD, and besides the tier price you are also charged per storage transaction.

Avoid it for databases or any interactive, latency-sensitive workload.

It also suits lab VMs that sit idle most of the time, or restored copies you only keep for a short while. If a workload on Standard HDD feels slow, moving it to Standard SSD is usually the cheapest first fix.

Take quiz
Which workload suits Standard HDD?
Interactive trading systems
Boot volume of a real-time system
Infrequently accessed backup data
Latency-sensitive OLTP
What distinguishes Standard HDD from the SSD options?
A provisioned IOPS slider
400,000 IOPS per disk
Sub-millisecond latency
Higher and more variable latency

12. What is host caching in Azure disks?

Host caching lets the VM's host keep recently used blocks in memory and local SSD, so repeated reads do not travel to remote storage. There are three settings: None, ReadOnly and ReadWrite.

Defaults are ReadWrite for the OS disk and None for data disks. Caching works for disks up to 4 TiB and is not available on Ultra Disk or Premium SSD v2.

Cache hits count against the VM's cached IOPS limit, not the disk's own limit.

Turn caching off for write-heavy disks such as database logs, because the cache adds overhead without helping.

Take quiz
Which host caching options exist for Azure disks?
Read, Write, Append
None, ReadOnly, ReadWrite
Local, Zonal, Global
Off, Fast, Safe
What is the default caching for a new data disk?
Auto
ReadWrite
None
ReadOnly

13. What are Azure disk snapshots?

A snapshot is a read-only, point-in-time copy of a managed disk. It exists as its own resource, so it survives even if the source disk or VM is deleted.

You cannot attach a snapshot directly. Instead you create a new managed disk from it and attach that. Snapshots are either full or incremental, and you are billed for the data they actually store.

az snapshot create -g rg-app -n snap-data01 --source data01 --incremental true

Take a snapshot before risky changes such as OS patching or a schema migration, so you can roll back quickly.

Take quiz
A disk snapshot is:
A replica in another cloud
A VM image with the agent installed
A live mirror that updates continuously
A read-only point-in-time copy
Snapshot billing is based on:
The data actually stored
The number of VM reboots
Read operations only
Provisioned disk size, always

14. What is an incremental snapshot in Azure?

An incremental snapshot stores only the blocks that changed since the previous incremental snapshot of the same disk. The first one holds all used data; later ones are small and cheaper.

Each incremental snapshot can still be restored as a complete disk. You can delete an older one safely, because Azure keeps the data later snapshots depend on. They can also be copied to another region for disaster recovery.

Incremental snapshots are the type used by Azure Disk Backup.

Run them on a regular schedule, for example daily, and let a retention rule clear out the old ones.

Take quiz
What does the second incremental snapshot contain?
Only metadata with no data
Only blocks changed since the previous one
Only the VM's memory
A full copy of the entire provisioned size
Can you delete the first incremental snapshot safely?
No, all later ones become invalid
Only after converting it to full
Yes, later snapshots stay restorable
Only after stopping the VM

15. What is server-side encryption for Azure managed disks?

Server-side encryption (SSE) encrypts managed disks, snapshots and images at rest using 256-bit AES. It is on by default, needs no configuration and has no performance penalty.

By default Microsoft holds the keys (platform-managed keys). You can switch to customer-managed keys stored in Key Vault, or add a second layer for double encryption.

SSE does not by itself cover the temporary disk or host cache; enable encryption at host for that.

Snapshots and images created from an encrypted disk stay encrypted too. With platform-managed keys, Microsoft handles key rotation, so you have nothing to operate.

Take quiz
SSE for managed disks uses:
256-bit AES, enabled by default
RSA-1024 on request
No encryption unless BitLocker is on
DES, opt-in only
Who holds the keys with default SSE?
The VM administrator's laptop
Microsoft (platform-managed keys)
Azure DevOps
A local HSM you must buy

16. What is a disk encryption set in Azure?

A disk encryption set (DES) links managed disks to a customer-managed key in Azure Key Vault or Managed HSM. When a disk references a DES, SSE uses your key to wrap the disk's data encryption key.

The DES has its own managed identity, which must be allowed to wrap and unwrap keys (for example via the Key Vault Crypto Service Encryption User role). A DES can also be set to rotate to the latest key version automatically.

It is the building block for customer-managed keys and double encryption.

Take quiz
What does a disk encryption set reference?
An NSG rule
A VM extension package
A customer-managed key in Key Vault or Managed HSM
A storage account SAS
What access does the DES identity need on the key?
Owner on the whole subscription
Contributor on the virtual network
Read access to VM metrics
Wrap and unwrap permissions

17. What is the purpose of disk bursting?

Bursting lets a disk briefly run above its provisioned IOPS and throughput to absorb spikes such as VM boot or a batch job. It is not meant for sustained load.

  • Credit-based: Premium SSDs of 512 GiB and smaller (up to P20) earn credits while idle and spend them to reach about 3,500 IOPS and 170 MB/s; no extra charge.
  • On-demand: Premium SSDs larger than 512 GiB (P30 and above) can reach up to 30,000 IOPS and 1,000 MB/s once enabled, with extra charges.
Take quiz
Credit-based bursting applies to:
Premium SSDs of 512 GiB and smaller
Only disks over 4 TiB
Only Standard HDD
Only Ultra Disks
What is true about on-demand bursting cost?
It is billed only while the VM is deallocated
Enabling it adds extra charges
It is always free
It is included in reserved capacity

18. How do you resize an Azure managed disk?

You can only grow a managed disk; shrinking is not supported. Increase the size in the portal or CLI, then extend the partition and file system inside the guest.

az disk update -g rg-app -n data01 --size-gb 1024
# Linux guest
sudo growpart /dev/sdc 1
sudo resize2fs /dev/sdc1

Many data disks can be expanded while attached, but crossing the 4 TiB boundary or resizing some OS disks requires deallocating the VM first. To get a smaller disk, create a new one and copy the data.

Take quiz
Can you shrink a managed disk?
Yes, after deleting snapshots
Yes, but only Standard HDD
Yes, using the portal slider
No, you can only expand it
After growing a disk, what do you do inside the guest?
Extend the partition and file system
Rebuild the storage account
Re-attach the NIC
Change the SKU back

19. What is a shared disk in Azure?

A shared disk is a managed disk that can be attached to several VMs at once, controlled by the maxShares property. It is meant for clustered software such as Windows Server Failover Clustering, SQL Server FCI and Pacemaker.

The cluster software must coordinate access using SCSI persistent reservations. Mounting a normal file system from several VMs without a cluster manager corrupts data.

Supported on Ultra Disk, Premium SSD v2, Premium SSD and Standard SSD. Standard HDD does not support sharing.

Take quiz
Shared disks require:
An Azure Files share
A cluster manager using SCSI persistent reservations
A blob lease
An NFS server on the disk
Which disk type does not support sharing?
Ultra Disk
Premium SSD
Standard HDD
Premium SSD v2

20. What is an ephemeral OS disk in Azure?

An ephemeral OS disk keeps the OS on the VM's local storage (cache or temp disk) instead of remote managed storage. There is no disk storage cost, latency is low, and reimaging is fast.

The trade-off is that state is not preserved. The OS is lost if the VM is deallocated or the host fails, so it fits stateless workloads such as scale set instances and AKS nodes.

The chosen VM size must have a cache or temp disk large enough for the OS image.

Take quiz
Ephemeral OS disks are best for:
Single-instance databases
Long-term archives
A domain controller's only copy of AD
Stateless workloads such as scale set nodes
Where does an ephemeral OS disk live?
On local VM cache or temp storage
In Key Vault
In a ZRS blob
In Azure Files

21. What is the difference between managed and unmanaged disks?

Managed disks Unmanaged disks
Azure manages the storage behind the disk. VHD stored as a page blob in your storage account.
No storage account limits to plan around. You must watch account IOPS and capacity limits.
RBAC, snapshots, zones, encryption sets supported. Limited management features.
Current and supported. Retired on September 30, 2025.

The practical impact is capacity planning. With unmanaged disks several busy VHDs in one storage account could hit the account's limits, a problem managed disks remove. Existing unmanaged disks should be converted with az vm convert (the VM is deallocated during the conversion).

Always check that a VM still using unmanaged disks has been converted, since the retirement means they are no longer supported.

Take quiz
Unmanaged disk VHDs are stored as:
Objects in Key Vault
Rows in Cosmos DB
Page blobs in a storage account you own
Block blobs in Azure Files
What is the status of unmanaged disks?
The recommended default
Required for Ultra Disk
Linux-only
Retired as of September 30, 2025

22. What is the difference between Premium SSD and Premium SSD v2?

Feature Premium SSD Premium SSD v2
Sizing Fixed P-tiers (P1 to P80) Any size, 1 GiB steps
Performance Tied to the size tier IOPS and throughput set independently
Max per disk 32 TiB, 20,000 IOPS 64 TiB, 80,000 IOPS, 1,200 MB/s
OS disk Yes No
Host caching Supported (up to 4 TiB) Not supported
Bursting Credit-based and on-demand Not applicable

Choose Premium SSD for boot volumes and cache-friendly workloads. Choose Premium SSD v2 when you need more IOPS than the size tier would give, without paying for unused capacity.

In practice, a database needing 20,000 IOPS on a modest data size usually costs less on Premium SSD v2 than on a large P-tier bought only for its IOPS allowance.

Take quiz
Which of these can be used as an OS disk?
Premium SSD
None of them
Premium SSD v2
Ultra Disk
Which type lets you buy extra IOPS without extra capacity?
Premium SSD at the same tier
Premium SSD v2
An ephemeral OS disk
Standard HDD

23. What is the difference between Ultra Disk and Premium SSD v2?

Aspect Ultra Disk Premium SSD v2
Max IOPS 400,000 80,000
Max throughput 10,000 MB/s 1,200 MB/s
Free baseline None, all performance billed 3,000 IOPS and 125 MB/s
Positioning Tier-0, extreme workloads Most demanding production databases
Cost Highest Lower for similar profiles

Both are data-disk only, have no host caching and are zonal. The usual rule is to start with Premium SSD v2 and move to Ultra Disk only when a single disk must exceed 80,000 IOPS or 1,200 MB/s.

Ultra Disk also lets you tune IOPS and throughput on a live disk, which is useful for workloads with predictable peaks such as month-end processing. Premium SSD v2 allows the same adjustments, but within its lower ceiling and with a free baseline that keeps small disks inexpensive.

Take quiz
You need 150,000 IOPS from a single disk. Which type fits?
P80 Premium SSD
Standard SSD E80
Ultra Disk
Premium SSD v2
What do both Ultra Disk and Premium SSD v2 share?
Credit-based bursting
Fixed P-tier sizes
Delivery as an OS image
No host caching and no OS disk use

24. How do you choose the right Azure disk type?

Start with the workload's needs, then validate against VM limits and budget.

  1. Does the disk hold the OS? If yes, only Premium SSD, Standard SSD or Standard HDD apply.
  2. Measure required IOPS, throughput and latency (peak, not average).
  3. Need above 80,000 IOPS or 1,200 MB/s on one disk? Choose Ultra Disk.
  4. Need tunable IOPS and throughput for a database? Choose Premium SSD v2.
  5. General production or cache-friendly workload? Choose Premium SSD.
  6. Light or dev/test? Standard SSD; rarely used data? Standard HDD.
flowchart TD
A["Need a disk"] --> B{"OS disk?"}
B -->|Yes| C["Premium SSD / Standard SSD / Standard HDD"]
B -->|No| D{"Over 80k IOPS?"}
D -->|Yes| E["Ultra Disk"]
D -->|No| F{"Need tunable IOPS?"}
F -->|Yes| G["Premium SSD v2"]
F -->|No| H["Premium SSD or Standard SSD"]

Finally confirm the chosen VM size can actually deliver the performance.

Take quiz
A low-traffic dev/test web server most likely needs:
Premium SSD v2 at 80,000 IOPS
Standard SSD
A P80 Premium SSD
Ultra Disk
A high-performance boot volume should use:
An unmanaged HDD
Ultra Disk
Premium SSD
Premium SSD v2

25. How does host caching work for Azure disks?

With ReadOnly caching, reads are served from host memory or local SSD after the first access, while writes go straight to the remote disk. This lowers read latency and lets reads exceed the disk's own limit, bounded by the VM's cached limit.

With ReadWrite caching, writes are acknowledged from the cache first (write-back). That is fast but risky: if the host fails before data is flushed, uncommitted writes can be lost unless the application flushes properly.

sequenceDiagram
participant App
participant Cache as Host cache
participant Disk as Remote disk
App->>Cache: Read block
Cache-->>App: Hit, returned from cache
App->>Cache: Read new block
Cache->>Disk: Fetch block
Disk-->>Cache: Data
Cache-->>App: Data (now cached)

Typical guidance: ReadOnly for read-heavy data files, None for write-heavy or log disks.

Take quiz
Which caching setting suits a SQL Server log disk?
ReadWrite
Cache everything on the temp disk
ReadOnly
None
What is the risk of ReadWrite caching?
Possible data loss if the app does not flush and the host fails
Encryption is disabled
Disks cannot be snapshotted
Reads become slower

26. Why does VM size matter for Azure disk performance?

Every VM size has its own caps on uncached and cached IOPS and throughput, in addition to each disk's limits. Real performance is the lower of the two, applied across all disks on the VM.

For example, a P40 disk allows 7,500 IOPS, but on a VM capped at 3,200 uncached IOPS you will never see more than 3,200. Attaching more disks to that VM adds capacity, not speed.

So size the VM and the disks together: add up the demand from every disk and compare it with the VM's published limits before choosing either.

When a workload slows down after a disk upgrade with no gain, a VM-level cap is the first thing to check.

Take quiz
A 7,500 IOPS disk on a VM capped at 3,200 uncached IOPS delivers about:
4,300 IOPS
3,200 IOPS
7,500 IOPS
10,700 IOPS
Where do you find a VM's disk caps?
The disk's encryption set
NSG flow logs
The VM size's published uncached and cached limits
The resource group tags

27. How do you stripe multiple disks for higher performance?

Striping combines several disks into one volume so IOPS and throughput add up. On Windows use Storage Spaces with a simple layout; on Linux use LVM or mdadm RAID 0.

sudo pvcreate /dev/sdc /dev/sdd
sudo vgcreate datavg /dev/sdc /dev/sdd
sudo lvcreate -i 2 -I 64 -l 100%FREE -n datalv datavg
sudo mkfs.xfs /dev/datavg/datalv

Use RAID 0, not RAID 1 or 5, because Azure already keeps redundant copies of each disk. Use identical disk types and sizes, and remember the combined result is still capped by the VM size limit. Snapshots must be taken across all disks together to stay consistent.

Take quiz
Why use RAID 0 rather than RAID 1 on Azure disks?
Azure already keeps redundant copies of each disk
RAID 1 is unsupported on Linux
RAID 0 encrypts data
RAID 1 disables snapshots
What caps the combined IOPS of a striped volume?
One disk's IOPS
The VM size limit
Nothing, it is unlimited
The snapshot count

28. How do you create and restore a disk from a snapshot?

Restoring is always a two-step job: create a new disk from the snapshot, then attach or swap it.

  1. Create the snapshot of the source disk.
  2. Create a new managed disk with the snapshot as its source.
  3. Attach the new disk to a VM, or swap it in as the OS disk.
az snapshot create -g rg-app -n snap-data01-1013 --source data01 --incremental true
az disk create -g rg-app -n data01-restored --source snap-data01-1013 --sku Premium_LRS
az vm disk attach -g rg-app --vm-name vm01 --name data01-restored

A snapshot taken from a running VM is crash-consistent. For databases, quiesce the application or use VSS or Azure Backup to get application consistency.

Take quiz
By default, a snapshot of a running VM disk is:
Always application-consistent
Transaction-log-consistent
Crash-consistent
Memory-consistent
To use a snapshot's data you must:
Rename it into a disk
Attach the snapshot to the VM as-is
Mount it read-write directly
Create a new disk from it

29. When should you use zone-redundant storage (ZRS) disks?

Use ZRS when a workload must survive the loss of an entire availability zone without data loss. ZRS replicates the disk synchronously across three zones in a region and is available for Premium SSD and Standard SSD.

It is most useful with shared disks for clusters that span zones, such as SQL Server FCI or SAP ASCS, where the data must be reachable from VMs in different zones.

The cost is slightly higher write latency and price compared with LRS. If your application already replicates data itself (for example Always On availability groups), LRS disks in separate zones may be enough.

Take quiz
ZRS replicates disk data across:
Three availability zones
Two VMs in the same rack
Three regions
Two storage accounts
What is the trade-off of ZRS compared with LRS?
No snapshot support
Slightly higher write latency and cost
Encryption is not possible
Lower durability

30. How does Azure Backup protect managed disks?

Azure Disk Backup uses a Backup vault and a backup policy. At each scheduled run it takes an incremental snapshot of the disk and keeps it in a snapshot resource group in your subscription, based on the retention rules.

The vault's managed identity needs two roles: Disk Backup Reader on the source disk and Disk Snapshot Contributor on the snapshot resource group. Restore creates a new disk.

This is different from Azure VM backup (Recovery Services vault), which backs up the whole VM through an extension and can give application-consistent points. Disk Backup is crash-consistent.

Test a restore early so you know the real recovery time, not just that backups succeed.

Take quiz
Which vault does Azure Disk Backup use?
Only a Recovery Services vault
An Automation account
Key Vault
A Backup vault
Where do Disk Backup snapshots live?
In a snapshot resource group in your subscription
On the VM's temp disk
In hidden Microsoft-only storage
In Azure Files

31. What is the difference between Azure Disk Encryption and encryption at host?

Azure Disk Encryption (ADE) Encryption at host
Encrypts inside the guest using BitLocker (Windows) or DM-Crypt (Linux). Encrypts at the VM host before data goes to storage.
Uses the VM's CPU. No guest CPU overhead.
Keys kept in Key Vault. Platform or customer-managed keys.
Cannot be combined with encryption at host. Covers temp disk and cache data flow.

Both sit on top of default SSE. Encryption at host is the simpler choice when you want temp disk and cache covered with no agent inside the VM.

Encryption at host is enabled per subscription through a feature registration and then per VM. ADE needs the extension inside the VM, which adds a dependency to patching and image builds.

Take quiz
Which option encrypts temp disk data at the host level?
SSE with platform keys only
Encryption at host
Azure Backup
Disk snapshots
What does ADE use for encryption inside the guest?
TLS in the hypervisor
Azure Firewall
BitLocker on Windows and DM-Crypt on Linux
SMB signing

32. How do you secure managed disk export and network access?

Exporting a disk generates a time-limited SAS URI. To control that, set the disk's networkAccessPolicy to one of AllowAll, AllowPrivate (through a disk access resource and private endpoint) or DenyAll.

az disk update -g rg-app -n data01 --network-access-policy AllowPrivate --disk-access myDiskAccess

Also restrict who can call Microsoft.Compute/disks/beginGetAccess/action with RBAC, and enforce the policy across the subscription with Azure Policy so new disks cannot be exported publicly.

A good baseline is DenyAll or AllowPrivate on production disks, with exports allowed only through a short, audited change window. Remember that a SAS URI is a bearer token: anyone holding it can read the disk until it expires or is revoked.

Take quiz
Which setting blocks all SAS-based export of a disk?
Host caching None
ZRS
AllowAll
DenyAll network access policy
Private export of a disk requires:
A disk access resource with a private endpoint
A Standard HDD
Only a disk encryption set
A public IP on the VM

33. How can you monitor Azure disk performance?

Use Azure Monitor metrics at both the disk and VM level. The most useful VM metrics are Data Disk IOPS Consumed Percentage and Data Disk Bandwidth Consumed Percentage (and the OS disk equivalents), plus queue depth.

A consumed percentage near 100% means throttling, and latency will rise. Create alerts on these metrics rather than on raw IOPS.

Inside the guest, confirm with iostat -x on Linux or the Avg. Disk sec/Read counter in Performance Monitor on Windows.

Typical alerts: IOPS or bandwidth consumed above 80% for 10 minutes, and queue depth that stays high. Compare the VM-level and disk-level graphs, because either layer may be the one throttling you. Keep the baseline from a healthy week so you can recognise change quickly.

Take quiz
IOPS Consumed Percentage close to 100% means:
Encryption is about to expire
The snapshot is corrupt
The disk or VM is being throttled
The disk is nearly full of data
Which Linux tool shows per-device latency and utilization?
ssh-keygen
ping -f
nslookup
iostat -x

34. What is the difference between Azure disks, Azure Files and Blob storage?

Service Access type Best for
Managed disk Block device for one VM (or cluster via shared disk) OS, databases, low-latency app data
Azure Files SMB or NFS file share Shared files for many clients
Blob storage REST object access Unstructured data, backups, media

Choose a disk when the application expects a local drive and needs predictable IOPS. Choose Azure Files when many machines must read and write the same file tree. Choose Blob for large objects accessed through APIs.

Cost and latency follow the same split: disks give low, predictable latency, Files is billed on shares and protocol features, and Blob is the cheapest per GiB but has no block-device semantics.

Take quiz
Which service gives a block device to a single VM?
Managed disk
Azure Files share
Table storage
Blob container
Which service provides SMB shares to many clients?
An ephemeral OS disk
Azure Files
A snapshot
A managed disk

35. How does the Azure Disk CSI driver work in AKS?

The Azure Disk CSI driver creates a managed disk whenever a PersistentVolumeClaim asks for one, attaches it to the node running the pod, and mounts it. AKS ships the classes managed-csi (Standard SSD LRS) and managed-csi-premium (Premium SSD LRS).

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: data-pvc
spec:
  accessModes: [ReadWriteOnce]
  storageClassName: managed-csi-premium
  resources:
    requests:
      storage: 100Gi

Disks are ReadWriteOnce and zonal, so the pod must run in the disk's zone. Use volumeBindingMode: WaitForFirstConsumer so the disk is created where the pod lands. The node VM size limits how many disks can attach.

Delete the PVC and, depending on the reclaim policy, the disk is removed too. Set a Retain policy for data you cannot lose.

Take quiz
What is the usual access mode for an AKS Azure disk PVC?
ReadWriteMany for all disk types
ReadOnlyMany only
ReadWriteOnce
ReadWriteAlways
Why use WaitForFirstConsumer for disk storage classes?
It forces ZRS on
It disables encryption
It delays snapshot expiry
It creates the disk in the zone where the pod is scheduled

36. How do you change the SKU of an existing managed disk?

Use az disk update --sku (or the portal) to move between Standard HDD, Standard SSD and Premium SSD. The VM usually needs to be deallocated, or the disk detached, before the change applies.

az disk update -g rg-app -n data01 --sku Premium_LRS

Ultra Disk and Premium SSD v2 cannot be converted in place. To move to or from them, create a new disk of the target type and copy the data (for example with a file-level copy), then switch over. After conversion, billing follows the new SKU.

Also plan the maintenance window, because deallocating briefly takes the VM offline. Test the change on a copy first if the data is critical.

Take quiz
Can you convert a Premium SSD v2 disk to Premium SSD in place?
Yes, by detaching the OS disk
No, you must migrate data to a new disk
Yes, with a single az disk update
Yes, by changing host caching
What is usually required when converting Standard HDD to Premium SSD?
Disable encryption
Move to another region
Deallocate the VM or detach the disk
Delete all snapshots

37. How are Azure managed disks billed?

Premium SSD, Standard SSD and Standard HDD are billed by the provisioned tier, not by the data you store. A 100 GiB Premium SSD is billed as a P10 (128 GiB). Standard SSD and HDD also add per-transaction charges.

Ultra Disk and Premium SSD v2 bill separately for capacity, provisioned IOPS and provisioned throughput per hour. Snapshots are billed on the data they store, and on-demand bursting adds extra fees.

A disk keeps billing when its VM is deallocated or the disk is detached, so unattached disks are a common source of wasted spend. Reserved capacity can discount Premium SSD tiers.

Take quiz
A 100 GiB Premium SSD is billed as:
Exactly 100 GiB
P30 (1 TiB)
P1 (4 GiB)
The P10 (128 GiB) tier
Does a detached managed disk still incur charges?
Yes, until it is deleted
Only on weekends
No, billing stops on detach
Only if it is encrypted

38. How do you troubleshoot slow disk performance on an Azure VM?

  1. Check the IOPS and bandwidth consumed percentage metrics. 100% means throttling.
  2. Identify which limit is hit: the disk's, or the VM's cached or uncached cap.
  3. Look at the I/O pattern. Small random I/O stresses IOPS; large sequential I/O stresses throughput.
  4. Review host caching. Move read-heavy data to ReadOnly and keep logs at None.
  5. Inspect queue depth and guest metrics (iostat -x or Performance Monitor).
  6. Fix the bottleneck: resize the VM, move to a higher tier or Premium SSD v2, or stripe disks.
  7. Rule out guest causes such as antivirus scans, misaligned partitions or a nearly full file system.

Always change one thing at a time and re-measure.

Take quiz
What should you check first when a disk is slow?
Key Vault soft delete
IOPS and bandwidth consumed percentage metrics
DNS TTL values
Subnet size
Latency rises while consumed percentage hits 100%. This indicates:
Too many snapshots
A renamed disk
Throttling; raise disk or VM limits
A disabled NIC

39. What is the difference between credit-based and on-demand disk bursting?

Aspect Credit-based On-demand
Applies to Premium SSD up to P20 (512 GiB and smaller) Premium SSD P30 and larger
Burst ceiling About 3,500 IOPS and 170 MB/s Up to 30,000 IOPS and 1,000 MB/s
Mechanism Credit bucket that fills below baseline Burst allowed on request, no bucket
Enablement Automatic Must be turned on per disk
Cost Free Extra charges for bursting and transactions

Take a P20: its baseline is 2,300 IOPS. While running below that it accumulates credits, and a spike can then draw them down toward 3,500 IOPS. Once the bucket is empty the disk falls back to baseline.

Neither mode raises the disk's sustained rate. If the workload needs more than baseline for long periods, resize the disk or move to Premium SSD v2 instead of relying on bursts.

Take quiz
When does the credit bucket refill?
When the disk runs below its baseline performance
When the disk is resized
Only when the VM reboots
When a snapshot is taken
Which bursting type must be explicitly enabled?
Credit-based bursting
On-demand bursting
Neither
Both by default

40. Explain the internal working of Azure managed disk storage?

A managed disk is an Azure Resource Manager object, but its data lives in Azure-managed storage as page blobs that you never see. With LRS, every write is stored in three synchronous copies inside one datacenter; with ZRS the copies are spread across zones.

The VM does not use a local drive. The host's storage client sends block I/O over the network to the storage cluster, and a write is acknowledged only after the replicas have durably committed it. This I/O is governed by the VM's disk limits rather than its network limits.

sequenceDiagram
participant VM as Guest VM
participant Host as Host storage client
participant R as Replicas (3 copies)
VM->>Host: Write block
Host->>R: Send to all replicas
R-->>Host: Durable commit
Host-->>VM: Write acknowledged

Host caching, bursting and throttling are applied in the host layer, before requests reach the storage cluster.

Take quiz
How many copies does LRS keep?
One in each of three regions
Six across zones
Three, in one datacenter
One plus a nightly backup
A write to a managed disk is acknowledged when:
A nightly sync runs
A snapshot completes
Data lands in VM RAM
The replicas have durably committed it

41. Explain the lifecycle of an Azure managed disk?

A disk is created from one of four sources: empty, a platform or custom image, a snapshot, or an upload. It then moves through states that you can read from the diskState property.

flowchart LR
A["Create (empty, image, snapshot, upload)"] --> B["Unattached"]
B --> C["Attached"]
C --> D["Snapshot / Backup"]
C --> B
B --> E["ActiveSAS (export)"]
E --> B
B --> F["Delete"]
  • Unattached: exists but no VM uses it, still billed.
  • Attached: in use. Resize, change caching, or change performance while attached (support varies by type).
  • Reserved: attached to a deallocated VM.
  • ActiveSAS / ReadyToUpload: export or direct upload is in progress.

Deletion is permanent unless you hold a snapshot or backup, so protect important disks before retiring them.

Take quiz
Which disk state is shown while a SAS export is active?
ActiveSAS
ReadyToUpload
Always Unattached
Reserved
What is true when a VM is deallocated but the disk stays attached?
The disk becomes a snapshot
The disk is retained and keeps billing
The disk is deleted
Billing for the disk stops

42. How does throttling work at the disk and VM level?

Two limits apply to every I/O: the disk's IOPS and throughput limit, and the VM's aggregate limit across all its disks. VM limits are published separately for cached and uncached I/O.

Reads that hit the host cache on a ReadOnly or ReadWrite disk consume the VM cached limit instead of the disk limit. Cache misses and writes to the disk count against the uncached limit. Ultra Disk and Premium SSD v2 have no cache, so they use only the uncached limit.

When requests exceed a limit, Azure does not drop them. They queue, so latency rises and queue depth grows. The consumed percentage metrics show how close each layer is. Bursting temporarily raises the ceiling at disk or VM level but does not remove it.

Take quiz
A cache hit on a ReadOnly disk counts against:
Both uncached limits
A snapshot quota
Nothing at all
The VM's cached IOPS limit
What happens when I/O exceeds a throttling limit?
Requests queue and latency rises
They are silently dropped
The disk converts to HDD
The VM reboots

43. How do you design a highly available shared-disk cluster in Azure?

A shared-disk cluster uses one managed disk with maxShares greater than 1, attached to every cluster node. The cluster software (WSFC, SQL FCI, SAP ASCS or Pacemaker) controls access through SCSI persistent reservations.

  1. Choose the disk type: Premium SSD or Standard SSD (ZRS available), Premium SSD v2 or Ultra Disk for higher performance.
  2. Place nodes in different zones with a ZRS disk, or in one zone with LRS and a proximity placement group.
  3. Set host caching to None, which shared disks require.
  4. Add a quorum witness (cloud witness for WSFC) and an Azure Load Balancer for the client connection point.
  5. For Pacemaker, configure the Azure fence agent so a failed node is truly isolated before failover.

Then test failover repeatedly. A cluster that was never failed over is not highly available, only hopeful.

Take quiz
A Pacemaker cluster on shared disks needs:
The Azure Backup agent
A fencing agent plus SCSI persistent reservations
A public IP per disk
Snapshots every minute
What host caching setting do shared disks use?
ReadOnly
ReadWrite
None
Auto

44. How would you optimize SQL Server storage on Azure VMs?

Match each file type to the right disk and cache setting, then make sure the VM can carry the load.

  • Disk type: Premium SSD or Premium SSD v2 for data and log; Ultra Disk if the log needs extreme low latency.
  • Data files: a separate pool on ReadOnly cache (Premium SSD).
  • Log files: a separate pool with caching None.
  • tempdb: the local temp disk, which is low latency and does not need to persist.
  • Striping: stripe several disks per pool with a 64 KB interleave and format volumes with a 64 KB allocation unit.
  • VM size: pick one whose uncached and cached limits cover the combined demand.

Validate with a load test, and watch consumed percentage metrics once in production.

Take quiz
What allocation unit size is recommended for SQL Server data volumes?
512 bytes
1 MB
4 GB
64 KB
Where is tempdb commonly placed for low latency?
On the local temp disk
On a shared disk
On Standard HDD with ReadWrite cache
In a snapshot

45. How do you migrate an on-premises VHD to an Azure managed disk?

Use direct upload, which sends the VHD straight into a managed disk without an intermediate storage account. The VHD must be in fixed format.

  1. Create an empty disk with --for-upload and the exact upload size (file size plus the 512-byte footer).
  2. Grant write access to get a SAS URI.
  3. Copy the VHD with AzCopy as a page blob.
  4. Revoke access so the disk becomes a normal unattached disk.
az disk create -n uploaded01 -g rg-app --for-upload --upload-size-bytes 34359738880 --sku Standard_LRS
az disk grant-access -n uploaded01 -g rg-app --access-level Write --duration-in-seconds 86400
azcopy copy "disk.vhd" "SAS-URI" --blob-type PageBlob
az disk revoke-access -n uploaded01 -g rg-app

For many servers, Azure Migrate automates the replication and disk creation.

Verify the upload by attaching the disk to a test VM before decommissioning the source.

Take quiz
Which blob type does AzCopy use for a disk upload?
TableBlob
AppendBlob
PageBlob
BlockBlob
What is the final step of a direct upload?
Convert it to unmanaged
Reboot the storage account
Delete the disk
Revoke the SAS access

46. What happens to managed disks when a VM is deallocated or deleted?

Deallocate: persistent disks stay attached and keep billing. The temporary disk and any ephemeral OS disk are lost, and the VM's compute charges stop.

Delete: the outcome is set per disk by the deleteOption property, either Detach (disk is kept) or Delete (disk is removed with the VM). Portal defaults and CLI defaults can differ, so check them.

Disks left behind are billed until removed. Find them by looking for disks with no owner:

az disk list --query "[?managedBy==null].{name:name, rg:resourceGroup, size:diskSizeGb}" -o table

Review that list regularly, and snapshot anything you are unsure about before deleting.

Once a VM is gone, its temporary disk contents cannot be recovered, so copy anything valuable off it beforehand. Setting deleteOption to Detach on data disks is the safer default.

Take quiz
Which property controls whether a disk is removed with its VM?
deleteOption
diskIOPSReadWrite
networkAccessPolicy
maxShares
Which query condition finds orphaned disks?
sku is Ultra
managedBy is null
encryption equals None
zones is empty

47. Why is Premium SSD v2 often cheaper than Premium SSD for databases?

Premium SSD ties IOPS to size, so reaching a performance target can force you to buy far more capacity than you need. Premium SSD v2 separates the two, so you pay for what you actually provision.

Example: a database needs 500 GiB and 10,000 IOPS. On Premium SSD, 10,000 IOPS means moving up to a P60 (8 TiB, 16,000 IOPS) because a P50 tops out at 7,500. On Premium SSD v2 you provision 500 GiB and add roughly 7,000 IOPS above the free 3,000 baseline.

Check current pricing for your region, because the saving depends on the ratio of IOPS to capacity. The trade-offs are no host caching, no OS disk use and no bursting, so cache-friendly workloads can still favour Premium SSD.

Take quiz
Why do teams over-provision capacity on Premium SSD?
Encryption needs it
To enable zones
To reach a higher IOPS tier tied to size
Snapshots require it
What is a trade-off of Premium SSD v2?
It supports only Windows
Only fixed sizes
It cannot attach to a VM
No host caching and no OS disk use

48. How would you design disaster recovery for managed disks?

Start from the RPO and RTO the business needs, then layer protections, since each covers a different failure.

Failure Protection
Disk or host fault Built-in replication (LRS keeps three copies)
Zone outage ZRS disks, or VMs spread across zones
Regional outage Azure Site Recovery or cross-region copy of incremental snapshots
Deletion or corruption Azure Backup (Disk Backup or VM backup) and snapshots

Azure Site Recovery replicates the VM's disks to replica disks in a target region and gives recovery points for failover. Confirm which disk types and features your scenario supports, then run regular test failovers. ZRS does not protect against deletion, corruption or loss of a whole region.

Document the failover order, since databases, then app servers, then web tiers recover in sequence. A written runbook beats memory during an incident.

Take quiz
Which service replicates VM disks to another region?
Azure Disk CSI driver
Azure Site Recovery
Encryption at host
Disk bursting
ZRS disks protect against:
Loss of an entire region
Accidental deletion
Loss of a single availability zone
Ransomware encryption

49. How can you rotate customer-managed disk keys without downtime?

Store the key in Key Vault, reference it from a disk encryption set and enable automatic key rotation. When a new key version is created (manually or by a Key Vault rotation policy), the DES picks it up on its own.

az disk-encryption-set update -g rg-app -n des01 --key-url https://myvault.vault.azure.net/keys/diskkey --enable-auto-key-rotation true

Rotation changes only the key encryption key. Azure re-wraps each disk's data encryption key, so no data is re-written and VMs keep running.

The vault must have soft delete and purge protection. Never disable or delete the key while disks use it, or those disks (and their VMs) become inaccessible.

Test the rotation on a non-production DES first, and set a Key Vault alert for keys nearing expiry, so a lapsed key never surprises you.

Take quiz
Does key rotation re-encrypt all disk data?
Only snapshots are re-encrypted
Yes, every block is rewritten
Yes, the VM is rebuilt
No, it re-wraps the data encryption keys
What must Key Vault have for CMK disk encryption?
Soft delete and purge protection enabled
The Basic tier only
A premium NIC
A public IP

50. Which is better and why: managed disks or Elastic SAN?

Neither is better in general; they solve different scale problems. Managed disks are the simple default: each disk is provisioned on its own and attached natively to one VM. Azure Elastic SAN is a pooled block storage service where capacity and performance are provisioned for the whole SAN and shared across its volumes.

Aspect Managed disks Elastic SAN
Provisioning Per disk Pooled at SAN level, shared by volumes
Connection Native disk attach iSCSI over private endpoint or service endpoint
Consumers Azure VMs VMs, AKS and Azure VMware Solution
Best fit Simple per-VM storage Many volumes with uneven demand, SAN-style consolidation

Choose managed disks for most VM workloads. Consider Elastic SAN when you are consolidating many volumes and want to avoid stranding capacity and performance on individual disks.

Take quiz
Which protocol does Elastic SAN use for connections?
NFS only
iSCSI
SMB only
HTTP REST only
Elastic SAN performance is provisioned:
Per resource group tag
Per VM NIC
At the SAN level and shared by its volumes
Per snapshot
«
»

Comments & Discussions