This is an automated archive made by the Lemmit Bot.

The original was posted on /r/fedora by /u/HarveySpecteer on 2023-07-15 20:14:44.


I use btrfs for my newly created fedora iot homelab where I want to host some vms with qemu/kvm. Researching the best way of hosting my vm images results in “skip everything and use raw”, “use zfs with zvol” or “use qcow2 and disable cow inside btrfs for those image files” or “use qcow2 and disable cow inside qcow2”.

I want to keep using btrfs as the file system on which these images reside due to the self-healing from my raid-10 array and the atomic snapshot feature which helps me take backups when a virtual machine is still running.

Sure, you could do this built-in with qcow2 images. But this would mean that I would have to turn off cow on btrfs (for those image files) which gives better performance but I would loose the self-healing if I am not mistaking. Or did I get this wrong? It is also nicer to only have one tool for taking snapshots than two.

Otherwise, I would like to create new qcow2 images with the “-o nocow” option. This way I would be able to use btrfs native commands for taking snapshots on all subvolumes in my system (even non-vm images) and have those files protected from bit rot. I am right now using raw images and those use a lot of space even though they are not being used to their full capacity. The difference between qcow2 and raw images really shows when copying the images from one place to another in terms of time.

TL;DR

Should I use btrfs as my file system with vm image files (qcow2 without cow) in subvolumes that are safe from bit rot in my btrfs raid-10 array with the possibility of native atomic snapshots?