qcow2 or raw in top of zfs

Alessandro 123

Well-Known Member
May 22, 2016
653
24
58
42
Which is the best? Qcow2 or raw on top of zfs?

Zfs is COW, putting another COW layer like qcow2 could be nonsense

Zfs has features like snapshots, compression and so on natively, putting the same in qcow2 on top of zfs could be nonsense

Any advantage by using qcow2 with zfs?

One drawback could be the image corruption, corruption that won't be possible by using raw
 
Such a live migration is actually easier with ZFS send/receive. I will hope that if/when this feature is built that zfs storage is supported.

it does not currenty. well it does support ZFS because it is not storage dependent, but it does not use send/receive and snapshots/clones are not transferred (it allocates a new disk on the target node, and mirrors the content until both sides are equal, then the VM is switched over)

I'd like to implement a "minimal downtime" ZFS send/receive migration for both containers and VMs though - similar to the container suspend backup:
  1. make snapshot
  2. zfs send/receive to target node
  3. shutdown guest
  4. make another snapshot
  5. zfs send/receive delta since 1, hopefully not too big ;)
  6. start guest on target node
  7. cleanup on source node
obviously this only works if all the disks/volumes are ZFS, but for containers something similar could also be implemented with rsync on arbitrary storages.

ideally, at some point we could integrate such a mode with pve-zsync and reuse the already asynchronously synced data as base, but that is more work to implement with all the needed error handling.
 
  • Like
Reactions: chrone