Unfortunately this link adds nothing to the current discussion, because it doesn't write anything about the problem, but only some general remarks on the really good feature of thin-ZVOLs.I want to fly but my car can`t do it yet. Very old post http://cuddletech.com/?p=16
zpool upgrade -v
...
embedded_data
Blocks which compress very well use even less space.
...
It is a little strange that although I explained the problem, people keep stating, that they suppose I didn't understand ZFS-(thin-provisioning). I just want to repeat that I DID fully understand ZFS in this respect. Unfortunately they didn't get the problem.
.
let start with this pearl of misunderstanding,To repeat (assume compression disabled):
1) A new thin-provosioned ZVOL occupies (almost) no real space in ZFS. When reading from such a ZVOL, ZFS delivers zeros for every non-existing block, i.e. it delivers "virtual zeros" for "virtual blocks".
.
and now we got here. and you are right, "ven filling a ZVOL with only zeros " will force the ZFS and any other FS to allocate a full size to the volume. that is because you are WRITING ACTUAL DATA to the volume. Remeber? a "0" is still a value , hence it is a REAL data.2) Only by writing to the ZVOL blocks get allocated. Further ZVOL (unfortunately) makes no difference between bllocks filled with real data and blocks filled with zeros, so even filling a ZVOL with only zeros allocated the full size of the ZVOL from the pool. From a filesystem and application view however the ZVOL didn't change, because it contains only zeroes, which are "virtual zeros" before filling the volume and "stored zeroes" after filling the volume with zeros.
.
Have you activated discard for the volume? This works with virtio-scsi on Windows and will allow unmap to do its magic. This will also work with linux when you either unmap manually or add discard to the mount options to unmap continuously.
We use essential cookies to make this site work, and optional cookies to enhance your experience.