Pesquisar

Este conteúdo não está disponível no idioma selecionado.

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

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja oBlog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

© 2024 Red Hat, Inc.