Zvol
Cheat sheet · https://pcornel.dk/topic.php?topic=4013
Answer
A zvol is a ZFS dataset of type volume that presents a block device instead of a mounted ZFS filesystem. It has properties such as volsize and volblocksize, and its upper consumer may add another partition, filesystem, database or virtual-disk layer. ZFS snapshots/checksums protect the zvol blocks, not the semantic consistency of the filesystem or application inside them.
Remember
- Zvol ≠ filesystem.
- volsize ≠ used guest/application data.
- Zvol snapshot ≠ application-consistent backup by default.
- volblocksize choice ≠ workload block size at every upper/lower layer.
First checks
zfs list -t volume -o name,volsize,used,refreservation— zvolsls -l /dev/zvol/<pool>/— device nodeszfs get volblocksize <zvol>— block size
Verify in this order
block I/O → zvol → pool
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 → Zvol 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 present writable zvol proves ZFS can expose and service the tested block device; it does not prove the upper filesystem/application is consistent or correctly resized. | Correlate ZFS evidence with both workload and lower device/path evidence |
| Acceptance | Healthy evidence: the intended zvol has expected size/properties, pool capacity and vdev health are sound, and representative consumer I/O completes without unexplained checksum or latency symptoms. | 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=4013