How to Efficiently Extend size of an xfs File System Size with logical volume (LVM) on Red Hat Enterprise Linux

buildings, city, illuminated, XFS File System with lvm in Red Hat Enterprise
Photo by <a href="" target="_blank" rel="noopener noreferrer">igormattio</a> on <a href="" target="_blank" rel="noopener noreferrer">Pixabay</a>

In this guide, we delve into extending the XFS file system on Red Hat Enterprise Linux, a high-performance file system renowned for enterprise scalability. Known for its unmatched reliability, XFS is the preferred choice for handling large data sets. Learn about the essential methods and tools to achieve seamless XFS expansion.”


  1. What is the XFS File System?
  2. Why Choose Red Hat Enterprise Linux for XFS?
  3. Understanding LVM: What are Logical Volumes?
  4. How to Extend a Logical Volume in Linux?
  5. What Role does the xfs_growfs Command Play?
  6. When to Consider Striped Logical Volumes?
  7. Using fdisk to Partition: Is it Still Relevant?
  8. Increasing the Size: How does XFS Compare to Ext4?
  9. Red Hat Training: Where to Go for Advanced Knowledge?
  10. Common Pitfalls and Troubleshooting Tips
  11. Step by step guide
  12. Conclusion

1. What is the XFS File System?

XFS is a scalable, journaling file system. Silicon Graphics originally developed it for IRIX. Now, it’s part of the Linux kernel. Many enterprises use it. XFS excels with large files and quick I/O. It supports file systems up to 8 exabytes. This makes it great for big datasets.

2. Why Choose Red Hat Enterprise Linux for XFS?

Red Hat Enterprise Linux (RHEL) is a popular enterprise-grade Linux distribution that provides robust support for XFS file systems. It offers advanced features and tools for managing and optimizing the performance of XFS file systems. The Red Hat Customer Portal provides comprehensive documentation and resources to help users get the most out of their XFS file systems in a Red Hat environment.

3. Understanding LVM: What are Logical Volumes?

Logical Volume Management (LVM) is a powerful tool that allows users to manage storage devices and create logical volumes, which can be used as virtual partitions. LVM provides flexibility and efficiency in managing storage space, allowing users to easily resize and move partitions as needed without disrupting the data stored within them. Logical volumes act as a layer between physical storage devices and file systems, allowing for easier management of storage space.

4. How to Extend a Logical Volume in Linux?

Extending a logical volume in Linux is a process that involves several steps. To begin with, you need to ensure that there is unallocated space available in the volume group. Typically, this can be achieved by either adding a new physical volume to the volume group or by resizing an existing physical volume. After ensuring the volume group has enough free space, you can then proceed to use the lvextend command to extend the logical volume to your desired size. Subsequently, and as a crucial final step, you need to resize the file system. For instance, you would use the resize2fs command for ext4 file systems, while for XFS file systems, xfs_growfs would be the appropriate choice.

5. What Role does the xfs_growfs Command Play?

The xfs_growfs command is a utility used to expand the size of an XFS file system. It allows users to increase the size of the file system to utilize any unused space within the underlying storage. By specifying the mount point of the XFS file system and the new desired size, the xfs_growfs command ensures that the file system expands to accommodate the additional storage space. This command is essential when extending the size of an XFS file system in Red Hat Enterprise Linux.

6. When to Consider Striped Logical Volumes?

Striped logical volumes can be beneficial in certain scenarios where high performance and throughput are required. When dealing with large amounts of data or high-resolution video editing, for example, striped logical volumes can help distribute the workload across multiple physical volumes, improving read and write performance. However, it is important to carefully consider the specific requirements of your workload before implementing striped logical volumes, as they may not always provide a performance advantage.

7. Using fdisk to Partition: Is it Still Relevant?

fdisk is a traditional command-line tool used for managing disk partitions in Linux. While it is still a widely used tool, newer utilities such as parted and gdisk have gained popularity due to their improved functionality and support for modern disk technologies, such as GUID Partition Table (GPT) and larger disk sizes. fdisk can still be useful in certain scenarios, particularly for managing older disk formats or for users who prefer its simple and straightforward interface.

