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

Linux 6.18.37 · ABI / testing

RADOS Block Device mapping and device attributes

RBD block device의 add/remove와 single-major mode, 지원 feature, mapping된 image·snapshot·pool·cluster·client 정보를 제공하는 sysfs ABI입니다.

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

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

1. 요약·해설

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

Add, remove, and single-major mode

sysfs-bus-rbd:1-65

add는 image 또는 snapshot을 mapping하고 remove는 일반 또는 force unmap을 수행하며, single_major mode에서는 전용 add/remove file만 사용합니다.

Supported features and mapped image basics

sysfs-bus-rbd:66-120

Module feature, byte size, device 번호, session client ID, pool·image·snapshot 이름과 header refresh, 영구 pool ID를 제공합니다.

Image identity, features, and parent chain

sysfs-bus-rbd:121-152

Image ID와 feature bit, layered image의 parent chain 및 block device minor 번호를 노출합니다.

Snapshot, configuration, cluster, and client address

sysfs-bus-rbd:153-173

현재 snapshot ID, add 입력 문자열, Ceph cluster UUID와 address·port·nonce를 결합한 client 주소를 제공합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 What: /sys/bus/rbd/add
2 Date: Oct, 2010
3 KernelVersion: v2.6.37
4 Contact: Sage Weil <sage@newdream.net>
5 Description:
6 (WO) Add rbd block device.
7
8 Usage: <mon ip addr> <options> <pool name> <rbd image name> [<snap name>]
9
10 Example::
11
12 $ echo "192.168.0.1 name=admin rbd foo" > /sys/bus/rbd/add
13
14 The snapshot name can be "-" or omitted to map the image
15 read/write. A <dev-id> will be assigned for any registered block
16 device. If snapshot is used, it will be mapped read-only.
17
18
19 What: /sys/bus/rbd/remove
20 Date: Oct, 2010
21 KernelVersion: v2.6.37
22 Contact: Sage Weil <sage@newdream.net>
23 Description:
24 (WO) Remove rbd block device.
25
26 Usage: <dev-id> [force]
27
28 Example::
29
30 $ echo 2 > /sys/bus/rbd/remove
31
32 Optional "force" argument which when passed will wait for
33 running requests and then unmap the image. Requests sent to the
34 driver after initiating the removal will be failed. (August
35 2016, since 4.9.)
36
37
38 What: /sys/bus/rbd/add_single_major
39 Date: Dec, 2013
40 KernelVersion: v3.14
41 Contact: Sage Weil <sage@newdream.net>
42 Description:
43 (WO) Available only if rbd module is inserted with single_major
44 parameter set to true.
45
46 Usage is the same as for /sys/bus/rbd/add. If present, this
47 should be used instead of the latter: any attempts to use
48 /sys/bus/rbd/add if /sys/bus/rbd/add_single_major is available
49 will fail for backwards compatibility reasons.
50
51
52 What: /sys/bus/rbd/remove_single_major
53 Date: Dec, 2013
54 KernelVersion: v3.14
55 Contact: Sage Weil <sage@newdream.net>
56 Description:
57 (WO) Available only if rbd module is inserted with single_major
58 parameter set to true.
59
60 Usage is the same as for /sys/bus/rbd/remove. If present, this
61 should be used instead of the latter: any attempts to use
62 /sys/bus/rbd/remove if /sys/bus/rbd/remove_single_major is
63 available will fail for backwards compatibility reasons.
64
65
66 What: /sys/bus/rbd/supported_features
67 Date: Mar, 2017
68 KernelVersion: v4.11
69 Contact: Sage Weil <sage@newdream.net>
70 Description:
71 (RO) Displays the features supported by the rbd module so that
72 userspace can generate meaningful error messages and spell out
73 unsupported features that need to be disabled.
74
75
76 What: /sys/bus/rbd/devices/<dev-id>/size
77 What: /sys/bus/rbd/devices/<dev-id>/major
78 What: /sys/bus/rbd/devices/<dev-id>/client_id
79 What: /sys/bus/rbd/devices/<dev-id>/pool
80 What: /sys/bus/rbd/devices/<dev-id>/name
81 What: /sys/bus/rbd/devices/<dev-id>/refresh
82 What: /sys/bus/rbd/devices/<dev-id>/current_snap
83 Date: Oct, 2010
84 KernelVersion: v2.6.37
85 Contact: Sage Weil <sage@newdream.net>
86 Description:
87
88 ============== ================================================
89 size (RO) The size (in bytes) of the mapped block
90 device.
91
92 major (RO) The block device major number.
93
94 client_id (RO) The ceph unique client id that was assigned
95 for this specific session.
96
97 pool (RO) The name of the storage pool where this rbd
98 image resides. An rbd image name is unique
99 within its pool.
100
101 name (RO) The name of the rbd image.
102
103 refresh (WO) Writing to this file will reread the image
104 header data and set all relevant data structures
105 accordingly.
106
107 current_snap (RO) The current snapshot for which the device
108 is mapped.
109 ============== ================================================
110
111
112 What: /sys/bus/rbd/devices/<dev-id>/pool_id
113 Date: Jul, 2012
114 KernelVersion: v3.6
115 Contact: Sage Weil <sage@newdream.net>
116 Description:
117 (RO) The unique identifier for the rbd image's pool. This is a
118 permanent attribute of the pool. A pool's id will never change.
119
120
121 What: /sys/bus/rbd/devices/<dev-id>/image_id
122 What: /sys/bus/rbd/devices/<dev-id>/features
123 Date: Oct, 2012
124 KernelVersion: v3.7
125 Contact: Sage Weil <sage@newdream.net>
126 Description:
127 ========= ===============================================
128 image_id (RO) The unique id for the rbd image. (For rbd
129 image format 1 this is empty.)
130
131 features (RO) A hexadecimal encoding of the feature bits
132 for this image.
133 ========= ===============================================
134
135
136 What: /sys/bus/rbd/devices/<dev-id>/parent
137 Date: Nov, 2012
138 KernelVersion: v3.8
139 Contact: Sage Weil <sage@newdream.net>
140 Description:
141 (RO) Information identifying the chain of parent images in a
142 layered rbd image. Entries are separated by empty lines.
143
144
145 What: /sys/bus/rbd/devices/<dev-id>/minor
146 Date: Dec, 2013
147 KernelVersion: v3.14
148 Contact: Sage Weil <sage@newdream.net>
149 Description:
150 (RO) The block device minor number.
151
152
153 What: /sys/bus/rbd/devices/<dev-id>/snap_id
154 What: /sys/bus/rbd/devices/<dev-id>/config_info
155 What: /sys/bus/rbd/devices/<dev-id>/cluster_fsid
156 What: /sys/bus/rbd/devices/<dev-id>/client_addr
157 Date: Aug, 2016
158 KernelVersion: v4.9
159 Contact: Sage Weil <sage@newdream.net>
160 Description:
161 ============ ================================================
162 snap_id (RO) The current snapshot's id.
163
164 config_info (RO) The string written into
165 /sys/bus/rbd/add{,_single_major}.
166
167 cluster_fsid (RO) The ceph cluster UUID.
168
169 client_addr (RO) The ceph unique client
170 entity_addr_t (address + nonce). The format is
171 <address>:<port>/<nonce>: '1.2.3.4:1234/5678' or
172 '[1:2:3:4:5:6:7:8]:1234/5678'.
173 ============ ================================================
174

