- Mar 25, 2017
how about present the guest another (sparse) lun and client side mirror it and destroy the fat lun.
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.
zpool upgrade -v ... embedded_data Blocks which compress very well use even less space. ...
that is because you keep insisting that you understand how it should work, better, than people who are trying to point out for you that in fact you do not understand how it actually works. sorry but that is how your post,including one I am quoting, looks.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.
I am not sure it would work for OP.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.