8. Increasing the Size: How does XFS Compare to Ext4?

Both XFS and ext4 are popular file systems used in Linux. While ext4 is the default file system in many Linux distributions, XFS is the preferred choice for handling larger file systems and heavy workloads. XFS has a number of advantages over ext4, including better performance with large files, faster metadata operations, and the ability to support larger file systems. However, ext4 may be a better choice for smaller file systems and simple use cases where the additional features offered by XFS are not necessary.

9. Red Hat Training: Where to Go for Advanced Knowledge?

Red Hat offers a range of training courses and certifications for IT professionals who want to expand their knowledge and skills in managing Red Hat Enterprise Linux systems, including XFS file systems. The Red Hat Training and Certification program provides hands-on training, online courses, and exams to ensure that professionals have a solid understanding of Red Hat technologies. By taking advantage of these resources, individuals can enhance their expertise and stay up-to-date with the latest industry practices.

10. Common Pitfalls and Troubleshooting Tips

When extending the size of an XFS file system in Red Hat Enterprise Linux, there are a few common pitfalls that users may encounter. One common issue is not having enough free space in the volume group to extend the logical volume. This can be resolved by adding new physical volumes or resizing existing ones. Another potential issue is mismatched kernel and xfsprogs versions, which can cause compatibility issues. It is important to ensure that the kernel and xfsprogs packages are updated to the latest versions to avoid any conflicts.

11. Step-by-step Guide

Here’s how to extend an XFS file system in Red Hat Enterprise Linux:

Step 1: Expand PV (Physical Volume)
First you have to make sure that the additional storage space is recognized by LVM.
pvresize /dev/sdb

Step 2: Check available memory
Use the following command to check how much free space is available in the volume group (vg00).

Step 3: Expand LV (Logical Volume)
The root file system (/dev/mapper/vg00-root) must be extended. To extend the logical volume vg00-root, use all the available space in the volume group.
lvextend -l +100%FREE /dev/mapper/vg00-root

Step 4: Extend file system
Since XFS is used, xfs_growfs must be used to extend the file system.
xfs_growfs /dev/mapper/vg00-root

The file system is extended “live”, i.e. while it is mounted and in use.

Step 5: Check the available disk space
Finally, check the available space to make sure the expansion was successful.
df -h

Follow these steps for successful XFS extension in Red Hat. This ensures ample storage for your data.

Every Linux admin faces storage expansion. This article explores XFS in Red Hat Enterprise Linux. We examine its link with Logical Volume Manager (LVM). Growing storage demand makes XFS knowledge vital. We cover XFS basics, LVM, and command execution. Discover how Red Hat simplifies this process!

Key Takeaways:

  • XFS is a high-performance file system optimized for large-scale data operations.
  • RHEL offers a stable environment for XFS, with XFS being the default file system from RHEL 7 onwards.
  • LVM provides flexibility in disk management, allowing for easy resizing and extension of logical volumes.
  • Tools like xfs_growfs and fdisk are essential for managing XFS filesystems and partitions in Linux.
  • Continuous learning and staying updated with RHEL training resources can help tackle complex storage scenarios.

Explore storage management with ease. With the right tools, extending XFS in RHEL Enterprise Linux is simple!


In conclusion, expanding storage on RedHat with LVM and XFS may seem complex. However, it’s straightforward when broken down. Firstly, expand the Physical Volume. Then, check the available storage. This prepares you for the next steps. Next, extend the Logical Volume. After that, expand the filesystem. This boosts the capacity of your root or home directory. By using LVM and XFS, administrators optimize storage. This ensures RedHat systems run well.

Always back up your data before starting. Changes can risk your data. With this guide, expanding storage on RedHat becomes easier. It addresses your system’s needs.

For more on LVM or Linux, check out Tech Radar 24. We aim to update you with the latest tech insights. We guide you through changing tech trends.

Additional Resources

Related Post

Cookie Consent with Real Cookie Banner