ZFS iSCSI clone

rsq

New Member
Dec 30, 2014
3
0
1
Hi.

I am currently evaluating proxmox to solve a problem in my company.

I am interested in using the ZFS and iSCSI setup. I got everything running OK, except the cloning.

If I make a new VM, a new ZVOL is created. If I snapshot a VM, the snapshot shows up on the storage server.

All works, and the performance is good (SDR infiniband with ipoib for the storage links, dual gigabit ethernet for the VMs).

However:
When I make a clone of a VM snapshot, I see the proxmox server copy the whole zvol to a new zvol. I was expecting the proxmox server to make a ZFS clone from the snapshot on the storage server. It should be done in mere seconds, instead it takes 20+ minutes for a 250 GB volume.

What am I doing wrong here?
Have I misunderstood the capabilities outlined in the wiki? Phrase in question: "Being a native ZFS volume also means that Proxmox will provide users live snapshots and cloning of VM's using ZFS' native snapshot and volume reference features."

I use thin provisioning on my storage...
All comments are welcome, please help me out ;)
 
The term for ZFS clone in proxmox is a 'linked clone'. A linked clone in proxmox can only be made from a template.

A linked clone VM requires less disk space but cannot run without access to the base VM Template.
Linked Clones works for theses storages: files in raw, qcow2, vmdk format (either on local storage or nfs); rbd, sheepdog, nexenta.
It's doesn't work for LVM && ISCSI storages

nexanta in above context is the same as ZFS.
 
Thank you for the tip mir. I have it running now.

I have zfs configured with compression=zle. I also use the thin provisioning.

Made my template (ubuntu server 14.04 LTS) and zeroed the free space on the disk.

I now have 10 VM's running, each thinking they have a 256 GB hdd, and I use less than 2 gig on the storage server... seriously awesome! :)
 
Why not lz4?
Because I am not looking for compression, I am looking for the ability to reclaim unused space.

Consider the following:
1. I have a VM with 256Gb of space.
2. I load 200Gb of data on it that must be processed.
3. The data is processed and the result is copied off the VM to another server.
4. I clean up the data and the temporary files.

At this point, my VM uses 2 GB for the OS and applications only, but on the ZFS backend, 202 GB is used for the zvol.

If I now bring down my VM and run zerofree on the zvol, the zvol shrinks again to 2GB, freeing the space for another VM that might need it.

It is highly likely that lz4 will do the same, but a bit slower. I have never tested the performance of ZLE, so I don't know how slow/fast it would be. For me ZLE does all I need it to do: It allows me to massively oversubscribe my storage and get away with it.
 
lz4 does not only provide compression but in fact you also get a considerably performance gain as tests in the provided link shows. Whether zerofree can work the same wonders on a lz4 compressed zvol is left for testing;)