Implement and Manage Storage · Topic 2 of 3
Storage Accounts, Redundancy and Encryption
AZ-104 storage accounts: account types, redundancy and failover, object replication, encryption keys, secure transfer, Storage Explorer and AzCopy.
- 5 min
- General purpose v2 is the standard choice. Names are 3 to 24 lowercase letters and numbers.
- ZRS survives a datacenter loss. GRS and GZRS add a second region. RA versions allow reading the secondary.
- After a customer initiated failover the account is locally redundant in its new primary region.
What it is
A storage account is the container for blobs, files, queues and tables. When you create one, you decide its type, its performance, how its data is replicated and how it is encrypted.
Most of these choices are made at creation, so the exam asks what to choose for a given need, and how to change a setting afterward.
How it works
Account types and names
| Type | Notes |
|---|---|
| Standard general purpose v2 | The recommended type for most uses, with all four services |
| Premium block blobs | SSD backed, for low latency blob workloads |
| Premium file shares | SSD backed, for high performance file shares |
| Premium page blobs | SSD backed, for page blobs such as unmanaged disks |
A storage account name must be 3 to 24 characters, lowercase letters and numbers only, and unique across Azure.
Redundancy
| Option | Copies | Survives |
|---|---|---|
| LRS | In one datacenter | Disk and server failure |
| ZRS | Across three or more availability zones | The loss of a datacenter |
| GRS | LRS in the primary region plus a copy in a paired region | A region outage |
| GZRS | ZRS in the primary region plus a copy in a paired region | A zone loss and a region outage |
The read access versions, RA-GRS and RA-GZRS, let applications read the secondary copy at any time. With plain GRS or GZRS the secondary is used only after a failover.
You change the redundancy of an existing account in its Redundancy setting, and some conversions run as a managed process without downtime. For GRS and GZRS you can also start an account failover to the secondary region. After a failover the account becomes locally redundant in its new primary region.
Object replication
Object replication copies block blobs from a container in one storage account to a container in another, asynchronously, using rules that can filter by prefix. The accounts can be in different regions or subscriptions.
It has prerequisites: blob versioning must be on in both accounts, and change feed must be on in the source account. While a policy is active, writes to the destination container are blocked, although reads and deletes are still allowed.
Encryption
All data in a storage account is encrypted at rest with 256 bit AES. You choose who holds the key.
- Microsoft managed keys: the default, with nothing to manage.
- Customer managed keys: keys that you keep in Azure Key Vault or a managed HSM. The vault must have soft delete and purge protection turned on.
- Infrastructure encryption: a second layer of encryption, which must be chosen when the account is created.
For data in transit, secure transfer required forces HTTPS and encrypted SMB, and you can set a minimum TLS version.
Azure Storage Explorer and AzCopy
Azure Storage Explorer is a graphical app for Windows, macOS and Linux. You connect with your Microsoft Entra account, a SAS URL or an account key, and then browse, upload and manage data.
AzCopy is a command line tool for fast bulk copying. Sign in with Microsoft Entra, or append a SAS to the URL.
azcopy login
azcopy copy "C:\data" "https://contoso.blob.core.windows.net/backup" --recursive
azcopy sync "C:\data" "https://contoso.blob.core.windows.net/backup" --recursive
copy transfers files. sync makes the destination match the source. Copies between two storage accounts happen directly between them, not through your computer.
Creating an account from the command line
az storage account create --name stcontoso001 --resource-group rg-app --location westeurope --sku Standard_GRS --kind StorageV2
The --sku value sets the redundancy, for example Standard_LRS, Standard_ZRS, Standard_GRS or Standard_GZRS.
Choosing redundancy by requirement
| The requirement | Redundancy |
|---|---|
| Lowest cost, data can be recreated | LRS |
| Survive the loss of a datacenter inside one region | ZRS |
| Survive the loss of a whole region | GRS or GZRS |
| Read the data from the second region during an outage | RA-GRS or RA-GZRS |
| Data must stay inside one region by law, but survive a zone loss | ZRS |
Customer managed keys in steps
Using your own key has a fixed sequence.
- Create an Azure Key Vault with soft delete and purge protection turned on.
- Create a key in the vault.
- Give the storage account a managed identity.
- Give that identity permission to use the key, for example the Key Vault Crypto Service Encryption User role.
- On the storage account, choose customer managed keys and select the key.
If the key is deleted or the permission is removed, the storage account can no longer read its data, which is why purge protection matters.
How the exam asks about this
- "Copy blobs automatically to another account." Object replication, with versioning on both and change feed on the source.
- "Encrypt with a key you control." Customer managed key in Key Vault.
- "Force encrypted connections." Secure transfer required.
- "Copy a folder to a container quickly." AzCopy.
- "Which failover leaves the account locally redundant?" A customer initiated account failover.
What to remember for the exam
- General purpose v2 is the standard choice. Names are 3 to 24 lowercase letters and numbers.
- ZRS survives a datacenter loss. GRS and GZRS add a second region. RA versions allow reading the secondary.
- After a customer initiated failover the account is locally redundant in its new primary region.
- Object replication needs versioning on both accounts and change feed on the source.
- Encryption at rest is always on. Customer managed keys need a vault with soft delete and purge protection.
- Infrastructure encryption must be chosen at account creation.
- AzCopy copy transfers, sync matches. Storage Explorer is the graphical tool.
"Copy blobs to another region automatically" is object replication. "Make the secondary readable" is RA-GRS or RA-GZRS.
Common mistakes
Enabling object replication without versioning. The policy cannot be created.
Expecting to add infrastructure encryption later. It is set only at creation.
Assuming ZRS covers a region failure. It stays in one region. Use GRS or GZRS.
Using a customer managed key with a vault that lacks purge protection. It is not allowed.
Check yourself
What two features must be on for object replication?
Blob versioning on both accounts and change feed on the source.
Which AzCopy command makes the destination match the source?
azcopy sync.
Which encryption option must be chosen when the account is created?
Infrastructure encryption.
Topic 2 of 3 in Implement and Manage Storage
Test yourself on Implement and Manage Storage
The full Microsoft AZ-104 question bank has 650 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Microsoft. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.