← Documents Documentation/filesystems/gfs2.rst GitHub 원문 ↗

Linux 6.18.37 · Filesystems

Global File System 2

GFS2의 shared block device 구조, lock protocol, local 사용법과 gfs2-utils 관리 도구를 설명하는 전문 번역입니다.

Source pathDocumentation/filesystems/gfs2.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

gfs2.rst:1-52

GFS2는 여러 cluster node가 하나의 block device를 동시에 사용하도록 설계된 filesystem입니다. `lock_dlm`은 DLM으로 node 간 I/O를 조정하고, `lock_nolock`은 같은 on-disk filesystem을 단일 host의 local 용도로 사용할 때 선택합니다.

운영 환경에서는 모든 node에 `gfs2-utils`가 필요하며 cluster mode에는 DLM과 Corosync 구성이 추가됩니다. 생성·복구·online 확장·journal 추가·tuning·GFS 변환 도구가 각각 분리되어 있으므로 작업 목적에 맞는 명령을 선택해야 합니다.

GFS2 배치 선택
단일 host: `lock_nolock` 선택cluster shared storage: `lock_dlm` 선택모든 node에 `gfs2-utils` 설치cluster mode에 DLM·Corosync 구성관리 목적에 맞는 gfs2-utils 명령 사용

공유 여부에 따라 lock protocol과 필요한 user space 구성이 달라집니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 ====================
4 Global File System 2
5 ====================
6
7 GFS2 is a cluster file system. It allows a cluster of computers to
8 simultaneously use a block device that is shared between them (with FC,
9 iSCSI, NBD, etc). GFS2 reads and writes to the block device like a local
10 file system, but also uses a lock module to allow the computers coordinate
11 their I/O so file system consistency is maintained. One of the nifty
12 features of GFS2 is perfect consistency -- changes made to the file system
13 on one machine show up immediately on all other machines in the cluster.
14
15 GFS2 uses interchangeable inter-node locking mechanisms, the currently
16 supported mechanisms are:
17
18 lock_nolock
19 - allows GFS2 to be used as a local file system
20
21 lock_dlm
22 - uses the distributed lock manager (dlm) for inter-node locking.
23 The dlm is found at linux/fs/dlm/
24
25 lock_dlm depends on user space cluster management systems found
26 at the URL above.
27
28 To use GFS2 as a local file system, no external clustering systems are
29 needed, simply::
30
31 $ mkfs -t gfs2 -p lock_nolock -j 1 /dev/block_device
32 $ mount -t gfs2 /dev/block_device /dir
33
34 The gfs2-utils package is required on all cluster nodes and, for lock_dlm, you
35 will also need the dlm and corosync user space utilities configured as per the
36 documentation.
37
38 gfs2-utils can be found at https://pagure.io/gfs2-utils
39
40 GFS2 is not on-disk compatible with previous versions of GFS, but it
41 is pretty close.
42
43 The following man pages are available from gfs2-utils:
44
45 ============ =============================================
46 fsck.gfs2 to repair a filesystem
47 gfs2_grow to expand a filesystem online
48 gfs2_jadd to add journals to a filesystem online
49 tunegfs2 to manipulate, examine and tune a filesystem
50 gfs2_convert to convert a gfs filesystem to GFS2 in-place
51 mkfs.gfs2 to make a filesystem
52 ============ =============================================
53

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

공유 block device와 inter-node locking

1-27

GFS2(Global File System 2)는 cluster filesystem입니다. 여러 computer로 구성된 cluster가 FC, iSCSI, NBD 등으로 서로 공유하는 하나의 block device를 동시에 사용할 수 있게 합니다.

GFS2는 local filesystem처럼 block device를 직접 읽고 씁니다. 동시에 lock module을 사용해 여러 computer의 I/O를 조정함으로써 filesystem consistency를 유지합니다.

GFS2의 중요한 특성 중 하나는 cluster 전체에서 완전한 consistency를 제공한다는 점입니다. 한 machine에서 filesystem에 적용한 변경은 cluster의 다른 모든 machine에 즉시 나타납니다.

node 사이의 locking mechanism은 교체할 수 있습니다. 현재 지원되는 mechanism은 `lock_nolock`과 `lock_dlm` 두 가지입니다.

`lock_nolock`은 GFS2를 local filesystem으로 사용할 수 있게 합니다. node 사이의 coordination이 필요 없는 단일 host 용도에 해당합니다.

`lock_dlm`은 distributed lock manager인 DLM을 사용해 inter-node locking을 수행합니다. kernel의 DLM 구현은 `linux/fs/dlm/`에 있습니다.

`lock_dlm`은 원문에서 위 URL에 있다고 표현한 user space cluster management system에 의존합니다. 실제 구성에서는 뒤에서 언급하는 DLM과 Corosync user space utility도 필요합니다.

