요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Supported features and mapped image basics
sysfs-bus-rbd:66-120Module feature, byte size, device 번호, session client ID, pool·image·snapshot 이름과 header refresh, 영구 pool ID를 제공합니다.
Image identity, features, and parent chain
sysfs-bus-rbd:121-152Image 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 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/bus/rbd/add
Date: Oct, 2010
KernelVersion: v2.6.37
Contact: Sage Weil <sage@newdream.net>
Description:
(WO) Add rbd block device.
Usage: <mon ip addr> <options> <pool name> <rbd image name> [<snap name>]
Example::
$ echo "192.168.0.1 name=admin rbd foo" > /sys/bus/rbd/add
The snapshot name can be "-" or omitted to map the image
read/write. A <dev-id> will be assigned for any registered block
device. If snapshot is used, it will be mapped read-only.
What: /sys/bus/rbd/remove
Date: Oct, 2010
KernelVersion: v2.6.37
Contact: Sage Weil <sage@newdream.net>
Description:
(WO) Remove rbd block device.
Usage: <dev-id> [force]
Example::
$ echo 2 > /sys/bus/rbd/remove
Optional "force" argument which when passed will wait for
running requests and then unmap the image. Requests sent to the
driver after initiating the removal will be failed. (August
2016, since 4.9.)
What: /sys/bus/rbd/add_single_major
Date: Dec, 2013
KernelVersion: v3.14
Contact: Sage Weil <sage@newdream.net>
Description:
(WO) Available only if rbd module is inserted with single_major
parameter set to true.
Usage is the same as for /sys/bus/rbd/add. If present, this
should be used instead of the latter: any attempts to use
/sys/bus/rbd/add if /sys/bus/rbd/add_single_major is available
will fail for backwards compatibility reasons.
What: /sys/bus/rbd/remove_single_major
Date: Dec, 2013
KernelVersion: v3.14
Contact: Sage Weil <sage@newdream.net>
Description:
(WO) Available only if rbd module is inserted with single_major
parameter set to true.
Usage is the same as for /sys/bus/rbd/remove. If present, this
should be used instead of the latter: any attempts to use
/sys/bus/rbd/remove if /sys/bus/rbd/remove_single_major is
available will fail for backwards compatibility reasons.
What: /sys/bus/rbd/supported_features
Date: Mar, 2017
KernelVersion: v4.11
Contact: Sage Weil <sage@newdream.net>
Description:
(RO) Displays the features supported by the rbd module so that
userspace can generate meaningful error messages and spell out
unsupported features that need to be disabled.
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
Date: Oct, 2010
KernelVersion: v2.6.37
Contact: Sage Weil <sage@newdream.net>
Description:
============== ================================================
size (RO) The size (in bytes) of the mapped block
device.
major (RO) The block device major number.
client_id (RO) The ceph unique client id that was assigned
for this specific session.
pool (RO) The name of the storage pool where this rbd
image resides. An rbd image name is unique
within its pool.
name (RO) The name of the rbd image.
refresh (WO) Writing to this file will reread the image
header data and set all relevant data structures
accordingly.
current_snap (RO) The current snapshot for which the device
is mapped.
============== ================================================
What: /sys/bus/rbd/devices/<dev-id>/pool_id
Date: Jul, 2012
KernelVersion: v3.6
Contact: Sage Weil <sage@newdream.net>
Description:
(RO) The unique identifier for the rbd image's pool. This is a
permanent attribute of the pool. A pool's id will never change.
What: /sys/bus/rbd/devices/<dev-id>/image_id
What: /sys/bus/rbd/devices/<dev-id>/features
Date: Oct, 2012
KernelVersion: v3.7
Contact: Sage Weil <sage@newdream.net>
Description:
========= ===============================================
image_id (RO) The unique id for the rbd image. (For rbd
image format 1 this is empty.)
features (RO) A hexadecimal encoding of the feature bits
for this image.
========= ===============================================
What: /sys/bus/rbd/devices/<dev-id>/parent
Date: Nov, 2012
KernelVersion: v3.8
Contact: Sage Weil <sage@newdream.net>
Description:
(RO) Information identifying the chain of parent images in a
layered rbd image. Entries are separated by empty lines.
What: /sys/bus/rbd/devices/<dev-id>/minor
Date: Dec, 2013
KernelVersion: v3.14
Contact: Sage Weil <sage@newdream.net>
Description:
(RO) The block device minor number.
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
Date: Aug, 2016
KernelVersion: v4.9
Contact: Sage Weil <sage@newdream.net>
Description:
============ ================================================
snap_id (RO) The current snapshot's id.
config_info (RO) The string written into
/sys/bus/rbd/add{,_single_major}.
cluster_fsid (RO) The ceph cluster UUID.
client_addr (RO) The ceph unique client
entity_addr_t (address + nonce). The format is
<address>:<port>/<nonce>: '1.2.3.4:1234/5678' or
'[1:2:3:4:5:6:7:8]:1234/5678'.
============ ================================================
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
RBD block device 추가
1-18| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/rbd/add |
| Date | 2010년 10월 |
| KernelVersion | v2.6.37 |
| Contact | Sage 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 |
| Date | 2010년 10월 |
| KernelVersion | v2.6.37 |
| Contact | Sage 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 |
| Date | 2013년 12월 |
| KernelVersion | v3.14 |
| Contact | Sage 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 |
| Date | 2013년 12월 |
| KernelVersion | v3.14 |
| Contact | Sage 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 |
| Date | 2017년 3월 |
| KernelVersion | v4.11 |
| Contact | Sage 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 |
| Date | 2010년 10월 |
| KernelVersion | v2.6.37 |
| Contact | Sage Weil <sage@newdream.net> |
| Description | Mapping된 RBD block device의 크기·major 번호·Ceph client ID·pool·image 이름·현재 snapshot을 제공하고 image header를 다시 읽게 합니다. |
각 속성의 접근 mode와 반환 값 또는 write 동작을 구조화한 표입니다.
RBD storage pool 고유 ID
112-120| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/rbd/devices/<dev-id>/pool_id |
| Date | 2012년 7월 |
| KernelVersion | v3.6 |
| Contact | Sage 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 |
| Date | 2012년 10월 |
| KernelVersion | v3.7 |
| Contact | Sage Weil <sage@newdream.net> |
| Description | RBD image의 고유 ID와 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 |
| Date | 2012년 11월 |
| KernelVersion | v3.8 |
| Contact | Sage 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 |
| Date | 2013년 12월 |
| KernelVersion | v3.14 |
| Contact | Sage 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 |
| Date | 2016년 8월 |
| KernelVersion | v4.9 |
| Contact | Sage Weil <sage@newdream.net> |
| Description | 현재 snapshot ID, mapping 시 사용한 configuration 문자열, Ceph cluster UUID와 client entity_addr_t를 제공합니다. |
Snapshot, add 입력 문자열, cluster UUID 및 client address 형식을 정리한 표입니다.
Add, remove, and single-major mode
sysfs-bus-rbd:1-65add는 image 또는 snapshot을 mapping하고 remove는 일반 또는 force unmap을 수행하며, single_major mode에서는 전용 add/remove file만 사용합니다.