Disk Storage and Storage Security
Attach managed disks to VMs, select the right disk type (HDD, SSD, Ultra), and secure storage accounts with shared access signatures and private endpoints.
Disk Storage and Storage Security is a free Cloud & IT Cert Prep lesson on CoddyKit — lesson 4 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cloud & IT Cert Prep learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
What Are Azure Managed Disks?
Azure Managed Disks are block-level storage volumes attached to Azure VMs — the cloud equivalent of a physical hard drive or SSD in a server. Azure manages the disk: it handles storage account placement, redundancy, and lifecycle automatically. Before Managed Disks, customers had to manage storage accounts and VHD files themselves, which was error-prone. Today, Managed Disks are the standard way to provide persistent OS and data storage for VMs, simplifying management and supporting availability set and zone deployments natively.
Disk Types: HDD vs SSD
Azure offers four managed disk types: Standard HDD — lowest cost, up to 500 IOPS/disk; for dev/test VMs and non-critical workloads. Standard SSD — more consistent performance than HDD, up to 6,000 IOPS; for lightly used web servers and CI/CD build agents. Premium SSD — high performance, up to 20,000 IOPS; for production databases, enterprise applications, and any I/O-sensitive workload. Ultra Disk — highest performance, up to 160,000 IOPS with sub-millisecond latency; for the most demanding workloads like SAP HANA and top-tier SQL Server. Ultra Disks require VMs with specific families and configurations.
Disk Roles: OS, Data, and Temp
An Azure VM has up to three disk roles: OS disk — contains the operating system (Windows or Linux), maximum size 4 TB, must be Premium or Standard SSD for reliable performance. Data disks — additional managed disks for application data, databases, or log files; you can attach multiple data disks (up to 32 for larger VM sizes). Temporary disk — local SSD on the host server, very fast (hundreds of thousands of IOPS) but not persistent; data is lost on VM deallocation or redeployment. Never store important data on the temporary disk.
# Create and attach a new Premium SSD data disk
az disk create \
--resource-group myRG \
--name myDataDisk \
--size-gb 256 \
--sku Premium_LRS
az vm disk attach \
--resource-group myRG \
--vm-name myVM \
--name myDataDiskDisk Snapshots and Backups
Azure Managed Disks support disk snapshots — point-in-time read-only copies of a disk at a specific moment. Snapshots are stored in Azure Storage and billed per GB of used data (not the full allocated disk size). You can create a new disk from a snapshot to restore a VM to a previous state or to clone a disk for testing. For production backup, Azure Backup automates snapshot scheduling, retention, and cross-region backup with a consistent application-aware backup rather than a raw disk snapshot.
# Create a snapshot of a managed disk
az snapshot create \
--resource-group myRG \
--source myDataDisk \
--name myDiskSnapshotShared Disks for Clustered VMs
Azure Shared Disks allow a single managed disk to be attached to multiple VMs simultaneously — enabling clustered application scenarios such as SQL Server Failover Cluster Instances or SAP ASCS clusters. Shared disks are available on Premium SSD and Ultra Disk tiers with a specific maxShares setting that limits how many VMs can mount the disk concurrently. The application is responsible for coordinating access using clustering software (Windows Server Failover Clustering or a Linux equivalent) to prevent data corruption from simultaneous writes.
Encryption at Rest for Disks
Azure Managed Disks encrypt all data at rest by default using Server-Side Encryption (SSE) with AES-256-bit keys. By default, Microsoft manages the encryption keys (Platform-Managed Keys). For organisations that require control over encryption keys, Customer-Managed Keys (CMK) stored in Azure Key Vault can be used instead. A third option — Azure Disk Encryption (ADE) — encrypts the OS and data disks using BitLocker (Windows) or DM-Crypt (Linux), so the disk is encrypted at the OS level in addition to the platform level, providing defence in depth.
Shared Access Signatures (SAS)
A Shared Access Signature (SAS) is a URI that grants restricted, time-limited access to Azure Storage resources (blobs, files, queues, tables) without sharing the account's master access keys. A SAS token specifies: Resource (which blob or container), Permissions (read, write, delete, list), Start and expiry time, and optionally IP restrictions. There are three SAS types: Account SAS (multiple services), Service SAS (single service), and User delegation SAS (backed by Entra ID credentials, most secure).
# Generate a user delegation SAS for a blob container
az storage container generate-sas \
--account-name mystorageacct \
--name mycontainer \
--permissions rl \
--expiry 2024-12-31 \
--auth-mode loginPrivate Endpoints for Storage
A Private Endpoint assigns a private IP address from your VNet to an Azure Storage account, making it accessible within your virtual network over the Azure private backbone — with no traffic flowing over the public internet. After creating a private endpoint for a storage account, you can disable the account's public endpoint entirely, ensuring it is only reachable from within the connected VNet (and via VPN/ExpressRoute from on-premises). Private endpoints are the most secure way to access storage accounts from VMs, Kubernetes clusters, or on-premises systems.
Storage Account Firewall Rules
Before implementing Private Endpoints, many organisations use the Storage Account Firewall to restrict access to specific IP ranges or virtual network subnets. The firewall is configured in the 'Networking' blade of the storage account in the Azure portal. You can allow access from: Specific public IP ranges (e.g., your office's NAT IP), specific VNet subnets (using service endpoints), or Azure services (trusted Microsoft services like Azure Backup and Azure Monitor). Firewall rules are an important layer of defence even when using RBAC for data-plane access control.
# Restrict storage account to a specific VNet subnet
az storage account network-rule add \
--account-name mystorageacct \
--resource-group myRG \
--vnet-name myVNet \
--subnet mySubnetStorage Defender and Advanced Threat Protection
Microsoft Defender for Storage (part of Defender for Cloud) monitors your storage accounts for anomalous access patterns that may indicate a security threat — such as access from unusual locations, access of many files in a short period (ransomware exfiltration), or the upload of known malware files. Defender for Storage alerts are sent to your security team and can trigger automated responses via Logic Apps or Function Apps. Enabling Defender for Storage is a best practice for production storage accounts holding sensitive or business-critical data.
Storage Security Best Practices Summary
Applying the following storage security best practices gives you a strong security posture: Never share account keys in code — use managed identities or SAS tokens. Enable RBAC for data-plane access instead of key-based auth where possible. Use Private Endpoints to eliminate public internet exposure for sensitive data. Enable Storage Firewall to restrict access to known networks. Turn on soft delete and versioning to recover from accidental deletion. Enable Defender for Storage for anomaly detection. Enforce HTTPS only to prevent unencrypted access. Together, these controls address the most common storage security risks.
Quick Check
Test your understanding of Microsoft Azure Fundamentals (AZ-900) concepts from this lesson.
Lesson Recap
In this lesson you learned: managed disks come in four types — Standard HDD, Standard SSD, Premium SSD, and Ultra Disk — each suited for different performance and cost requirements, Shared Access Signatures provide time-limited, permission-scoped access to storage resources without sharing master keys, and private endpoints and storage firewalls restrict access to trusted networks, eliminating public internet exposure. Next up we begin Azure Networking — starting with Virtual Networks and subnets.
Frequently asked questions
Is the “Disk Storage and Storage Security” lesson free?
Yes — the full text of “Disk Storage and Storage Security” is free to read here on the web, and the Cloud & IT Cert Prep course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cloud & IT Cert Prep course, upgrade to CoddyKit PRO.
What will I learn in “Disk Storage and Storage Security”?
Attach managed disks to VMs, select the right disk type (HDD, SSD, Ultra), and secure storage accounts with shared access signatures and private endpoints. You practise Cloud & IT Cert Prep with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Cloud & IT Cert Prep?
No prior experience is required. Cloud & IT Cert Prep on CoddyKit is structured for beginners through advanced learners; this is — lesson 4 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Disk Storage and Storage Security” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Cloud & IT Cert Prep lesson?
Yes. Every Cloud & IT Cert Prep lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Azure Storage Accounts
- Blob Storage: Object Storage for the Cloud
- Azure Files and Queue Storage
- Disk Storage and Storage Security