WSL2 + btrfs
Inside WSL2, vibe runs as Linux and automatically picks the clone (cp --reflink) or rsync copy strategy — no configuration needed. But the WSL2 root filesystem is always ext4, which does not support reflink, so cp --reflink=auto silently falls back to a full copy.
To get real Copy-on-Write in WSL2, mount a separate btrfs volume and keep your project (e.g. node_modules) on it. Once the project lives on btrfs, vibe’s existing clone strategy produces instant CoW copies automatically.
Why the WSL root can’t do CoW
Section titled “Why the WSL root can’t do CoW”- The WSL2 root is ext4 and hardcoded — it is not configurable via
.wslconfigorwsl.conf(ref microsoft/WSL#9339). - A “btrfs distro” (openSUSE / Fedora) does not help: WSL unpacks the rootfs into its own ext4 VHDX regardless.
- Running
btrfs-converton the root is not viable — the converted root won’t boot in WSL. - reflink only works within the same filesystem, so the source and the copy must both live on the btrfs volume.
Recommended setup — mount a secondary btrfs VHD
Section titled “Recommended setup — mount a secondary btrfs VHD”On the Windows side, in an Administrator PowerShell, create a VHD and attach it to WSL:
New-VHD -Path C:\wsl\dev-btrfs.vhdx -Dynamic -SizeBytes 128GB -BlockSizeBytes 1MBwsl --mount --vhd C:\wsl\dev-btrfs.vhdx --bareThen, inside WSL, format and mount the volume once:
lsblk # find the new device, e.g. /dev/sddsudo mkfs.btrfs /dev/sddsudo mkdir -p /mnt/btrfssudo blkid /dev/sdd # copy the UUIDecho 'UUID=<uuid> /mnt/btrfs btrfs defaults,nofail 0 0' | sudo tee -a /etc/fstabsudo mount -asudo chown $USER:$USER /mnt/btrfs
# Put the project on the btrfs volume; reflink works within itmv ~/myproject /mnt/btrfs/myprojectcd /mnt/btrfs && cp --reflink=always -r myproject myproject-copyRe-attach on reboot
Section titled “Re-attach on reboot”wsl --mount --vhd ... --bare is a host-side operation and must be re-run after a Windows restart (for example, a Task Scheduler entry set to “Run with highest privileges” at login). Once the disk is attached, /etc/fstab mounts it automatically (automount.mountFsTab defaults to true).