How to increase file system in Azure LINUX VM without VM resizing

Azure LINUX VM file system expansion without VM resizing

Based on usages we may often need to expand the file systems to accommodate various application demands. Whenever your virtual machine is hosted in Azure or any other IAAS cloud services.

As per their offerings, virtual machines come with restrictions on that the number of luns can be associated with a specific virtual machine type.

For example, see below DV2 Series virtual machines number of LUNs can be provisioned. If you have further space requirements you will be forced to virtual machine resizing which may lead to additional costs.

So how we can achieve this without resizing the virtual machines. We are discussing the same thing here how we can achieve further space requirements without resizing virtual machines.

The solution is quite simple to expand the existing LUN size and reconfigure it on your RHEL virtual machines and you will be good and can avoid virtual machine resizing and you will be only paying only for the storage you additionally required and you will have better control overpricing.

Below are the steps you need to perform on a virtual machine to start using additional space recently added by increasing LUN size.

Azure LINUX VM Details

AZURE LINUX VM: How to expand File System without VM Resize

The procedure to be used for how to extend FS in Azure Linux VM without VM Resize is as below.

1.Run below command to detect the new lun size to OS.
# echo 1 > /sys/block/sdc/device/rescan
2.Resize physical Volume like below
# pvresize /dev/sdc
3.Extend Logical Volume(Re-reading configuration)
Below command will increase the LV size to total 10G and FS will 
be resized too .
# lvextend -L10G -r /dev/vgName/LVName
Below command will only add 10G with previous size + FS resize
# lvextend -L+10G -r /dev/vgName/LVName
Below command will extend to all extended space + FS resize and 
you will see file system is expanded.
# lvextend -l +100%FREE -r /dev/vgName/LVName

Use any above method to have FS expanded without VM resizing. That`s all about how you can avoid VM resize and keep the VM cost in control without any impact. An efficient way to keep VM cost in control.

Thanks for keep going through the above procedure. If you like you can subscribe to our newsletter to get the latest tips, tricks, and how-to steps to accomplish a specific task. Please do not hesitate to share this with all possible social accounts where ever you have a presence.

Other similar topics in which you might be interested …

How to Resize VM in AZURE

Virtual Machine Sizes inĀ AZURE

How to setup ASR in AZURE

Memory and CPU reservation in VMWare

Virtual Machine Heath is in Critical State in ASR

How to expand stripped volume in Azure