Search

4.7. Growing a File System

download PDF
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.

Note

Once you have created a GFS file system with the gfs_mkfs command, you cannot decrease the size of the file system.

Usage

gfs_grow MountPoint
MountPoint
Specifies the GFS file system to which the actions apply.

Comments

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 Logical Volume Manager Administration.
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.

Examples

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...
Done.

Complete Usage

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

MountPoint
Specifies the directory where the GFS file system is mounted.
Device
Specifies the device node of the file system.
Table 4.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.
Table 4.3. GFS-specific Options Available While Expanding A File System
OptionDescription
-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.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.