← Documents Documentation/ABI/testing/sysfs-ocfs2 GitHub 원문 ↗

Linux 6.18.37 · ABI / testing

OCFS2 cluster sysfs ABI

OCFS2 locking protocol version, loaded·active cluster plugins와 writable cluster-stack selection을 정의합니다.

Source pathDocumentation/ABI/testing/sysfs-ocfs2
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

Locking protocol과 plugin inventory

sysfs-ocfs2:1-48

Distributed-locking protocol의 major/minor 호환 규칙과 현재 load된 o2cb·userspace plugins를 노출합니다.

Active plugin과 cluster stack 전환

sysfs-ocfs2:49-89

하나의 active plugin을 선택하고, filesystem이 모두 unmount된 상태에서만 cluster stack을 안전하게 변경합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 What: /sys/fs/ocfs2/
2 Date: April 2008
4 Description:
5 The /sys/fs/ocfs2 directory contains knobs used by the
6 ocfs2-tools to interact with the filesystem.
7
8 What: /sys/fs/ocfs2/max_locking_protocol
9 Date: April 2008
11 Description:
12 The /sys/fs/ocfs2/max_locking_protocol file displays version
13 of ocfs2 locking supported by the filesystem. This version
14 covers how ocfs2 uses distributed locking between cluster
15 nodes.
16
17 The protocol version has a major and minor number. Two
18 cluster nodes can interoperate if they have an identical
19 major number and an overlapping minor number - thus,
20 a node with version 1.10 can interoperate with a node
21 sporting version 1.8, as long as both use the 1.8 protocol.
22
23 Reading from this file returns a single line, the major
24 number and minor number joined by a period, eg "1.10".
25
26 This file is read-only. The value is compiled into the
27 driver.
28
29 What: /sys/fs/ocfs2/loaded_cluster_plugins
30 Date: April 2008
32 Description:
33 The /sys/fs/ocfs2/loaded_cluster_plugins file describes
34 the available plugins to support ocfs2 cluster operation.
35 A cluster plugin is required to use ocfs2 in a cluster.
36 There are currently two available plugins:
37
38 * 'o2cb' - The classic o2cb cluster stack that ocfs2 has
39 used since its inception.
40 * 'user' - A plugin supporting userspace cluster software
41 in conjunction with fs/dlm.
42
43 Reading from this file returns the names of all loaded
44 plugins, one per line.
45
46 This file is read-only. Its contents may change as
47 plugins are loaded or removed.
48
49 What: /sys/fs/ocfs2/active_cluster_plugin
50 Date: April 2008
52 Description:
53 The /sys/fs/ocfs2/active_cluster_plugin displays which
54 cluster plugin is currently in use by the filesystem.
55 The active plugin will appear in the loaded_cluster_plugins
56 file as well. Only one plugin can be used at a time.
57
58 Reading from this file returns the name of the active plugin
59 on a single line.
60
61 This file is read-only. Which plugin is active depends on
62 the cluster stack in use. The contents may change
63 when all filesystems are unmounted and the cluster stack
64 is changed.
65
66 What: /sys/fs/ocfs2/cluster_stack
67 Date: April 2008
69 Description:
70 The /sys/fs/ocfs2/cluster_stack file contains the name
71 of current ocfs2 cluster stack. This value is set by
72 userspace tools when bringing the cluster stack online.
73
74 Cluster stack names are 4 characters in length.
75
76 When the 'o2cb' cluster stack is used, the 'o2cb' cluster
77 plugin is active. All other cluster stacks use the 'user'
78 cluster plugin.
79
80 Reading from this file returns the name of the current
81 cluster stack on a single line.
82
83 Writing a new stack name to this file changes the current
84 cluster stack unless there are mounted ocfs2 filesystems.
85 If there are mounted filesystems, attempts to change the
86 stack return an error.
87
88 Users:
89 ocfs2-tools <[email protected]>
90

3. 한국어 전문 번역

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

OCFS2 cluster sysfs ABI: ocfs2

1-7
항목한국어 전문 번역
What/sys/fs/ocfs2/
Date2008년 4월
Contact[email protected]
Description`/sys/fs/ocfs2/` directory에는 `ocfs2-tools`가 filesystem과 상호 작용할 때 사용하는 knobs가 들어 있습니다.

