요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Table 예제
dm-ebs.rst:39-51512-byte와 1KiB emulation을 서로 다른 offset·underlying size로 구성합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
======
dm-ebs
======
This target is similar to the linear target except that it emulates
a smaller logical block size on a device with a larger logical block
size. Its main purpose is to provide emulation of 512 byte sectors on
devices that do not provide this emulation (i.e. 4K native disks).
Supported emulated logical block sizes 512, 1024, 2048 and 4096.
Underlying block size can be set to > 4K to test buffering larger units.
Table parameters
----------------
<dev path> <offset> <emulated sectors> [<underlying sectors>]
Mandatory parameters:
<dev path>:
Full pathname to the underlying block-device,
or a "major:minor" device-number.
<offset>:
Starting sector within the device;
has to be a multiple of <emulated sectors>.
<emulated sectors>:
Number of sectors defining the logical block size to be emulated;
1, 2, 4, 8 sectors of 512 bytes supported.
Optional parameter:
<underlying sectors>:
Number of sectors defining the logical block size of <dev path>.
2^N supported, e.g. 8 = emulate 8 sectors of 512 bytes = 4KiB.
If not provided, the logical block size of <dev path> will be used.
Examples:
Emulate 1 sector = 512 bytes logical block size on /dev/sda starting at
offset 1024 sectors with underlying devices block size automatically set:
ebs /dev/sda 1024 1
Emulate 2 sector = 1KiB logical block size on /dev/sda starting at
offset 128 sectors, enforce 2KiB underlying device block size.
This presumes 2KiB logical blocksize on /dev/sda or less to work:
ebs /dev/sda 128 2 4
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
작은 logical block 크기 emulation
1-14`dm-ebs` target은 linear target과 비슷하지만 큰 logical block size를 가진 device에서 더 작은 logical block size를 emulation합니다.
주요 목적은 4K native disk처럼 자체적으로 512-byte sector emulation을 제공하지 않는 device에 512-byte sector를 제공하는 것입니다.
지원하는 emulated logical block size는 512, 1024, 2048, 4096 byte입니다. Underlying block size는 4K보다 크게 지정해 더 큰 unit의 buffering도 시험할 수 있습니다.
상위 layer에는 작은 logical block을 보이고 underlying device에는 더 큰 unit으로 접근합니다.
Table parameter
15-38dm-ebs table 형식은 다음과 같습니다.
<dev path> <offset> <emulated sectors> [<underlying sectors>]
Device 위치, emulated sector 수와 선택적 underlying sector 수를 지정합니다.
Offset과 block-size 예
39-51첫 예는 `/dev/sda`의 sector offset 1024에서 1 sector, 즉 512-byte logical block을 emulation하고 underlying block size는 device에서 자동으로 가져옵니다.
ebs /dev/sda 1024 1
두 번째 예는 `/dev/sda`의 sector offset 128에서 2 sector, 즉 1KiB logical block을 emulation하고 underlying device block size를 4 sector, 즉 2KiB로 강제합니다. 이 구성이 동작하려면 `/dev/sda`의 실제 logical block size가 2KiB 이하여야 합니다.
ebs /dev/sda 128 2 4
모든 숫자는 512-byte sector 단위입니다.
Logical block emulation
dm-ebs.rst:1-38지원 block 크기, sector 단위 parameter와 alignment·underlying block 규칙을 설명합니다.