---
title: "Extending CentOS7 partition on Azure"
url: https://michalasobczak.pl/posts/extending-centos7-partition-on-azure.html
author: "Michał Sobczak"
description: "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."
published: 2022-08-19T08:44:08.000Z
updated: 2022-09-06T10:43:40.000Z
language: en
categories: ["Technology"]
tags: ["Azure", "CentOS"]
license: CC BY-NC-ND 4.0 (https://creativecommons.org/licenses/by-nc-nd/4.0/)
---
# 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
```