GFS2 cluster I/O 조정
여러 cluster node의 filesystem operationGFS2가 local filesystem처럼 block I/O 생성`lock_dlm`이 inter-node lock으로 접근 조정FC·iSCSI·NBD 등의 shared block device 접근모든 node에서 즉시 일관된 filesystem view 유지

여러 node가 같은 storage를 사용하되 lock module이 I/O 순서를 조정합니다.

지원 locking mechanism
Mechanism범위동작추가 구성
`lock_nolock`단일 hostGFS2를 local filesystem으로 사용외부 cluster system 불필요
`lock_dlm`여러 cluster nodeDLM 기반 inter-node lockingDLM·Corosync user space 구성

배치 형태에 따라 선택하는 GFS2 lock protocol입니다.

.. SPDX-License-Identifier: GPL-2.0

====================
Global File System 2
====================

GFS2 is a cluster file system. It allows a cluster of computers to
simultaneously use a block device that is shared between them (with FC,
iSCSI, NBD, etc).  GFS2 reads and writes to the block device like a local
file system, but also uses a lock module to allow the computers coordinate
their I/O so file system consistency is maintained.  One of the nifty
features of GFS2 is perfect consistency -- changes made to the file system
on one machine show up immediately on all other machines in the cluster.

GFS2 uses interchangeable inter-node locking mechanisms, the currently
supported mechanisms are:

  lock_nolock
    - allows GFS2 to be used as a local file system

  lock_dlm
    - uses the distributed lock manager (dlm) for inter-node locking.
      The dlm is found at linux/fs/dlm/

lock_dlm depends on user space cluster management systems found
at the URL above.

로컬 사용 절차와 gfs2-utils 도구

28-52

GFS2를 local filesystem으로 사용할 때는 외부 clustering system이 필요 없습니다. `mkfs -t gfs2 -p lock_nolock -j 1 /dev/block_device`로 journal 하나를 가진 filesystem을 만들고, `mount -t gfs2 /dev/block_device /dir`로 mount하면 됩니다.

cluster의 모든 node에는 `gfs2-utils` package가 필요합니다. `lock_dlm`을 사용할 경우에는 관련 documentation에 따라 DLM과 Corosync user space utility도 구성해야 합니다.

`gfs2-utils`의 upstream project는 `https://pagure.io/gfs2-utils`에서 찾을 수 있습니다.

GFS2의 on-disk format은 이전 GFS version과 호환되지 않습니다. 형식이 상당히 비슷하더라도 기존 GFS filesystem을 GFS2처럼 바로 mount할 수 있다는 뜻은 아닙니다.

`gfs2-utils`는 filesystem 생성·검사·확장·journal 추가·조정·변환을 위한 man page와 명령을 제공합니다.

`fsck.gfs2`는 filesystem을 검사하고 복구하며, `gfs2_grow`는 mounted filesystem을 online 상태에서 확장합니다.

`gfs2_jadd`는 online filesystem에 journal을 추가하고, `tunegfs2`는 filesystem을 변경·검사·조정합니다.

`gfs2_convert`는 기존 GFS filesystem을 제자리에서 GFS2로 변환하며, `mkfs.gfs2`는 새 GFS2 filesystem을 만듭니다.

단일 host용 GFS2 준비
`gfs2-utils` 설치`mkfs -t gfs2 -p lock_nolock -j 1 /dev/block_device`mount point `/dir` 준비`mount -t gfs2 /dev/block_device /dir`외부 DLM·Corosync 없이 local GFS2 사용

`lock_nolock`을 사용하는 최소 local filesystem 절차입니다.

gfs2-utils 관리 명령
명령용도Online 동작
`fsck.gfs2`filesystem 검사·복구아니요
`gfs2_grow`filesystem 용량 확장
`gfs2_jadd`filesystem에 journal 추가
`tunegfs2`filesystem 변경·검사·조정작업에 따라 다름
`gfs2_convert`GFS를 GFS2로 in-place 변환아니요
`mkfs.gfs2`새 filesystem 생성아니요

원문에 열거된 man page와 filesystem 관리 목적입니다.

To use GFS2 as a local file system, no external clustering systems are
needed, simply::

  $ mkfs -t gfs2 -p lock_nolock -j 1 /dev/block_device
  $ mount -t gfs2 /dev/block_device /dir

The gfs2-utils package is required on all cluster nodes and, for lock_dlm, you
will also need the dlm and corosync user space utilities configured as per the
documentation.

gfs2-utils can be found at https://pagure.io/gfs2-utils

GFS2 is not on-disk compatible with previous versions of GFS, but it
is pretty close.

The following man pages are available from gfs2-utils:

  ============                =============================================
  fsck.gfs2                to repair a filesystem
  gfs2_grow                to expand a filesystem online
  gfs2_jadd                to add journals to a filesystem online
  tunegfs2                to manipulate, examine and tune a filesystem
  gfs2_convert                to convert a gfs filesystem to GFS2 in-place
  mkfs.gfs2                to make a filesystem
  ============                =============================================