← Documents Documentation/admin-guide/device-mapper/dm-ebs.rst GitHub 원문 ↗

Linux 6.18.37 · Administration / Device Mapper

dm-ebs target

큰 logical block device에서 512-4096 byte의 작은 logical block size를 emulation하는 dm-ebs table과 예제입니다.

Source pathDocumentation/admin-guide/device-mapper/dm-ebs.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

Logical block emulation

dm-ebs.rst:1-38

지원 block 크기, sector 단위 parameter와 alignment·underlying block 규칙을 설명합니다.

Table 예제

dm-ebs.rst:39-51

512-byte와 1KiB emulation을 서로 다른 offset·underlying size로 구성합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 ======
2 dm-ebs
3 ======
4
5
6 This target is similar to the linear target except that it emulates
7 a smaller logical block size on a device with a larger logical block
8 size. Its main purpose is to provide emulation of 512 byte sectors on
9 devices that do not provide this emulation (i.e. 4K native disks).
10
11 Supported emulated logical block sizes 512, 1024, 2048 and 4096.
12
13 Underlying block size can be set to > 4K to test buffering larger units.
14
15
16 Table parameters
17 ----------------
18 <dev path> <offset> <emulated sectors> [<underlying sectors>]
19
20 Mandatory parameters:
21
22 <dev path>:
23 Full pathname to the underlying block-device,
24 or a "major:minor" device-number.
25 <offset>:
26 Starting sector within the device;
27 has to be a multiple of <emulated sectors>.
28 <emulated sectors>:
29 Number of sectors defining the logical block size to be emulated;
30 1, 2, 4, 8 sectors of 512 bytes supported.
31
32 Optional parameter:
33
34 <underlying sectors>:
35 Number of sectors defining the logical block size of <dev path>.
36 2^N supported, e.g. 8 = emulate 8 sectors of 512 bytes = 4KiB.
37 If not provided, the logical block size of <dev path> will be used.
38
39
40 Examples:
41
42 Emulate 1 sector = 512 bytes logical block size on /dev/sda starting at
43 offset 1024 sectors with underlying devices block size automatically set:
44
45 ebs /dev/sda 1024 1
46
47 Emulate 2 sector = 1KiB logical block size on /dev/sda starting at
48 offset 128 sectors, enforce 2KiB underlying device block size.
49 This presumes 2KiB logical blocksize on /dev/sda or less to work:
50
51 ebs /dev/sda 128 2 4
52

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도 시험할 수 있습니다.

dm-ebs block-size 변환
512/1024/2048/4096-byte logical I/Odm-ebsBuffer and align requestsLarger underlying logical block

상위 layer에는 작은 logical block을 보이고 underlying device에는 더 큰 unit으로 접근합니다.

Table parameter

15-38

dm-ebs table 형식은 다음과 같습니다.

  <dev path> <offset> <emulated sectors> [<underlying sectors>]
dm-ebs parameter
Parameter설명
`dev path`Underlying block device의 full pathname 또는 `major:minor` device number
`offset`Device 안의 시작 sector; `emulated sectors`의 배수여야 함
`emulated sectors`Emulated logical block을 이루는 512-byte sector 수; 1, 2, 4, 8 지원
`underlying sectors`선택적 underlying logical block의 512-byte sector 수; `2^N` 지원
undefinedundefined
undefinedundefined

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
dm-ebs 예제 비교
TableOffsetEmulatedUnderlying
`ebs /dev/sda 1024 1`10241 = 512B자동
`ebs /dev/sda 128 2 4`1282 = 1KiB4 = 2KiB

모든 숫자는 512-byte sector 단위입니다.