btrfs hosts: qcow2/raw disks are created without nocow
Author: tlapik123Created Aug 30, 2026Updated Sep 11, 2026
Labelshost/Linux
Description
On btrfs hosts (Fedora/openSUSE default) Lima creates disk images with CoW. A qcow2 on a datacow btrfs fragments heavily over time. There is also no mention of it in the docs.
Nocow has trade-offs: on btrfs it implies nodatasum (no checksums/self-heal), and a nocow file can't be reflinked to/from a regular one - so flagging only the disk file would break the reflink copy from the download cache and limactl clone. Flagging the directories (instance dir + download cache) at creation keeps reflinks working, since nocow <-> nocow reflink is fine.
Proposal:
- Docs/FAQ note for btrfs hosts:
chattr +Con${LIMA_HOME}and the download cache before first use, with the trade-offs. - Maybe: set
nocowon newly created instance/cache dirs when on btrfs, as libvirt >=6.6.0 does for new storage pools (it's opt out there) - or maybe opt-in flag?
Apologies if this has already been discussed.
Source: lima-vm/lima