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

Linux 6.18.37 · Administration / Device Mapper

dm-clone target

Read-only source를 writable destination으로 background hydration하면서 즉시 mount 가능한 one-to-one virtual clone을 제공하는 dm-clone을 설명합니다.

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

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

1. 요약·해설

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

Region hydration 설계

dm-clone.rst:1-132

Source·destination·metadata device, region별 I/O routing, discard hint와 background copy 및 metadata commit 모델을 정리합니다.

Target interface와 예제

dm-clone.rst:133-263

Constructor, status, runtime message와 file-system clone 후 linear table로 전환하는 절차를 설명합니다.

한계와 대안 비교

dm-clone.rst:264-333

Known issue와 dm-cache, dm-snapshot, dm-mirror, dm-thin을 대신 사용하지 않은 이유를 비교합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0-only
2
3 ========
4 dm-clone
5 ========
6
7 Introduction
8 ============
9
10 dm-clone is a device mapper target which produces a one-to-one copy of an
11 existing, read-only source device into a writable destination device: It
12 presents a virtual block device which makes all data appear immediately, and
13 redirects reads and writes accordingly.
14
15 The main use case of dm-clone is to clone a potentially remote, high-latency,
16 read-only, archival-type block device into a writable, fast, primary-type device
17 for fast, low-latency I/O. The cloned device is visible/mountable immediately
18 and the copy of the source device to the destination device happens in the
19 background, in parallel with user I/O.
20
21 For example, one could restore an application backup from a read-only copy,
22 accessible through a network storage protocol (NBD, Fibre Channel, iSCSI, AoE,
23 etc.), into a local SSD or NVMe device, and start using the device immediately,
24 without waiting for the restore to complete.
25
26 When the cloning completes, the dm-clone table can be removed altogether and be
27 replaced, e.g., by a linear table, mapping directly to the destination device.
28
29 The dm-clone target reuses the metadata library used by the thin-provisioning
30 target.
31
32 Glossary
33 ========
34
35 Hydration
36 The process of filling a region of the destination device with data from
37 the same region of the source device, i.e., copying the region from the
38 source to the destination device.
39
40 Once a region gets hydrated we redirect all I/O regarding it to the destination
41 device.
42
43 Design
44 ======
45
46 Sub-devices
47 -----------
48
49 The target is constructed by passing three devices to it (along with other
50 parameters detailed later):
51
52 1. A source device - the read-only device that gets cloned and source of the
53 hydration.
54
55 2. A destination device - the destination of the hydration, which will become a
56 clone of the source device.
57
58 3. A small metadata device - it records which regions are already valid in the
59 destination device, i.e., which regions have already been hydrated, or have
60 been written to directly, via user I/O.
61
62 The size of the destination device must be at least equal to the size of the
63 source device.
64
65 Regions
66 -------
67
68 dm-clone divides the source and destination devices in fixed sized regions.
69 Regions are the unit of hydration, i.e., the minimum amount of data copied from
70 the source to the destination device.
71
72 The region size is configurable when you first create the dm-clone device. The
73 recommended region size is the same as the file system block size, which usually
74 is 4KB. The region size must be between 8 sectors (4KB) and 2097152 sectors
75 (1GB) and a power of two.
76
77 Reads and writes from/to hydrated regions are serviced from the destination
78 device.
79
80 A read to a not yet hydrated region is serviced directly from the source device.
81
82 A write to a not yet hydrated region will be delayed until the corresponding
83 region has been hydrated and the hydration of the region starts immediately.
84
85 Note that a write request with size equal to region size will skip copying of
86 the corresponding region from the source device and overwrite the region of the
87 destination device directly.
88
89 Discards
90 --------
91
92 dm-clone interprets a discard request to a range that hasn't been hydrated yet
93 as a hint to skip hydration of the regions covered by the request, i.e., it
94 skips copying the region's data from the source to the destination device, and
95 only updates its metadata.
96
97 If the destination device supports discards, then by default dm-clone will pass
98 down discard requests to it.
99
100 Background Hydration
101 --------------------
102
103 dm-clone copies continuously from the source to the destination device, until
104 all of the device has been copied.
105
106 Copying data from the source to the destination device uses bandwidth. The user
107 can set a throttle to prevent more than a certain amount of copying occurring at
108 any one time. Moreover, dm-clone takes into account user I/O traffic going to
109 the devices and pauses the background hydration when there is I/O in-flight.
110
111 A message `hydration_threshold <#regions>` can be used to set the maximum number
112 of regions being copied, the default being 1 region.
113
114 dm-clone employs dm-kcopyd for copying portions of the source device to the
115 destination device. By default, we issue copy requests of size equal to the
116 region size. A message `hydration_batch_size <#regions>` can be used to tune the
117 size of these copy requests. Increasing the hydration batch size results in
118 dm-clone trying to batch together contiguous regions, so we copy the data in
119 batches of this many regions.
120
121 When the hydration of the destination device finishes, a dm event will be sent
122 to user space.
123
124 Updating on-disk metadata
125 -------------------------
126
127 On-disk metadata is committed every time a FLUSH or FUA bio is written. If no
128 such requests are made then commits will occur every second. This means the
129 dm-clone device behaves like a physical disk that has a volatile write cache. If
130 power is lost you may lose some recent writes. The metadata should always be
131 consistent in spite of any crash.
132
133 Target Interface
134 ================
135
136 Constructor
137 -----------
138
139 ::
140
141 clone <metadata dev> <destination dev> <source dev> <region size>
142 [<#feature args> [<feature arg>]* [<#core args> [<core arg>]*]]
143
144 ================ ==============================================================
145 metadata dev Fast device holding the persistent metadata
146 destination dev The destination device, where the source will be cloned
147 source dev Read only device containing the data that gets cloned
148 region size The size of a region in sectors
149
150 #feature args Number of feature arguments passed
151 feature args no_hydration or no_discard_passdown
152
153 #core args An even number of arguments corresponding to key/value pairs
154 passed to dm-clone
155 core args Key/value pairs passed to dm-clone, e.g. `hydration_threshold
156 256`
157 ================ ==============================================================
158
159 Optional feature arguments are:
160
161 ==================== =========================================================
162 no_hydration Create a dm-clone instance with background hydration
163 disabled
164 no_discard_passdown Disable passing down discards to the destination device
165 ==================== =========================================================
166
167 Optional core arguments are:
168
169 ================================ ==============================================
170 hydration_threshold <#regions> Maximum number of regions being copied from
171 the source to the destination device at any
172 one time, during background hydration.
173 hydration_batch_size <#regions> During background hydration, try to batch
174 together contiguous regions, so we copy data
175 from the source to the destination device in
176 batches of this many regions.
177 ================================ ==============================================
178
179 Status
180 ------
181
182 ::
183
184 <metadata block size> <#used metadata blocks>/<#total metadata blocks>
185 <region size> <#hydrated regions>/<#total regions> <#hydrating regions>
186 <#feature args> <feature args>* <#core args> <core args>*
187 <clone metadata mode>
188
189 ======================= =======================================================
190 metadata block size Fixed block size for each metadata block in sectors
191 #used metadata blocks Number of metadata blocks used
192 #total metadata blocks Total number of metadata blocks
193 region size Configurable region size for the device in sectors
194 #hydrated regions Number of regions that have finished hydrating
195 #total regions Total number of regions to hydrate
196 #hydrating regions Number of regions currently hydrating
197 #feature args Number of feature arguments to follow
198 feature args Feature arguments, e.g. `no_hydration`
199 #core args Even number of core arguments to follow
200 core args Key/value pairs for tuning the core, e.g.
201 `hydration_threshold 256`
202 clone metadata mode ro if read-only, rw if read-write
203
204 In serious cases where even a read-only mode is deemed
205 unsafe no further I/O will be permitted and the status
206 will just contain the string 'Fail'. If the metadata
207 mode changes, a dm event will be sent to user space.
208 ======================= =======================================================
209
210 Messages
211 --------
212
213 `disable_hydration`
214 Disable the background hydration of the destination device.
215
216 `enable_hydration`
217 Enable the background hydration of the destination device.
218
219 `hydration_threshold <#regions>`
220 Set background hydration threshold.
221
222 `hydration_batch_size <#regions>`
223 Set background hydration batch size.
224
225 Examples
226 ========
227
228 Clone a device containing a file system
229 ---------------------------------------
230
231 1. Create the dm-clone device.
232
233 ::
234
235 dmsetup create clone --table "0 1048576000 clone $metadata_dev $dest_dev \
236 $source_dev 8 1 no_hydration"
237
238 2. Mount the device and trim the file system. dm-clone interprets the discards
239 sent by the file system and it will not hydrate the unused space.
240
241 ::
242
243 mount /dev/mapper/clone /mnt/cloned-fs
244 fstrim /mnt/cloned-fs
245
246 3. Enable background hydration of the destination device.
247
248 ::
249
250 dmsetup message clone 0 enable_hydration
251
252 4. When the hydration finishes, we can replace the dm-clone table with a linear
253 table.
254
255 ::
256
257 dmsetup suspend clone
258 dmsetup load clone --table "0 1048576000 linear $dest_dev 0"
259 dmsetup resume clone
260
261 The metadata device is no longer needed and can be safely discarded or reused
262 for other purposes.
263
264 Known issues
265 ============
266
267 1. We redirect reads, to not-yet-hydrated regions, to the source device. If
268 reading the source device has high latency and the user repeatedly reads from
269 the same regions, this behaviour could degrade performance. We should use
270 these reads as hints to hydrate the relevant regions sooner. Currently, we
271 rely on the page cache to cache these regions, so we hopefully don't end up
272 reading them multiple times from the source device.
273
274 2. Release in-core resources, i.e., the bitmaps tracking which regions are
275 hydrated, after the hydration has finished.
276
277 3. During background hydration, if we fail to read the source or write to the
278 destination device, we print an error message, but the hydration process
279 continues indefinitely, until it succeeds. We should stop the background
280 hydration after a number of failures and emit a dm event for user space to
281 notice.
282
283 Why not...?
284 ===========
285
286 We explored the following alternatives before implementing dm-clone:
287
288 1. Use dm-cache with cache size equal to the source device and implement a new
289 cloning policy:
290
291 * The resulting cache device is not a one-to-one mirror of the source device
292 and thus we cannot remove the cache device once cloning completes.
293
294 * dm-cache writes to the source device, which violates our requirement that
295 the source device must be treated as read-only.
296
297 * Caching is semantically different from cloning.
298
299 2. Use dm-snapshot with a COW device equal to the source device:
300
301 * dm-snapshot stores its metadata in the COW device, so the resulting device
302 is not a one-to-one mirror of the source device.
303
304 * No background copying mechanism.
305
306 * dm-snapshot needs to commit its metadata whenever a pending exception
307 completes, to ensure snapshot consistency. In the case of cloning, we don't
308 need to be so strict and can rely on committing metadata every time a FLUSH
309 or FUA bio is written, or periodically, like dm-thin and dm-cache do. This
310 improves the performance significantly.
311
312 3. Use dm-mirror: The mirror target has a background copying/mirroring
313 mechanism, but it writes to all mirrors, thus violating our requirement that
314 the source device must be treated as read-only.
315
316 4. Use dm-thin's external snapshot functionality. This approach is the most
317 promising among all alternatives, as the thinly-provisioned volume is a
318 one-to-one mirror of the source device and handles reads and writes to
319 un-provisioned/not-yet-cloned areas the same way as dm-clone does.
320
321 Still:
322
323 * There is no background copying mechanism, though one could be implemented.
324
325 * Most importantly, we want to support arbitrary block devices as the
326 destination of the cloning process and not restrict ourselves to
327 thinly-provisioned volumes. Thin-provisioning has an inherent metadata
328 overhead, for maintaining the thin volume mappings, which significantly
329 degrades performance.
330
331 Moreover, cloning a device shouldn't force the use of thin-provisioning. On
332 the other hand, if we wish to use thin provisioning, we can just use a thin
333 LV as dm-clone's destination device.
334

3. 한국어 전문 번역

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

즉시 사용 가능한 block-device clone

1-42

`dm-clone`은 기존 read-only source device를 writable destination device에 one-to-one으로 복제하는 device-mapper target입니다. 모든 data가 즉시 보이는 virtual block device를 제공하고, clone 진행 상태에 따라 read와 write를 알맞은 device로 redirect합니다.

주요 용도는 remote·high-latency·read-only archival block device를 writable·fast primary device로 clone해 낮은 latency의 빠른 I/O를 제공하는 것입니다. Clone device는 즉시 보이고 mount할 수 있으며, source에서 destination으로의 copy는 user I/O와 병렬로 background에서 진행됩니다.

예를 들어 NBD, Fibre Channel, iSCSI, AoE 같은 network storage protocol로 접근하는 read-only application backup을 local SSD나 NVMe로 복원하면서 전체 restore 완료를 기다리지 않고 즉시 사용할 수 있습니다.

Cloning이 끝나면 dm-clone table을 완전히 제거하고 destination device를 직접 map하는 linear table 등으로 교체할 수 있습니다. dm-clone target은 thin-provisioning target이 사용하는 metadata library를 재사용합니다.

`Hydration`은 source device의 특정 region data로 destination device의 같은 region을 채우는 과정, 즉 그 region을 source에서 destination으로 copy하는 과정입니다. Region이 hydrated되면 해당 region의 모든 I/O를 destination device로 redirect합니다.

dm-clone hydration과 전환
Read-only sourcedm-clone virtual device available immediatelyBackground region hydrationWritable destination becomes one-to-one cloneReplace with linear table

Virtual device는 즉시 열리고 region별 hydration이 background에서 진행됩니다.

Source, destination, metadata device

43-64

Target은 뒤에서 설명할 parameter와 함께 세 device를 받아 구성합니다.

dm-clone의 세 sub-device
Device역할
Source deviceClone 대상이며 hydration data를 제공하는 read-only device
Destination deviceHydration 목적지이며 최종적으로 source의 clone이 되는 writable device
Metadata device이미 hydrated되었거나 user I/O로 직접 write되어 destination에서 valid한 region 기록
undefinedundefined

Read-only 원본, writable 복제본과 persistent hydration state를 분리합니다.

Region 단위 hydration과 I/O

65-88

dm-clone은 source와 destination을 고정 크기 region으로 나눕니다. Region은 hydration 단위이며 source에서 destination으로 copy하는 최소 data 양입니다.

Region 크기는 dm-clone device를 처음 만들 때 설정합니다. File-system block 크기와 같은 값이 권장되며 보통 4KB입니다. 허용 범위는 8 sector(4KB)에서 `2097152` sector(1GB)이고 2의 거듭제곱이어야 합니다.

Hydrated region에 대한 read와 write는 destination device에서 처리합니다. 아직 hydrated되지 않은 region의 read는 source device에서 직접 처리합니다.

아직 hydrated되지 않은 region에 write하면 해당 region의 hydration을 즉시 시작하고 완료될 때까지 write를 지연합니다. 단, write request 크기가 region 크기와 정확히 같으면 source에서 해당 region을 copy하지 않고 destination region을 직접 덮어씁니다.

Region 상태별 I/O routing
상태·요청처리
Hydrated region read/writeDestination device에서 처리
Not-yet-hydrated readSource device에서 직접 처리
Not-yet-hydrated partial writeHydration 즉시 시작, 완료까지 write 지연
Region-size full writeSource copy를 생략하고 destination을 직접 덮어씀

Hydration 여부와 full-region write 여부에 따라 data source가 달라집니다.

Partial write hydration
Write targets unhydrated regionStart region hydrationDelay writeCopy source region to destinationApply write to destination

부분 write는 기존 source data가 필요한 나머지 region을 먼저 채웁니다.

Discard hint와 background hydration

89-123

아직 hydrated되지 않은 범위에 대한 discard request는 해당 region의 hydration을 생략하라는 hint로 해석합니다. Source에서 destination으로 region data를 copy하지 않고 metadata만 갱신합니다.

Destination device가 discard를 지원하면 dm-clone은 기본적으로 discard request를 아래 device로 전달합니다.

dm-clone은 전체 device가 copy될 때까지 source에서 destination으로 계속 background copy합니다. 이 작업은 bandwidth를 사용하므로 동시에 copy하는 양을 throttle할 수 있습니다. 또한 device로 향하는 user I/O traffic을 고려해 in-flight I/O가 있으면 background hydration을 일시 중지합니다.

`hydration_threshold <#regions>` message는 동시에 copy할 최대 region 수를 정하며 기본값은 1 region입니다.

dm-clone은 source 일부를 destination으로 copy할 때 `dm-kcopyd`를 사용합니다. 기본 copy request 크기는 region 크기와 같습니다. `hydration_batch_size <#regions>` message로 크기를 조정할 수 있으며 값을 늘리면 연속 region을 묶어 지정한 region 수만큼 batch로 copy하려고 합니다.

Destination device의 hydration이 끝나면 user space로 dm event를 보냅니다.

Discard로 hydration 생략
Discard covers unhydrated regionsMark hydration unnecessarySkip source data copyUpdate metadataPass discard to destination by default

사용하지 않는 unhydrated 영역은 data copy 없이 valid state만 갱신할 수 있습니다.

Background hydration throttle
Select contiguous regionsCheck in-flight user I/OPause when busydm-kcopyd copies a batchRepeat until all hydratedEmit dm event

User I/O를 우선하고 threshold와 batch size로 copy pressure를 제어합니다.

On-disk metadata commit

124-132

FLUSH 또는 FUA bio가 write될 때마다 on-disk metadata를 commit합니다. 그런 request가 없으면 1초마다 commit합니다.

따라서 dm-clone device는 volatile write cache가 있는 물리 disk처럼 동작합니다. 전원을 잃으면 최근 write 일부를 잃을 수 있지만 어떤 crash 뒤에도 metadata는 항상 일관된 상태여야 합니다.

Metadata commit trigger
FLUSH or FUA bioCommit on-disk metadata
No FLUSH/FUACommit every second
Power lossRecent writes may be lostMetadata remains consistent

명시적 durability request와 periodic commit을 함께 사용합니다.

Target constructor와 optional argument

133-178

dm-clone target의 constructor 형식은 다음과 같습니다.

   clone <metadata dev> <destination dev> <source dev> <region size>
         [<#feature args> [<feature arg>]* [<#core args> [<core arg>]*]]
Constructor 기본 field
Field설명
`metadata dev`Persistent metadata를 보관하는 fast device
`destination dev`Source가 clone될 destination device
`source dev`Clone할 data가 있는 read-only device
`region size`Sector 단위 region 크기
`#feature args`뒤따르는 feature argument 수
`feature args``no_hydration` 또는 `no_discard_passdown`
`#core args`뒤따르는 key/value core argument의 짝수 개수
`core args`dm-clone에 전달하는 key/value, 예: `hydration_threshold 256`

Persistent state, destination, source와 region 크기를 지정합니다.

Optional feature argument
Feature동작
`no_hydration`Background hydration을 비활성화한 instance 생성
`no_discard_passdown`Destination device로 discard를 전달하지 않음

Background hydration과 discard 전달 여부를 제어합니다.

Optional core argument
Core argument동작
`hydration_threshold <#regions>`Background hydration 중 동시에 copy할 최대 region 수
`hydration_batch_size <#regions>`연속 region을 지정 개수씩 묶어 source에서 destination으로 copy

동시 copy 양과 contiguous batching을 조절합니다.

Status field와 runtime message

179-224

Status는 metadata 사용량, region hydration 진행 상황, feature·core argument와 metadata mode를 다음 순서로 출력합니다.

   <metadata block size> <#used metadata blocks>/<#total metadata blocks>
   <region size> <#hydrated regions>/<#total regions> <#hydrating regions>
   <#feature args> <feature args>* <#core args> <core args>*
   <clone metadata mode>
dm-clone status field
Field설명
`metadata block size`Sector 단위 고정 metadata block 크기
`#used metadata blocks`사용 중인 metadata block 수
`#total metadata blocks`전체 metadata block 수
`region size`Sector 단위 configurable region 크기
`#hydrated regions`Hydration이 끝난 region 수
`#total regions`Hydrate할 전체 region 수
`#hydrating regions`현재 hydration 중인 region 수
`#feature args` / `feature args`뒤따르는 feature 수와 값
`#core args` / `core args`짝수 개 core tuning key/value
`clone metadata mode`Read-only는 `ro`, read-write는 `rw`
undefinedundefined
undefinedundefined

Status line에서 hydration 진행률과 metadata 안전 상태를 읽습니다.

Runtime message
Message효과
`disable_hydration`Destination의 background hydration 비활성화
`enable_hydration`Destination의 background hydration 활성화
`hydration_threshold <#regions>`Background hydration threshold 설정
`hydration_batch_size <#regions>`Background hydration batch size 설정

Background hydration을 켜고 끄거나 copy pressure를 조정합니다.

File system이 있는 device clone

225-263

첫 단계에서는 background hydration을 끈 상태로 dm-clone device를 만듭니다.

    dmsetup create clone --table "0 1048576000 clone $metadata_dev $dest_dev \
      $source_dev 8 1 no_hydration"

두 번째 단계에서는 device를 mount하고 file system을 trim합니다. dm-clone은 file system이 보낸 discard를 해석해 사용하지 않는 공간을 hydrate하지 않습니다.

    mount /dev/mapper/clone /mnt/cloned-fs
    fstrim /mnt/cloned-fs

세 번째 단계에서는 destination의 background hydration을 활성화합니다.

    dmsetup message clone 0 enable_hydration

Hydration이 끝나면 dm-clone table을 destination을 직접 가리키는 linear table로 교체할 수 있습니다.

    dmsetup suspend clone
    dmsetup load clone --table "0 1048576000 linear $dest_dev 0"
    dmsetup resume clone

이 시점부터 metadata device는 필요하지 않으므로 안전하게 버리거나 다른 목적으로 재사용할 수 있습니다.

File-system clone 절차
Create clone with no_hydrationMount clonefstrim unused spaceenable_hydrationWait for dm eventSuspend and load linear tableResume on destination

Unused space를 trim으로 제외한 뒤 background copy를 완료하고 linear mapping으로 전환합니다.

현재 알려진 한계

264-282

아직 hydrated되지 않은 region의 read는 source device로 redirect합니다. Source latency가 높고 같은 region을 반복해서 읽으면 성능이 떨어질 수 있습니다. 이런 read를 해당 region의 hydration 우선순위를 높이는 hint로 사용해야 합니다. 현재는 page cache가 region을 cache해 source에서 여러 번 읽지 않기를 기대합니다.

Hydration이 끝난 뒤에는 어떤 region이 hydrated됐는지 추적하는 bitmap 같은 in-core resource를 해제해야 합니다.

Background hydration 중 source read나 destination write가 실패하면 error message를 출력하지만 성공할 때까지 무기한 계속 시도합니다. 일정 횟수 실패 뒤 background hydration을 멈추고 user space가 알아차릴 수 있도록 dm event를 보내야 합니다.

Known issue와 필요한 개선
문제현재 동작개선
High-latency source 반복 readPage cache에 의존Read를 early hydration hint로 사용
Hydration 완료 뒤 memoryRegion bitmap 유지In-core tracking resource 해제
Background copy I/O failure무기한 retry실패 threshold 뒤 중단하고 dm event 발생

현재 동작이 만드는 비용과 문서가 제안하는 개선 방향입니다.

다른 DM target을 사용하지 않은 이유

283-333

dm-clone을 구현하기 전에 dm-cache, dm-snapshot, dm-mirror, dm-thin external snapshot을 대안으로 검토했습니다.

검토한 대안
대안장점채택하지 않은 이유
dm-cache + source 크기의 cacheCloning policy를 추가할 수 있음결과가 one-to-one mirror가 아니어서 완료 뒤 cache 제거 불가; source에 write; caching과 cloning의 의미가 다름
dm-snapshot + source 크기의 COWSnapshot mapping 활용Metadata가 COW 안에 있어 one-to-one mirror가 아님; background copy 없음; pending exception마다 commit해 cloning에 불필요하게 엄격하고 느림
dm-mirrorBackground copying/mirroring 제공모든 mirror에 write하므로 source를 read-only로 취급해야 한다는 요구 위반
dm-thin external snapshot가장 유망하며 one-to-one mirror와 unprovisioned area I/O가 dm-clone과 유사Background copy가 없고 destination이 thin volume으로 제한되며 mapping metadata overhead가 성능을 크게 저하

One-to-one clone, read-only source, background copy와 destination 범용성 요구를 기준으로 비교합니다.

dm-snapshot은 pending exception이 끝날 때마다 metadata를 commit해 snapshot consistency를 보장합니다. Cloning에는 그 정도로 엄격할 필요가 없으므로 dm-thin과 dm-cache처럼 FLUSH/FUA bio 또는 periodic commit에 의존할 수 있고, 이것이 성능을 크게 높입니다.

dm-thin external snapshot은 대안 중 가장 유망합니다. Thinly-provisioned volume은 source의 one-to-one mirror이고 아직 provision 또는 clone되지 않은 영역의 read/write를 dm-clone과 같은 방식으로 처리합니다. Background copy도 구현할 수 있습니다.

하지만 clone destination으로 임의의 block device를 지원해야 하며 thinly-provisioned volume으로 제한하고 싶지 않습니다. Thin-provisioning의 mapping metadata overhead는 성능을 크게 낮춥니다. Device clone이 thin-provisioning 사용을 강제해서도 안 됩니다. Thin provisioning이 필요하다면 thin LV를 dm-clone의 destination device로 사용하면 됩니다.