검색

이 콘텐츠는 선택한 언어로 제공되지 않습니다.

4.8. Adding Journals to a File System

download PDF
The gfs_jadd command is used to add journals to a GFS file system after the device where the file system resides has been expanded. Running a gfs_jadd command on a GFS file system uses space between the current end of the file system and the end of the device where the file system resides. When the fill operation is completed, the journal index is updated.
The gfs_jadd command must be run on mounted file system, but it only needs to be run on one node in the cluster. All the other nodes sense that the expansion has occurred.
To verify that the changes were successful, use the gfs_jadd 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.

Usage

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

Comments

Before running the gfs_jadd command:
  • Back up important data on the file system.
  • Run a df MountPoint command to display the volume used by the file system where journals will be added.
  • Expand the underlying cluster volume with LVM. For information on administering LVM volumes, see the LVM Administrator's Guide
You can find out how many journals are currently used by the file system with the gfs_tool df MountPoint command. In the following example, the file system mounted at /mnt/gfs uses 8 journals.
[root@tng3-1 gfs]# gfs_tool df /mnt/gfs
/mnt/gfs:
  SB lock proto = "lock_dlm"
  SB lock table = "tng3-cluster:mydata1"
  SB ondisk format = 1309
  SB multihost format = 1401
  Block size = 4096
  Journals = 8
  Resource Groups = 76
  Mounted lock proto = "lock_dlm"
  Mounted lock table = "tng3-cluster:mydata1"
  Mounted host data = "jid=0:id=196609:first=1"
  Journal number = 0
  Lock module flags = 0
  Local flocks = FALSE
  Local caching = FALSE
  Oopses OK = FALSE

  Type           Total          Used           Free           use%
  ------------------------------------------------------------------------
  inodes         33             33             0              100%
  metadata       38             2              36             5%
  data           4980077        178            4979899        0%
After running the gfs_jadd command, you can run the gfs_tool df MountPoint command again to check that the new journals have been added to the file system.

Examples

In this example, one journal is added to the file system that is mounted at the /mnt/gfs directory. The underlying logical volume for this file system is extended before the journal can be added.
[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_jadd -j1 /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: 5242877
DEV: Size: 9175040
Preparing to write new FS information...
Done.
In this example, two journals are added to the file system on the /mnt/gfs directory.
[root@tng3-1 ~]# gfs_jadd -j2 /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: 5275632
DEV: Size: 9175040
Preparing to write new FS information...
Done.

Complete Usage

gfs_jadd [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.4, “GFS-specific Options Available When Adding Journals” describes the GFS-specific options that can be used when adding journals to a GFS file system.
Table 4.4. GFS-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 gfs_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 gfs_jadd command. The default value is 1.
-T  Test. Do all calculations, but do not write any data to the disk and do not add journals to the file system. Enabling this flag helps discover what the gfs_jadd command would have done if it were run without this flag. Using the -v flag with the -T flag turns up the verbosity level to display more information.
-q  Quiet. Turns down the verbosity level.
-V  Displays command version information.
-v  Turns up the verbosity of messages.
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.