Top Nav

Add Storage To LVM/XFS Partition

Let’s assume that you have XFS formatted partition hosted on LVM named “/dev/vg1/gfs1” where “vg1” is the “volume group” and “gfs1” is the “logical volume”. You want to add an additional drive named “dev/xvdc” to the partition to increase storage. Here are the steps:

1. Partition the new drive with fdisk

2. Setup /dev/xvdc1 as an LVM physical volume:

3. Add /dev/xvdc1 to the LVM volume group:

You can show volume group detail to see the newly available storage:

Notice that “Free PE” is 100GB which is the size of our new /dev/xvdc drive.

4. Extend logical volume to use newly available storage:

5. Grow the XFS filesystem on “gfs1”:

And that’s it ..

Of course there are lots of possible variations on the process. For example maybe you don’t want to allocate all of the free space to one single logical volume but these steps should provide a good starting place.