Existing data will be lost if I resize(incresae) ubuntu VM OS disk(Premium SSD)?

Junan Chakma 21 Reputation points
2020-09-29T06:03:43.94+00:00

I want to increase/resize ubuntu VM os disk(Premium SSD) size, currently it is 30GB. I can do it from Azure web portal. But my question is after resizing the VM disk, my old data will be exist? I don't want to lose existing data as the VM is running in production.

And resizing(increasing) the disk will effect in performance? And how long it will take to resize? I want to know as there will be downtime for it for the server.

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

Accepted answer
  1. prmanhas-MSFT 17,906 Reputation points Microsoft Employee
    2020-09-29T08:35:21.55+00:00

    @Junan Chakma Thank you for your query.

    Ideally resizing of disk can be done only for greater sizes and you won't be losing data in the process but It is always recommended from Microsoft side to take backup of the disk when you are doing disk resizing.

    Moreover in your case since this is in production you should make sure you do have backup in place.

    You can protect your data by taking backups at regular intervals. Azure Backup creates recovery points that are stored in geo-redundant recovery vaults. When you restore from a recovery point, you can restore the whole VM or specific files. Yu can read more about it here.

    Resizing an OS or Data Disk of an Azure Virtual Machine requires the virtual machine to be deallocated.

    After expanding the disks, you need to expand the volume within the OS to take advantage of the larger disk.

    Coming to the time taken for resize it may depend upon various factors but don't take much time mostly in few min. in most of the cases.

    You can refer to this for more information of resizing disk and this might be helpful as well.

    Since it is a production environment I will always suggest to make any changes during off business hours so just in case something goes wrong your production is not impacted.

    Hope it helps :) !!!

    Please 'Accept as answer' if it helped, so that it can help others in the community looking for help on similar topics

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. FAISAL VALPARAMBIL 1 Reputation point
    2021-02-11T13:19:33.807+00:00

    Just detach the disk and resize. your existing data will not lose.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.