3. 한국어 전문 번역

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

RBD block device 추가

1-18
항목한국어 전문 번역
What/sys/bus/rbd/add
Date2010년 10월
KernelVersionv2.6.37
ContactSage Weil <sage@newdream.net>
Description쓰기 전용(WO). RBD block device를 추가합니다. Snapshot 이름을 "-"로 지정하거나 생략하면 image를 읽기·쓰기로 mapping합니다. 등록된 각 block device에는 <dev-id>가 할당됩니다. Snapshot을 지정하면 읽기 전용으로 mapping합니다.

사용 형식은 다음과 같습니다.

<mon ip addr> <options> <pool name> <rbd image name> [<snap name>]

사용 예는 다음과 같습니다.

$ echo "192.168.0.1 name=admin rbd foo" > /sys/bus/rbd/add

RBD block device 제거

19-37
항목한국어 전문 번역
What/sys/bus/rbd/remove
Date2010년 10월
KernelVersionv2.6.37
ContactSage Weil <sage@newdream.net>
Description쓰기 전용(WO). RBD block device를 제거합니다. 선택 사항인 "force" 인수를 전달하면 실행 중인 request가 끝나기를 기다린 뒤 image를 unmap합니다. 제거를 시작한 뒤 driver로 전송되는 request는 실패합니다. Force 인수는 2016년 8월, kernel 4.9부터 제공됩니다.

사용 형식과 예는 다음과 같습니다.

<dev-id> [force]

$ echo 2 > /sys/bus/rbd/remove

Single-major mode에서 RBD 추가

38-51
항목한국어 전문 번역
What/sys/bus/rbd/add_single_major
Date2013년 12월
KernelVersionv3.14
ContactSage Weil <sage@newdream.net>
Description쓰기 전용(WO). RBD module을 single_major parameter가 true인 상태로 삽입했을 때만 제공됩니다. 사용법은 /sys/bus/rbd/add와 같습니다. 이 file이 있으면 add 대신 사용해야 하며, add_single_major가 제공되는 동안 /sys/bus/rbd/add를 사용하려는 시도는 하위 호환성 때문에 실패합니다.

Single-major mode에서 RBD 제거

52-65
항목한국어 전문 번역
What/sys/bus/rbd/remove_single_major
Date2013년 12월
KernelVersionv3.14
ContactSage Weil <sage@newdream.net>
Description쓰기 전용(WO). RBD module을 single_major parameter가 true인 상태로 삽입했을 때만 제공됩니다. 사용법은 /sys/bus/rbd/remove와 같습니다. 이 file이 있으면 remove 대신 사용해야 하며, remove_single_major가 제공되는 동안 /sys/bus/rbd/remove를 사용하려는 시도는 하위 호환성 때문에 실패합니다.

RBD module 지원 feature

