4

I have a small SSD and want to be able to dynamically tune the size of my swap (using swappiness=1, my intention is to use it for suspend to disk only)

btrfs does not support using a swap file unless it is loop mounted. How do I suspend / resume with a swap file mounted via losetup?

I'm running Manjaro with Linux kernel 4.9. The btrfs is an LVM LV, on LUKS.

1
  • Some clues here. Commented Sep 16, 2017 at 8:00

1 Answer 1

1

Upgrading Linux kernel to 5.0+ might help with this.

I haven't tried it myself, but according to the FAQ https://btrfs.wiki.kernel.org/index.php/FAQ#Does_btrfs_support_swap_files.3F

Does btrfs support swap files?

From kernel 5.0+ btrfs have native swap files support, but with some limitations. Swap file - must be fully allocated as NOCOW with no compression on one device.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.