Clone
Cheat sheet · https://pcornel.dk/topic.php?topic=4031
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 clonezfs get origin <pool>/<clone>— origin snapshotzfs 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 boundary | What to verify | Proof limit |
|---|---|---|
| Identity / topology | Pool GUID/name, dataset/zvol, top-level vdev class, leaf-device identity and effective properties | Object presence alone does not prove integrity, performance or recovery |
| Capacity / protection | Pool free space, quotas/reservations, snapshot retention, redundancy and active scrub/resilver state | Free space or ONLINE state at one layer does not prove end-to-end health |
| Failure boundary | A 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 |
| Acceptance | Healthy 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