66-75
항목한국어 전문 번역
What/sys/bus/rbd/supported_features
Date2017년 3월
KernelVersionv4.11
ContactSage Weil <sage@newdream.net>
Description읽기 전용(RO). RBD module이 지원하는 feature를 표시합니다. Userspace는 이를 사용해 의미 있는 오류 message를 만들고 비활성화해야 하는 미지원 feature를 구체적으로 안내할 수 있습니다.

Mapping된 RBD 장치의 기본 속성

76-111
항목한국어 전문 번역
What/sys/bus/rbd/devices/<dev-id>/size
What/sys/bus/rbd/devices/<dev-id>/major
What/sys/bus/rbd/devices/<dev-id>/client_id
What/sys/bus/rbd/devices/<dev-id>/pool
What/sys/bus/rbd/devices/<dev-id>/name
What/sys/bus/rbd/devices/<dev-id>/refresh
What/sys/bus/rbd/devices/<dev-id>/current_snap
Date2010년 10월
KernelVersionv2.6.37
ContactSage Weil <sage@newdream.net>
DescriptionMapping된 RBD block device의 크기·major 번호·Ceph client ID·pool·image 이름·현재 snapshot을 제공하고 image header를 다시 읽게 합니다.
Mapping된 RBD 장치의 기본 sysfs 속성
속성접근한국어 전문 번역
sizeROMapping된 block device의 크기를 byte 단위로 반환합니다.
majorROBlock device major 번호를 반환합니다.
client_idRO이 session에 할당된 Ceph 고유 client ID를 반환합니다.
poolRORBD image가 위치한 storage pool 이름을 반환합니다. RBD image 이름은 pool 안에서 고유합니다.
nameRORBD image 이름을 반환합니다.
refreshWO이 file에 쓰면 image header data를 다시 읽고 관련 data structure를 그에 맞게 설정합니다.
current_snapRO장치가 현재 mapping된 snapshot을 반환합니다.

각 속성의 접근 mode와 반환 값 또는 write 동작을 구조화한 표입니다.

RBD storage pool 고유 ID

112-120
항목한국어 전문 번역
What/sys/bus/rbd/devices/<dev-id>/pool_id
Date2012년 7월
KernelVersionv3.6
ContactSage Weil <sage@newdream.net>
Description읽기 전용(RO). RBD image가 속한 pool의 고유 identifier입니다. Pool의 영구 속성이며 pool ID는 바뀌지 않습니다.

RBD image ID와 feature bit

121-135
항목한국어 전문 번역
What/sys/bus/rbd/devices/<dev-id>/image_id
What/sys/bus/rbd/devices/<dev-id>/features
Date2012년 10월
KernelVersionv3.7
ContactSage Weil <sage@newdream.net>
DescriptionRBD image의 고유 ID와 image feature bit의 16진수 encoding을 제공합니다.
RBD image identity와 feature encoding
속성접근한국어 전문 번역
image_idRORBD image의 고유 ID입니다. RBD image format 1에서는 비어 있습니다.
featuresRO이 image의 feature bit를 16진수로 encoding한 값입니다.

Image format에 따른 image_id 동작과 features 표현 형식을 정리한 표입니다.

Layered RBD parent image chain

136-144
항목한국어 전문 번역
What/sys/bus/rbd/devices/<dev-id>/parent
Date2012년 11월
KernelVersionv3.8
ContactSage Weil <sage@newdream.net>
Description읽기 전용(RO). Layered RBD image에서 parent image chain을 식별하는 정보입니다. 각 항목은 빈 줄로 구분됩니다.

RBD block device minor 번호

145-152
항목한국어 전문 번역
What/sys/bus/rbd/devices/<dev-id>/minor
Date2013년 12월
KernelVersionv3.14
ContactSage Weil <sage@newdream.net>
Description읽기 전용(RO). Block device minor 번호를 반환합니다.

RBD snapshot·configuration·cluster·client 정보

153-173
항목한국어 전문 번역
What/sys/bus/rbd/devices/<dev-id>/snap_id
What/sys/bus/rbd/devices/<dev-id>/config_info
What/sys/bus/rbd/devices/<dev-id>/cluster_fsid
What/sys/bus/rbd/devices/<dev-id>/client_addr
Date2016년 8월
KernelVersionv4.9
ContactSage Weil <sage@newdream.net>
Description현재 snapshot ID, mapping 시 사용한 configuration 문자열, Ceph cluster UUID와 client entity_addr_t를 제공합니다.
RBD mapping session과 cluster 식별 정보
속성접근한국어 전문 번역
snap_idRO현재 snapshot의 ID를 반환합니다.
config_infoRO/sys/bus/rbd/add{,_single_major}에 쓴 문자열을 반환합니다.
cluster_fsidROCeph cluster UUID를 반환합니다.
client_addrROCeph 고유 client entity_addr_t(address + nonce)를 반환합니다. 형식은 <address>:<port>/<nonce>이며, 예는 '1.2.3.4:1234/5678' 또는 '[1:2:3:4:5:6:7:8]:1234/5678'입니다.

Snapshot, add 입력 문자열, cluster UUID 및 client address 형식을 정리한 표입니다.