Score:0

Resize an OS disk that has a MBR partition - azure linux vm

sn flag

We have a managed OS disk attached to a Linux VM (Ubuntu) that have 64 GB in size, and it's using MBR partition table with azure vm generation 1, now we want to expand the disk space to 128 GB !

From the azure doc I found this article https://docs.microsoft.com/en-us/azure/virtual-machines/linux/resize-os-disk-gpt-partition, but it explains just the case of GPT partition table,

I know, I need to stop the machine and expand the disk from the azure portal and then do X steps to let the OS use the space added !

Can you please explain the X steps needed ?

PS: the application data is in the OS disk, no data disk is attached to the machine !

Update:

df -hT output 

Filesystem     Type      Size  Used Avail Use% Mounted on
udev           devtmpfs  7.9G     0  7.9G   0% /dev
tmpfs          tmpfs     1.6G   97M  1.5G   7% /run
/dev/sda1      ext4       59G   55G  3.3G  95% /
tmpfs          tmpfs     7.9G     0  7.9G   0% /dev/shm
tmpfs          tmpfs     5.0M     0  5.0M   0% /run/lock
tmpfs          tmpfs     7.9G     0  7.9G   0% /sys/fs/cgroup
/dev/sdb1      ext4       32G   48M   30G   1% /mnt
tmpfs          tmpfs     1.6G     0  1.6G   0% /run/user/1001
tmpfs          tmpfs     1.6G     0  1.6G   0% /run/user/1000

Thanks in advance

djdomi avatar
za flag
you did not told what kind of filesystem you used
Appleoddity avatar
ng flag
It doesn’t matter that this is Azure. It doesn’t change anything. You can follow any instructions about how to expand a Linux volume that works for your system. And it depends on what file system you are using and if it is an LVM volume or standard volume.
Hamza AZIZ avatar
sn flag
Question has been updated with the filesystem type
David Makogon avatar
cn flag
@Appleoddity - it does matter that this is Azure. There are specific instructions for expanding disk size via the portal or cli, that are handled outside of the vm itself (and those instructions are documented in the doc page the OP linked to). As for the question itself, I'm not quite sure what issue the OP is having or what additional info is needed, since the referenced doc should cover everything...
David Makogon avatar
cn flag
The linked-to article has information for expanding disks, and describes both MBR and GPT. It's unclear, from your question, what the specific issue is that you're having. I suggest editing to be specific. Right now, you've shown your disk layout and asked for documentation (which you already have a link to).
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.