요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Exported device and client sessions
sysfs-class-rnbd-server:14-32Exported block device symlink와 client별 session directory를 만들고 해당 client가 unmap하면 session directory를 제거합니다.
Session mapping state and close
sysfs-class-rnbd-server:34-58Session의 read-only flag, original mapping path, ro/rw/migration mode를 보고하고 server-side device를 강제로 닫을 수 있습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/class/rnbd-server
Date: Feb 2020
KernelVersion: 5.7
Contact: Jack Wang <[email protected]> Danil Kipnis <[email protected]>
Description: provide information about RNBD-server.
What: /sys/class/rnbd-server/ctl/
Date: Feb 2020
KernelVersion: 5.7
Contact: Jack Wang <[email protected]> Danil Kipnis <[email protected]>
Description: When a client maps a device, a directory entry with the name of the
block device is created under /sys/class/rnbd-server/ctl/devices/.
What: /sys/class/rnbd-server/ctl/devices/<device_name>/block_dev
Date: Feb 2020
KernelVersion: 5.7
Contact: Jack Wang <[email protected]> Danil Kipnis <[email protected]>
Description: Is a symlink to the sysfs entry of the exported device.
Example:
block_dev -> ../../../../class/block/ram0
What: /sys/class/rnbd-server/ctl/devices/<device_name>/sessions/
Date: Feb 2020
KernelVersion: 5.7
Contact: Jack Wang <[email protected]> Danil Kipnis <[email protected]>
Description: For each client a particular device is exported to, following directory will be
created:
/sys/class/rnbd-server/ctl/devices/<device_name>/sessions/<session-name>/
When the device is unmapped by that client, the directory will be removed.
What: /sys/class/rnbd-server/ctl/devices/<device_name>/sessions/<session-name>/read_only
Date: Feb 2020
KernelVersion: 5.7
Contact: Jack Wang <[email protected]> Danil Kipnis <[email protected]>
Description: Contains '1' if device is mapped read-only, otherwise '0'.
What: /sys/class/rnbd-server/ctl/devices/<device_name>/sessions/<session-name>/mapping_path
Date: Feb 2020
KernelVersion: 5.7
Contact: Jack Wang <[email protected]> Danil Kipnis <[email protected]>
Description: Contains the relative device path provided by the user during mapping.
What: /sys/class/rnbd-server/ctl/devices/<device_name>/sessions/<session-name>/access_mode
Date: Feb 2020
KernelVersion: 5.7
Contact: Jack Wang <[email protected]> Danil Kipnis <[email protected]>
Description: Contains the device access mode: ro, rw or migration.
What: /sys/class/rnbd-server/ctl/devices/<device_name>/sessions/<session-name>/force_close
Date: Nov 2020
KernelVersion: 5.10
Contact: Jack Wang <[email protected]> Danil Kipnis <[email protected]>
Description: Write "1" to the file to close the device on server side. Please
note that the client side device will not be closed, read or
write to the device will get -ENOTCONN.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
RNBD server class
1-5| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/rnbd-server |
| Date | 2020년 2월 |
| KernelVersion | 5.7 |
| Contact | Jack Wang <[email protected]> Danil Kipnis <[email protected]> |
| Description | RNBD server에 관한 정보를 제공합니다. |
RNBD server control directory
7-12| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/rnbd-server/ctl/ |
| Date | 2020년 2월 |
| KernelVersion | 5.7 |
| Contact | Jack Wang <[email protected]> Danil Kipnis <[email protected]> |
| Description | Client가 device를 mapping하면 /sys/class/rnbd-server/ctl/devices/ 아래에 block-device name을 가진 directory entry를 생성합니다. |
Exported block-device link
14-21| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/rnbd-server/ctl/devices/<device_name>/block_dev |
| Date | 2020년 2월 |
| KernelVersion | 5.7 |
| Contact | Jack Wang <[email protected]> Danil Kipnis <[email protected]> |
| Description | Exported device의 sysfs entry를 가리키는 symlink입니다. |
block_dev -> ../../../../class/block/ram0
Per-client exported-device sessions
23-32| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/rnbd-server/ctl/devices/<device_name>/sessions/ |
| Date | 2020년 2월 |
| KernelVersion | 5.7 |
| Contact | Jack Wang <[email protected]> Danil Kipnis <[email protected]> |
| Description | 특정 device를 export한 각 client마다 /sys/class/rnbd-server/ctl/devices/<device_name>/sessions/<session-name>/ directory를 생성합니다. 해당 client가 device를 unmap하면 directory를 제거합니다. |
하나의 exported block device 아래 client별 session state가 배치됩니다.
Session read-only flag
34-38| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/rnbd-server/ctl/devices/<device_name>/sessions/<session-name>/read_only |
| Date | 2020년 2월 |
| KernelVersion | 5.7 |
| Contact | Jack Wang <[email protected]> Danil Kipnis <[email protected]> |
| Description | Device가 read-only로 mapped되었으면 1, 그렇지 않으면 0을 보관합니다. |
Session mapping path
40-44| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/rnbd-server/ctl/devices/<device_name>/sessions/<session-name>/mapping_path |
| Date | 2020년 2월 |
| KernelVersion | 5.7 |
| Contact | Jack Wang <[email protected]> Danil Kipnis <[email protected]> |
| Description | Mapping 때 user가 제공한 relative device path를 보관합니다. |
Session access mode
46-50| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/rnbd-server/ctl/devices/<device_name>/sessions/<session-name>/access_mode |
| Date | 2020년 2월 |
| KernelVersion | 5.7 |
| Contact | Jack Wang <[email protected]> Danil Kipnis <[email protected]> |
| Description | Device access mode인 ro, rw 또는 migration을 보관합니다. |
Client별 mapping을 설명하는 세 metadata attribute입니다.
Force-close server-side device
52-58| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/rnbd-server/ctl/devices/<device_name>/sessions/<session-name>/force_close |
| Date | 2020년 11월 |
| KernelVersion | 5.10 |
| Contact | Jack Wang <[email protected]> Danil Kipnis <[email protected]> |
| Description | 이 file에 1을 쓰면 server side에서 device를 닫습니다. Client-side device는 닫히지 않으며 이후 device read 또는 write는 -ENOTCONN을 반환합니다. |
Server device만 닫히므로 client node는 남지만 IO는 연결 오류가 됩니다.
Server class and control tree
sysfs-class-rnbd-server:1-12Client가 device를 mapping하면 server control tree의 devices 아래에 block-device name directory를 생성합니다.