Extending CentOS7 partition on Azure

Using CentOS7 templates on Azure could result in lack of LVM, swap and non auto-extendable partitions. Some other templates have such feature, but not all of them. In case you assigned bigger disk in Azure portal you need still to do few things. First delete /dev/sda2 partition:

Text
fdisk /dev/sda
d
2
w

Then reboot to apply.

Text
yum install cloud-utils-growpart -y
growpart /dev/sda 1
xfs_growfs /dev/sda1
View as Markdown

All the content on this website is licensed under Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0). Cite as: Michał Sobczak, “Extending CentOS7 partition on Azure”, 19 August 2022, https://michalasobczak.pl/posts/extending-centos7-partition-on-azure.html