Pcornel
Storage · ZFS

Clone

Cheat sheet · https://pcornel.dk/topic.php?topic=4031

Back to the Topic

Answer

A clone starts as a writable dependent child of an origin snapshot. New writes allocate new blocks while unchanged data remains shared. The origin snapshot cannot normally be destroyed while dependent clones exist unless relationships are changed through supported operations such as promotion. Clone space and lifecycle therefore depend on both the clone and origin lineage.

Remember

  • Clone ≠ full independent copy at creation.
  • Clone ≠ backup.
  • Writable clone ≠ application-consistent source snapshot.
  • Deleting clone/origin relationships requires dependency awareness, not just space estimates.

First checks

  • zfs clone <ds>@<snap> <pool>/<clone> — create clone
  • zfs get origin <pool>/<clone> — origin snapshot
  • zfs promote <pool>/<clone> — swap dependency

Commands

zfs promote

Verify in this order

snapshot → clone → changes stored separately

Where it usually breaks

First mismatch in member media → metadata/layout → allocation/placement → redundancy/recovery → logical object → consumer; preserve identity/pre-state before mutation.

ZFS → Clone ZFS map

ZFS boundaryWhat to verifyProof limit
Identity / topologyPool GUID/name, dataset/zvol, top-level vdev class, leaf-device identity and effective propertiesObject presence alone does not prove integrity, performance or recovery
Capacity / protectionPool free space, quotas/reservations, snapshot retention, redundancy and active scrub/resilver stateFree space or ONLINE state at one layer does not prove end-to-end health
Failure boundaryA clone being writable proves ZFS created a usable dependent dataset/volume from the snapshot; it does not prove physical independence or backup isolation.Correlate ZFS evidence with both workload and lower device/path evidence
AcceptanceHealthy evidence: origin relationship is known, clone divergence and capacity are controlled, and intended workload uses the correct cloned identity/data.Close only after original workload plus checksum/read-back/recovery verification succeeds

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4031

Confirmation

Confirm action

Continue?