Bobcares

Extend XFS filesytem

by | Apr 13, 2022

Wondering how to Extend XFS filesytem? We can help you.

At Bobcares, we offer solutions for every query, big and small, as a part of our Server Management Service.

Let’s take a look at how our Support Team help a customer  deal with this query.

How to Extend XFS filesytem?

Use the xfs_growfs command to increase the size of an XFS file system.

The XFS file system must be mounted and there must be space available on the underlying device.

The xfs_growfs utility is most often used with logical volumes. The syntax of the xfs_growfs command is as follows:

# xfs_growfs [options] mount-point

Today, let us see the steps followed by our Support techs to perform this task.

1.Firstly, verify current size of XFS filesystem

xfs_growfs -n /dev/vg_test/lv_test

The -n option does not actually extend the XFS filesystem.

But just prints the current filesystem details. Aslo check for the “df -h” command output to view current size of the mount point.

2. Then, extend the underlying device (lvextend, grow LUN, expand partition).

Before we grow the XFS filesystem, we need to extend the underlying LVM volume.

If possible, you may extend an existing physical volume in the LVM VG. Create a new PV to expand the LV.

Identify the new disk and create a Physical Volume.

#pvcreate /dev/sdc

Extent the Volume Group vg_test using the new PV.

#vgextend vg_test /dev/sdc

Verify the new size of the volume group.

#lvgdisplay vg_test

Extend the logical volume to the desired size using the “lvresize” command.

#lvresize -L +35g /dev/vg_test/lv_test

3. Growing the XFS file system

#xfs_growfs /dev/vg_test/lv_test

You can view the XFS volume details using the “xfs_info” command as shown below.

Note the blocks for the data volume.

#xfs_info /dev/vg_test/lv_test

4. Verify the new size of the XFS file system in “df -h” command output.

#df -hP /data

[Need a solution to another query? We are just a click away.]

Conclusion

Today, we saw steps followed by  our Support Engineers to extend XFS filesytem.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.