I've created ZFS datasets and installed virtual servers into them. Suddenly my ZFS volume free space is gone, but not all space is used in each dataset. I want to introduce thin provisioning (use ZFS sparse volume).
Is it possible to convert datasets into sparse volumes without deleting them? Thanks.
I don't think the accepted answer is correct in fact, but I don't have enough rep to comment.
Assuming when the OP says "datasets" they mean "ZFS volume" (or ZVOL).
The only difference between a thin-provisioned (a.k.a sparse) ZVOL and a regular one is whether the full size is reserved via the
refreservation
property e.g.So you can convert an existing ZVOL to sparse by changing
refreservation
for an existing ZVOL e.g.As far as I know it's not possible to convert an existing zvol to sparse; they must be created sparse to begin with.
However, you can create a new sparse zvol, and
zfs send
from the old one andzfs recv
to the new one, and then swap their names.