Skip to content
Tutorials Center
My learning

Topics

Lesson 18 of 57 ยท Storage

Disks and Redundancy

Learn Azure managed disk types, snapshots, and the redundancy options LRS, ZRS, GRS and GZRS, with RPO, RTO, failover behavior and durability, plus a comparison tool.

Data outlives hardware. Disks fail, racks lose power, buildings flood. Azure Storage protects your data by keeping several copies and by letting you choose how far apart those copies live. A closer copy is cheaper and faster to write; a farther copy survives bigger disasters. This lesson covers two related topics: the managed disks that back virtual machines, and the redundancy options (LRS, ZRS, GRS, GZRS) that decide where copies are kept.

You will also meet two numbers used in every disaster-recovery conversation: RPO (how much data you can afford to lose) and RTO (how long you can afford to be down). The commands here are read-only because they need a subscription. The runnable examples are JavaScript stand-ins that compare options and simulate replication lag, using simplified models.

Managed disks

A managed disk is a block device for a virtual machine (see Virtual Machines) whose storage Azure handles for you. You pick a size and a type; you do not manage a storage account for it. The main types, from fastest to cheapest:

Type Backed by Use for
Ultra Disk SSD, configurable IOPS and throughput The most demanding databases and latency-sensitive workloads
Premium SSD v2 SSD, size, IOPS and throughput set separately Production databases where you want to tune performance
Premium SSD SSD, performance tied to size Typical production VMs
Standard SSD SSD, lower performance Web servers, light databases, dev/test
Standard HDD Hard disks Backups, rarely accessed data, cheapest option

Every VM has an OS disk, and it can have data disks attached. Many sizes also have a temporary disk that is local to the host: it is fast, but it is wiped if the VM moves, so never keep anything important there. Which disk types a VM size supports depends on the size; check the size's documentation.

Terminal
# Read-only: needs a subscription
az disk create \
  --resource-group rg-demo --name data01 \
  --size-gb 256 --sku Premium_LRS

az vm disk attach --resource-group rg-demo --vm-name web01 --name data01

Managed disks are replicated for you. Most types are locally redundant (LRS: three copies within one datacenter), and some support zone-redundant storage (ZRS), which keeps copies across availability zones so a disk survives the loss of a zone. Whether a type offers ZRS varies, so check before you design around it.

Snapshots and backups

A snapshot is a read-only, point-in-time copy of a disk. Snapshots are usually incremental: after the first, each stores only the blocks that changed, so they are cheap. You can create a new disk from a snapshot, even in another region (after copying it), which makes snapshots handy for cloning machines and for quick rollbacks before risky changes.

Terminal
az snapshot create \
  --resource-group rg-demo --name data01-2025-03-01 \
  --source data01 --incremental true

A snapshot is not a full backup strategy. It lives next to the disk, does not understand your application (a database may be mid-write), and does nothing to schedule or retain copies. For production, use Azure Backup (covered in High Availability, Backup and Disaster Recovery), which takes application-consistent backups, keeps them in a separate vault, and manages retention.

Storage redundancy options

The same four options apply to storage accounts (blobs, files, queues, tables) and, in a more limited way, to some disks and snapshots. They answer two questions: how many copies, and how far apart.

  • LRS (locally redundant): three copies inside one datacenter in the primary region. Protects against disk and rack failure. Does not survive losing that datacenter.
  • ZRS (zone-redundant): copies spread across three availability zones in the primary region. Survives losing a whole zone. Writes are synchronous, so each acknowledged write exists in more than one zone.
  • GRS (geo-redundant): LRS in the primary region, plus an asynchronous copy to a paired secondary region hundreds of miles away, where it is stored as LRS again.
  • GZRS (geo-zone-redundant): ZRS in the primary region plus an asynchronous LRS copy in the secondary region. The strongest standard option.

For GRS and GZRS there are read-access variants, RA-GRS and RA-GZRS, which expose a read-only endpoint in the secondary region so your application can read even when the primary is down.

flowchart LR
    subgraph P["Primary region"]
      Z1["Zone 1<br/>copy"]
      Z2["Zone 2<br/>copy"]
      Z3["Zone 3<br/>copy"]
    end
    subgraph S["Secondary region (paired)"]
      L["LRS copies"]
    end
    Z1 -.->|"asynchronous"| L

GZRS: synchronous copies across zones, then an asynchronous copy to another region.

Durability

Microsoft publishes the durability each option is designed for, measured over a year: at least 11 nines (99.999999999 percent) for LRS, at least 12 nines for ZRS, and at least 16 nines for GRS and GZRS. These are design targets for not losing an object, not promises about uptime. Availability is a separate property with its own SLA, and it differs between hot and cool tiers and between redundancy options (for example, ZRS and GZRS have higher read availability targets than LRS). Always check the current SLA table for exact percentages.

