3.6. Growing a File System

3.6. Growing a File System

The gfs_grow command is used to expand a GFS file system after the device where the file system resides has been expanded. Running a gfs_grow command on an existing GFS file system fills all spare space between the current end of the file system and the end of the device with a newly initialized GFS file system extension. When the fill operation is completed, the resource index for the file system is updated. All nodes in the cluster can then use the extra storage space that has been added.

The gfs_grow command must be run on a mounted file system, but only needs to be run on one node in a cluster. All the other nodes sense that the expansion has occurred and automatically start using the new space.

To verify that the changes were successful, use the gfs_grow command with the -T (test) and -v (verbose) flags. Running the command with those flags displays the current state of the mounted GFS file system.


gfs_grow MountPoint

Specifies the GFS file system to which the actions apply.


Before running the gfs_grow command:

  • Back up important data on the file system.

  • Display the volume that is used by the file system to be expanded by running a df MountPoint command.

  • Expand the underlying cluster volume with LVM. For information on administering LVM volumes, see the LVM Administrator's Guide

The gfs_grow command provides a -T (test) option that allows you to see the results of executing the command without actually expanding the file system. Using this command with the -v provides additional information.

After running the gfs_grow command, you can run a df MountPoint command on the file system to check that the new space is now available in the file system.


In this example, the underlying logical volume for the file system file system on the /mnt/gfs directory is extended, and then the file system is expanded.

[root@tng3-1 ~]# lvextend -L35G /dev/gfsvg/gfslv
  Extending logical volume gfslv to 35.00 GB
  Logical volume gfslv successfully resized
[root@tng3-1 ~]# gfs_grow /mnt/gfs
FS: Mount Point: /mnt/gfs
FS: Device: /dev/mapper/gfsvg-gfslv
FS: Options: rw,hostdata=jid=0:id=196609:first=1
FS: Size: 5341168
DEV: Size: 9175040
Preparing to write new FS information...

Complete Usage

gfs_grow [Options] {MountPoint | Device} [MountPoint | Device]

Specifies the directory where the GFS file system is mounted.


Specifies the device node of the file system.

Table 3.3, “GFS-specific Options Available While Expanding A File System” describes the GFS-specific options that can be used while expanding a GFS file system.

Option Description
-h Help. Displays a short usage message.
-q Quiet. Turns down the verbosity level.
-T Test. Do all calculations, but do not write any data to the disk and do not expand the file system.
-V Displays command version information.
-v Turns up the verbosity of messages.
Table 3.3. GFS-specific Options Available While Expanding A File System

Note: This documentation is provided {and copyrighted} by Red Hat®, Inc. and is released via the Open Publication License. The copyright holder has added the further requirement that Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder. The CentOS project redistributes these original works (in their unmodified form) as a reference for CentOS-5 because CentOS-5 is built from publicly available, open source SRPMS. The documentation is unmodified to be compliant with upstream distribution policy. Neither CentOS-5 nor the CentOS Project are in any way affiliated with or sponsored by Red Hat®, Inc.