The problem is that a swapfile in btrfs cannot have CoW activated on the
file, and cannot be compressed. Also, you should not leave the file in
the root filesystem (even if it would work with the above settings)
because it will make snapshots of /@ messy.

If you manually do this, it will work:

- create a separate subvolume just for swap
- mount it somewhere like /swap (also add to fstab)
- create an empty file (/swap/swapfile)
- set non-compress and no-CoW on the file
- grow the file to the desired size
- mkswap on the file
- add swap file to fstab

now you can swapon -a and it will work.

The installer does not do that, it just creates a /swapfile as it would
do on any other filesystem and then on reboot it will not start.

Amano instructions above will work, but I would advise to also create
the subvolume.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1818811

Title:
  The swapfile on the Btrfs file system is not activated

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1818811/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to