is it possible to convert dataset to sparse volume (thin provisioning)?

Xdg asked:

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.

My answer:

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 and zfs recv to the new one, and then swap their names.

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.