4.7. Adding Journals to a File System


The gfs2_jadd command is used to add journals to a GFS2 file system. You can add journals to a GFS2 file system dynamically at any point without expanding the underlying logical volume. The gfs2_jadd command must be run on a mounted file system, but it needs to be run on only one node in the cluster. All the other nodes sense that the expansion has occurred.

Note

If a GFS2 file system is full, the gfs2_jadd will fail, even if the logical volume containing the file system has been extended and is larger than the file system. This is because in a GFS2 file system, journals are plain files rather than embedded metadata, so simply extending the underlying logical volume will not provide space for the journals.
Before adding journals to a GFS file system, you can use the journals option of the gfs2_tool to find out how many journals the GFS2 file system currently contains. The following example displays the number and size of the journals in the file system mounted at /mnt/gfs2.
[root@roth-01 ../cluster/gfs2]# gfs2_tool journals /mnt/gfs2
journal2 - 128MB
journal1 - 128MB
journal0 - 128MB
3 journal(s) found.

Usage

gfs2_jadd -j Number MountPoint
Number
Specifies the number of new journals to be added.
MountPoint
Specifies the directory where the GFS2 file system is mounted.

Examples

In this example, one journal is added to the file system on the /mygfs2 directory.
gfs2_jadd -j1 /mygfs2
In this example, two journals are added to the file system on the /mygfs2 directory.
gfs2_jadd -j2 /mygfs2

Complete Usage

gfs2_jadd [Options] {MountPoint | Device} [MountPoint | Device]
MountPoint
Specifies the directory where the GFS2 file system is mounted.
Device
Specifies the device node of the file system.
Table 4.4, “GFS2-specific Options Available When Adding Journals” describes the GFS2-specific options that can be used when adding journals to a GFS2 file system.
Table 4.4. GFS2-specific Options Available When Adding Journals
FlagParameterDescription
-h  Help. Displays short usage message.
-J MegaBytes Specifies the size of the new journals in megabytes. Default journal size is 128 megabytes. The minimum size is 32 megabytes. To add journals of different sizes to the file system, the gfs2_jadd command must be run for each size journal. The size specified is rounded down so that it is a multiple of the journal-segment size that was specified when the file system was created.
-j Number Specifies the number of new journals to be added by the gfs2_jadd command. The default value is 1.
-q  Quiet. Turns down the verbosity level.
-V  Displays command version information.
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.