Changing redundancy later is supported between many pairs of options. Some changes are a simple setting, some need a live migration request, and some require copying data. Plan for it early.

Terminal
az storage account create --name mydata12345 --resource-group rg-data \
  --location westeurope --sku Standard_GZRS --kind StorageV2

az storage account update --name mydata12345 --resource-group rg-data --sku Standard_RAGZRS

RPO, RTO and failover

Two measures describe what a failure costs:

  • RPO (recovery point objective): the amount of data, measured in time, you can lose. "RPO of 15 minutes" means you accept losing up to the last 15 minutes of writes.
  • RTO (recovery time objective): how long you can be unavailable. "RTO of 1 hour" means service must return within an hour.

How the redundancy options behave:

  • LRS and ZRS keep their copies in one region. A zone failure is handled automatically with ZRS (no data loss, brief or no interruption). A regional outage makes the data unavailable until the region returns; if the region is destroyed, LRS and ZRS data can be lost.
  • GRS and GZRS replicate to the secondary region asynchronously. Azure states that the secondary typically lags by less than 15 minutes, but that is not a guarantee or an SLA. If the primary fails and you fail over, you can lose the writes that had not replicated yet: that is your effective RPO.
  • Failover to the secondary can be started by Microsoft (only in a major regional disaster) or by you (customer-managed failover). After a customer-initiated failover the secondary becomes the new primary, and the account is typically left as LRS, so you must reconfigure geo-redundancy afterwards. The account's endpoints keep working because DNS points to the new primary. Treat a failover as an operation you rehearse, not a button you meet for the first time during an incident.

Compare the options

The next stand-in is a table of the characteristics above plus a small chooser. It encodes the information from this lesson, so it is as accurate as the lesson, not a live Azure query. The relative cost numbers are invented to show an ordering.

JS Redundancy comparison and chooser

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Replication lag and your real RPO

Asynchronous replication means the secondary is always a little behind. The simulation below writes one record per second to the primary and copies batches to the secondary with a random delay from a seeded generator, so the numbers repeat on every run. Then it "fails" the primary at a chosen moment and counts what the secondary has.

JS Replication lag and lost writes

Press Run (or Ctrl + Enter) to see the console output here.

No output.

In the asynchronous runs the loss is six or seven records (a few seconds of writes), and it varies with the moment of failure. The real service's lag depends on load and distance, and Azure gives no SLA for it, which is why critical systems read the account's last sync time and design their own recovery steps. This toy only shows the principle: synchronous copies cost latency but lose nothing; asynchronous copies are fast but can lose the tail.

Choosing in practice

  • Start from your requirement: "survive a datacenter," "survive a zone," or "survive a region."
  • Zone-redundant options are now the sensible default for production data in regions that have zones.
  • Geo-redundancy protects against rare regional disasters and costs roughly double; add it where the business impact justifies it, and add read access if you will run from the secondary during an outage.
  • Redundancy protects against hardware failure, not against mistakes. A deleted blob is deleted in every copy. Turn on soft delete, versioning and backups too.

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. Which redundancy option keeps three copies across availability zones in one region?

    ZRS spreads synchronous copies across zones in the primary region. LRS stays in one datacenter and GRS adds a second region.
  2. 2. Why can a GRS account lose recent writes after a failover?

    Writes reach the secondary after a delay. Whatever had not replicated when the primary failed is lost, which defines your effective RPO.
  3. 3. What does an RTO of one hour mean?

    RTO is about downtime. The amount of data you can lose is the RPO.
  4. 4. Which statement about snapshots is correct?

    A snapshot captures a moment in time and stores changes incrementally. It is useful but is not a full backup strategy.
  5. 5. Which option do you need if the application must read data from the secondary region while the primary is down?

    Read-access geo options expose a read-only secondary endpoint. Plain GRS and GZRS only make the secondary usable after a failover.

Summary

  • Managed disks come as Ultra, Premium SSD v2, Premium SSD, Standard SSD and Standard HDD; the temporary disk is not durable.
  • Snapshots are incremental point-in-time copies and are not a replacement for Azure Backup.
  • LRS survives hardware failure, ZRS survives a zone, GRS survives a region (asynchronously), and GZRS combines zones and regions.
  • Designed durability is at least 11 nines for LRS, 12 for ZRS and 16 for GRS and GZRS; availability is a separate SLA.
  • RPO is how much data you can lose, RTO is how long you can be down; async geo replication means a failover can lose recent writes.
  • Redundancy does not protect against deletion or corruption: add soft delete, versioning and backups.

Next: Virtual Networks and Subnets.