copy-on-read · shipping

Copy-on-read

Copy-on-read is a virtual-disk mode that copies inherited data into an overlay's storage when that data is read.

Related Observatory article: Copy-on-read on hesela.com

QEMU and libvirt expose copy-on-read as an optional mode, disabled by default. It avoids repeated backing reads; a speedup is workload-dependent. [1] [2]

A workload containing only guest reads differs from a read-only block node: QEMU v8.2.2 rejects its copy-on-read opening flag on such a node. Read-triggered materialization changes storage without a guest write. [3] [4]

In eight offline configurations run twice, a 512-byte read localized 65,536 bytes with standard 64-KiB clusters, or 4,096 with extended L2 and 128-KiB clusters. Ordinary reads left the data inherited. These are logical map lengths, not physical write or allocation counts. Zero input used zero mappings; complete exports and bases stayed unchanged. The backing filename and unread dependencies remained. [6]

Tang's 2011 FVD paper distinguishes read-triggered copying from prefetching untouched regions. Its PostMark comparison disabled both features: its reported advantage is not a copy-on-read speedup. [7]

The separate QEMU copy-on-read filter can limit copying to an inclusive bottom allocation-bearing node. Deeper data can remain inherited. Neither enabling the mode nor a successful partial read proves a self-contained, authentic recovery image. Preserve remaining backing dependencies. [8] [4]

FVD's section 3.2 permits copied data to remain absent from the durable bitmap: after a host crash, the unchanged base can supply the same contents again. This is a source-retention argument for that design, not a QCOW2 persistence guarantee or evidence that the base can be removed. [7]

Relations

related
QCOW2, QCOW2 backing chain, Copy-on-write (storage)

Citations

  1. QEMU v8.2.2: copy-on-read drive option and default (accessed 2026-11-05)
  2. libvirt domain XML: disk driver copy_on_read attribute (accessed 2026-11-05)
  3. QEMU v8.2.2 block.c: copy-on-read opening checks (accessed 2026-11-05)
  4. QEMU v8.2.2 block/io.c: bdrv_co_do_copy_on_readv (accessed 2026-11-05)
  5. Hesela: eight offline QEMU read-materialization configurations, command receipts and full-content hashes (accessed 2026-11-05)
  6. Chunqiang Tang (2011), FVD, USENIX ATC 11, sections 3 and 4 (accessed 2026-11-05)
  7. QEMU v8.2.2 QAPI: BlockdevOptionsCor and optional bottom boundary (accessed 2026-11-05)

Further reading

  1. Hesela: QCOW2 backups and read-triggered materialization (accessed 2026-11-05)
Sources & caveats
  • QEMU v8.2.2/libvirt and USENIX ATC 2011 source review. Eight synthetic offline configurations run twice on Ubuntu qemu-utils 1:8.2.2+ds-0ubuntu1.18; no VM, crash, performance or application-recovery experiment.
  • Executable hashes, command receipts, maps, full-content hashes and reproduction code are published with the existing QCOW2 analysis.

JSON: /data/terms/copy-on-read.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. Copy-on-read. Hesela. 2026-11-05. https://hesela.dev/terms/copy-on-read/