Fix Azure Disk Not Detected on VM After Resize

If your Azure VM doesn't see a disk after resizing, the guest OS needs a rescan or reboot. Here are the top three causes and quick fixes.

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

  1. Open Disk Management (diskmgmt.msc).
  2. Click Action in the menu bar.
  3. 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 -l

If 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; done

Then 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

  1. In the Azure portal, go to your VM and select Disks.
  2. Click Attach existing disks.
  3. 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

  1. Open Disk Management.
  2. Right-click the volume on the disk you resized.
  3. 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 1

That expands partition 1 to the full disk. Then for ext4:

sudo resize2fs /dev/sdc1

For 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

SymptomMost Likely CauseFix
Disk not visible in OSNo rescan performedRescan disks in Disk Management or run SCSI rescan in Linux
Disk not listed in Azure VM bladesDisk detached during VM resizeAttach the disk back in the Azure portal
Disk visible but capacity not increasedPartition/filesystem not extendedExtend 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.

Related Errors in Server & Cloud
Container in VM Can't Reach Internet? Fix NAT and DNS 0X000004DA Fix ERROR_ALREADY_REGISTERED (0X000004DA) on Windows Server Parallels Shared Network Dead After Update? Here's the Fix 0XC003005F Fixing RPC_NT_PIPE_CLOSED (0XC003005F) on Windows Server

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.