4.7. Growing a File System
gfs_growcommand is used to expand a GFS file system after the device where the file system resides has been expanded. Running a
gfs_growcommand 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.
gfs_growcommand 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.
gfs_growcommand with the
-v(verbose) flags. Running the command with those flags displays the current state of the mounted GFS file system.
gfs_mkfscommand, you cannot decrease the size of the file system.
- Specifies the GFS file system to which the actions apply.
- Back up important data on the file system.
- Display the volume that is used by the file system to be expanded by running a
- Expand the underlying cluster volume with LVM. For information on administering LVM volumes, see Logical Volume Manager Administration.
gfs_growcommand 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
-vprovides additional information.
gfs_growcommand, you can run a
dfcommand on the file system to check that the new space is now available in the file system.
/mnt/gfsdirectory is extended, and then the file system is expanded.
lvextend -L35G /dev/gfsvg/gfslvExtending logical volume gfslv to 35.00 GB Logical volume gfslv successfully resized [root@tng3-1 ~]#
gfs_grow /mnt/gfsFS: 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.
- Specifies the directory where the GFS file system is mounted.
- Specifies the device node of the file system.
Table 4.3. GFS-specific Options Available While Expanding A File System
|Help. Displays a short usage message.|
|Quiet. Turns down the verbosity level.|
|Test. Do all calculations, but do not write any data to the disk and do not expand the file system.|
|Displays command version information.|
|Turns up the verbosity of messages.|