Cause #1: The Guest OS Needs a Rescan (Most Common)
Nine times out of ten, when I get a call about a missing disk after a resize, the disk is there at the Azure level but the guest operating system hasn't noticed. Resizing a managed disk in Azure doesn't magically tell Windows or Linux to look for more space. You've got to manually trigger a rescan.
I had a client last month who resized their data disk on a Windows Server 2019 VM, then called me panicking because the D: drive still showed the old size. They'd even rebooted once and still nothing. The fix wasn't a reboot—it was a simple disk rescan from within Disk Management.
Windows: Run a Disk Rescan
- Open Disk Management (diskmgmt.msc).
- Click Action in the menu bar.
- Select Rescan Disks.
That's it. The new capacity appears within seconds. If the disk still shows as unallocated space, you'll need to extend the volume.
Linux: Rescan with a Command
On Linux, the rescan is even more direct. I've done this a hundred times on Ubuntu and CentOS boxes. Run:
sudo fdisk -lIf you don't see the new size, force a rescan of the SCSI devices:
for host in /sys/class/scsi_host/host*; do echo "- - -" > $host/scan; doneThen re-check with lsblk or fdisk -l. The disk should now show the expanded capacity. If it doesn't, you might need to refresh the partition table with partprobe.
Why this is the first fix to try: It's non-destructive, takes ten seconds, and solves most cases. Skip this and you'll waste hours chasing ghosts.
Cause #2: The Disk Isn't Attached to the VM
Believe it or not, Azure sometimes detaches a data disk when you resize the VM itself (not the disk). This happened to me on a production SQL server last year. I resized the VM from Standard_D4s_v3 to D8s_v3, and when the VM came back up, the extra data disk was gone from the OS entirely. The disk was still in the resource group, but it wasn't attached.
Why does this happen? It's a known quirk when resizing a VM that has disks attached with certain caching settings. Azure doesn't always maintain the attachment during the resize operation. The fix is simple—re-attach the disk manually.
How to Re-attach a Data Disk
- In the Azure portal, go to your VM and select Disks.
- Click Attach existing disks.
- Select the data disk that's missing (check the LUN number) and save.
After re-attaching, you'll need to go back to Cause #1 and rescan in the guest OS. The disk will show up with its data intact—no data loss, just a reconnection.
How to spot this: If you rescan and the disk still doesn't appear, go check the VM's disks blade in Azure. If the disk isn't listed there as attached, that's your problem.
Cause #3: Partition Table or Filesystem Size Not Updated
Once the OS sees the disk and the capacity looks right, but you still can't use the new space, you're dealing with a partition and filesystem that need to be extended. This is especially common when you resize a disk that has a partition table with fixed-size entries.
I had a Linux VM running PostgreSQL where the data disk was resized from 64 GB to 128 GB. The OS saw 128 GB, but the partition /dev/sdc1 still only used 64 GB. The fix involved growing the partition and then the filesystem.
Windows: Extend the Volume
- Open Disk Management.
- Right-click the volume on the disk you resized.
- Select Extend Volume and follow the wizard.
If the Extend option is greyed out, you might have to delete the volume and recreate it—but that wipes data, so only do that if you have a backup. Most of the time, if the volume is NTFS and the space is contiguous, Extend just works.
Linux: Grow Partition and Filesystem
This is where it gets fun. You'll typically use growpart to expand the partition, then resize2fs (for ext4) or xfs_growfs (for XFS).
sudo growpart /dev/sdc 1That expands partition 1 to the full disk. Then for ext4:
sudo resize2fs /dev/sdc1For XFS, you don't need to grow the partition the same way—just run xfs_growfs /mountpoint.
Pro tip: Always check the filesystem type before running resize commands. Running resize2fs on an XFS filesystem will error out. I've seen that mistake more than once.
Quick Reference: Azure Disk Not Detected After Resize
| Symptom | Most Likely Cause | Fix |
|---|---|---|
| Disk not visible in OS | No rescan performed | Rescan disks in Disk Management or run SCSI rescan in Linux |
| Disk not listed in Azure VM blades | Disk detached during VM resize | Attach the disk back in the Azure portal |
| Disk visible but capacity not increased | Partition/filesystem not extended | Extend volume (Windows) or growpart + resize2fs/xfs_growfs (Linux) |
If you try all three and still get nothing, check if the disk is actually premium SSD vs standard HDD—sometimes the VM size doesn't support the disk type after a resize. But that's rare. Start with the rescan, and you'll fix most cases.