Swap file creation error

What filesystem do you use?

Perhaps BTRFS?

The btrfs filesystem cannot support swap files because it moves file data around and the Linux swap code only takes the swap file’s mapping once. Catastrophe would occur if this is allowed – random file data that used blocks that the swap file once used would get corrupted.

P.S. They should really change “Invalid argument” to “Swap unsupported for this filesystem”

1 Like