Partition didn't reflect the changes after increasing OS Disk Size in Azure.

Sameer Keluskar 11 Reputation points
2020-01-29T14:05:14.023+00:00

Hi,

I have a Ubuntu VM which has an unmanaged OS disk associated with it.

When we increased the size of the unmanaged OS disk from 30 GB to 50 GB(after deallocating the VM and increasing its size from the platform), the changes are not reflected in the filesystem /dev/sda1 and it is continuing to show the size of the partition to be 30 GB.

The increased 20 GB is shown as a free space when I RDP my VM.

Could anyone please help me with increasing the size of /dev/sda1 filesystem to 50 GB?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,566 questions
{count} votes

6 answers

Sort by: Most helpful
  1. Luis Gutierrez (MSFT) 31 Reputation points Microsoft Employee
    2021-08-13T22:52:25.003+00:00

    If you happen to stumble on this, I faced the same issue as described above. Changing the partition to 64GB, 128GB would reflect in the VM itself, but the OS partition would still remain the default 32GB.

    After looking at logs, I noticed some strange errors. Turns out my disk was way to full (99.9%). When the resize VM (ubuntu for example) occurs; Azure Resized the physical disk, then ubuntu performs the expand. Expand fails because there is not enough storage to run the process. This is why you're left with the same space.

    FIX:

    1. Delete some files on the VM (in my instance, clear /tmp)
    2. Turn the VM off
    3. Expand the Disk again (I dont think this is needed but I did it anyways)
    4. Turn the VM on. The disk should now show the correct size for /

    If your VM won't even turn on, you can delete files using the recovery console documented here: https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-grub-single-user-mode

    Good luck!

    6 people found this answer helpful.

  2. Shivendoo Kumar 736 Reputation points
    2020-07-02T01:39:46.503+00:00

    This worked. It was added a a new Volume.

    https://learn.microsoft.com/en-us/azure/virtual-machines/windows/attach-managed-disk-portal

    Initialize a new data disk
    Connect to the VM.
    Select the Windows Start menu inside the running VM and enter diskmgmt.msc in the search box. The Disk Management console opens.
    Disk Management recognizes that you have a new, uninitialized disk and the Initialize Disk window appears.
    Verify the new disk is selected and then select OK to initialize it.
    The new disk appears as unallocated. Right-click anywhere on the disk and select New simple volume. The New Simple Volume Wizard window opens.
    Proceed through the wizard, keeping all of the defaults, and when you're done select Finish.
    Close Disk Management.
    A pop-up window appears notifying you that you need to format the new disk before you can use it. Select Format disk.
    In the Format new disk window, check the settings, and then select Start.
    A warning appears notifying you that formatting the disks erases all of the data. Select OK.
    When the formatting is complete, select OK.

    3 people found this answer helpful.

  3. Birendra Singh 181 Reputation points
    2020-02-03T15:44:26.31+00:00

    you need to format disk using diskmgmt.msc

    2 people found this answer helpful.
    0 comments No comments

  4. jakaruna-MSFT 596 Reputation points Microsoft Employee
    2020-01-31T05:06:19.31+00:00

    HI,
    Size is increased in the platform But you still need to grow the partition in the VM to use that size.

    This document discusses about expanding a disk. But that document id meant for additional disk,

    From your description it looks like you want to grow the os disk itself.

    So you cant unmmount that disk.
    .
    You can follow the document from the command "parted /dev/sdc" in the document.

    Always take a snapshot of the disk before doing operations on partitions for safety.

    Try this out and let me know.


  5. Shivendoo Kumar 736 Reputation points
    2020-07-01T12:03:31.05+00:00

    Hi All,

    I am facing same issue. I increased my data disk size from 512 GB to 1536 GB and It was success on Portal (Stopped VM, Increased Data Disk Size and Restarted VM--RDP to VM and tried Extend Volume ) but It is keep throwing message "The New Size Must be less than or equal to Max Size". I also I noticed Max size is still 512 GB.

    https://querysurge.zendesk.com/hc/en-us/articles/115002530951-Azure-Expand-Disk-

    0 comments No comments