Looks like the only (supported) way to put swap on a mirrored and check-summed storage is to create a VM (with fixed and pinned memory) on a mirrored and check-summed storage, create a file share, expose that to the Proxmox host (using NFS and loop) and put a swapfile on that?
I'm not too worried about the virtual network but I agree that it feels flimsy. mkswap and swapon don't accept files on BTRFS for good reason and the system might need additional memory to write to swap (causing a deadlock on ZFS also). By using a VM with pinned memory (like PCI passthrough) you reserve memory to do this safely. Not sure about CoW of the underlying storage, though. And if I passthroug the drives to the VM, I do indeed end up with the same issue but nested... maybe I'm overthinking this.Isn't this the same as putting a swapfile on btrfs or zfs directly but with extrasteps so not supported? And way more fragile due to the NFS layer between?I wouldn't see some hack from a raspberry forum as "supported".
Turns out that a swapfile on BTRFS is possible but only when using single data copy without checksums, which is too fragile IMHO.
Looks like the only (supported) way to put swap on a mirrored and check-summed storage is to create a VM (with fixed and pinned memory) on a mirrored and check-summed storage, create a file share, expose that to the Proxmox host (using NFS and loop) and put a swapfile on that?
We use essential cookies to make this site work, and optional cookies to enhance your experience.