Microsoft Azure / Linux admin

Extend XFS filesystem without downtime

I’m sure you gonna love it!

Shaheer

--

Yes. What I mean is NOT expanding the primary operating system disk. Attached disk expansion on Linux machines is the topic at hand (Ubuntu for eg. with Azure managed disk in this article). Please refer to the link at the bottom of this page for information on how to increase the size of the operating system disk.

Okay, so let’s begin.

Photo by Harley-Davidson on Unsplash

In the Az portal, you can see that the size of the disk I attached to the VM is 10G.

The operating system disk is visible at the top of the screen and is not my topic of interest here.

From OS:

You’ve decided to upgrade the disk by some arbitrary amount, say 5GB. So, to begin, create the room in the Azure portal.

However, your server hasn’t updated to reflect this change just yet.

Therefore, let’s learn the specifics of the target mount’s mapping.

Scan the disk now for the modifications.

Next, update the volume’s first logical partition (sdc1) with the new information about the size.

but don’t take that as the final word. The mount size will not update until the XFS filesystem is extended. Put xfs_growfs in the mount path to accomplish this.

In case you’re interested in extending the OS disk, I found this article to be helpful, though I haven’t personally tried it 🙃

I really hope you got something out of this Medium guide! As I go along, I’ll be adding details that you might not be able to find elsewhere online 😜

--

--