Azure / Azure/WALinuxAgent

Add ability to grow XFS partition automatically in CentOS

Open
#1,487 1 comment 1 reaction 0 assignees View on GitHub
provisioning triaged
Dominant language
Python
Stars
581
Forks
397
Avg merge
2d 15h
Merged PRs (30d)
9

Description

One of the nice benefits of cloud-init is its ability to automatically grow an XFS filesystem upon first boot. This makes it so you can start with a small base image and deploy VMs with larger filesystems as needed.

The WALinuxAgent does not appear to support this, but these are the following steps I followed in order to grow the XFS file system of a CentOS image after growing its disk in Azure.

1. Install growpart script for growing a partition
```
yum install -y cloud-utils-growpart
```
2. Extend partition 1 in /dev/sda
```
growpart /dev/sda 1
```
3. Expand /dev/sda1 to fill entire partition
```
xfs_growfs /dev/sda1
```

Contributor guide

Open the contributing guide

Research direction

Start by tracing WALinuxAgent's existing disk or filesystem resize handling and compare it with the reported CentOS steps using cloud-utils-growpart, growpart /dev/sda 1, and xfs_growfs /dev/sda1. Done means the agent can automatically grow an XFS filesystem after an Azure disk expansion on the stated CentOS scenario, with behavior verified against the existing agent checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, centos, python
Domain
cloud, infrastructure, operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.