OCFS2 cluster sysfs ABI: max locking protocol

8-28
항목한국어 전문 번역
What/sys/fs/ocfs2/max_locking_protocol
Date2008년 4월
Contact[email protected]
Description`/sys/fs/ocfs2/max_locking_protocol`은 filesystem이 지원하는 OCFS2 locking version을 표시합니다. 이 version은 OCFS2가 cluster nodes 사이에서 distributed locking을 사용하는 방식을 포괄합니다. Protocol version에는 major와 minor number가 있습니다. 두 nodes는 major number가 같고 minor range가 겹치면 상호 운용할 수 있습니다. 예를 들어 version `1.10` node와 `1.8` node는 둘 다 `1.8` protocol을 사용하는 한 상호 운용할 수 있습니다. Read하면 major와 minor를 period로 연결한 `1.10` 같은 single line을 반환합니다. 이 file은 read-only이며 value는 driver에 compile되어 있습니다.
OCFS2 locking protocol compatibility
Node ANode BCommon protocolCompatible
1.101.81.8Yes
1.x2.xNoneNo; major differs

Major version이 같고 minor range가 겹칠 때 낮은 공통 protocol로 상호 운용합니다.

OCFS2 cluster sysfs ABI: loaded cluster plugins

29-48
항목한국어 전문 번역
What/sys/fs/ocfs2/loaded_cluster_plugins
Date2008년 4월
Contact[email protected]
Description`/sys/fs/ocfs2/loaded_cluster_plugins`는 OCFS2 cluster operation을 지원하는 available plugins를 설명합니다. Cluster에서 OCFS2를 사용하려면 cluster plugin이 필요합니다. 현재 `o2cb`는 OCFS2 시작부터 사용한 classic o2cb cluster stack이고, `user`는 `fs/dlm`과 함께 userspace cluster software를 지원하는 plugin입니다. Read하면 loaded plugin names를 line당 하나씩 반환합니다. 이 file은 read-only지만 plugins가 load 또는 remove되면 contents가 바뀔 수 있습니다.

OCFS2 cluster sysfs ABI: active cluster plugin

49-65
항목한국어 전문 번역
What/sys/fs/ocfs2/active_cluster_plugin
Date2008년 4월
Contact[email protected]
Description`/sys/fs/ocfs2/active_cluster_plugin`은 filesystem이 현재 사용하는 cluster plugin을 표시하며 active plugin은 `loaded_cluster_plugins`에도 나타납니다. 한 번에 하나의 plugin만 사용할 수 있습니다. Read하면 active plugin name을 single line으로 반환합니다. 이 file은 read-only입니다. Active plugin은 사용하는 cluster stack에 따라 결정되며 모든 filesystems를 unmount하고 cluster stack을 변경하면 contents가 바뀔 수 있습니다.

OCFS2 cluster sysfs ABI: cluster stack

66-89
항목한국어 전문 번역
What/sys/fs/ocfs2/cluster_stack
Date2008년 4월
Contact[email protected]
Usersocfs2-tools <[email protected]>
Description`/sys/fs/ocfs2/cluster_stack`은 현재 OCFS2 cluster stack name을 담습니다. Userspace tools가 cluster stack을 online으로 전환할 때 이 value를 설정합니다. Cluster stack names는 4 characters입니다. `o2cb` stack을 쓰면 `o2cb` cluster plugin이 active이고, 다른 모든 cluster stacks는 `user` plugin을 사용합니다. Read하면 현재 stack name을 single line으로 반환합니다. 새 stack name을 write하면 mounted OCFS2 filesystems가 없는 경우 current stack이 바뀝니다. Mounted filesystems가 있으면 stack 변경 시도는 error를 반환합니다. User는 `ocfs2-tools <[email protected]>`입니다.
Cluster stack to active plugin
cluster_stack = o2cbactive plugin = o2cb
Any other cluster stackactive plugin = userfs/dlm
Write new 4-character stackMounted OCFS2 filesystems?Yes: return error
Write new 4-character stackNo mounted filesystemsChange current stack

Stack name이 active plugin을 결정하며 mounted filesystems가 있으면 stack 변경을 거부합니다.