[Bug 1931249] [NEW] btrfs filesystem - swapfile created leads to error - swap disabled

rud 1931249 at bugs.launchpad.net
Tue Jun 8 12:20:49 UTC 2021


Public bug reported:

With the current installer, Ubuntu creates /swapfile even when during installation the drive is formatted as BTRFS.
But this will show an error in syslog and the swapfile will not be used since btrfs does not allow a swapfile.
This means swap is disabled when Ubuntu is installed with btrfs filesystem. This happens for everyone, it is not device specific or anything like that. 

As far as I know, all best practices around swapfile and btrfs point to:

1. create a dedicated swap subvolume in the root subvolume --> note the current Ubuntu Installer already creates @ and @home subvolumes and properly configures them in /etc/fstab
2. create a folder /swap and mount the subvolume there.
3. create the swapfile and apply chattr +c.
4. enable swap

Please at least prevent the /swapfile from being created if filesystem
is btrfs.

Also please consider configuring swap for btrfs, since the installer
already creates subvolumes, consider creating the subvolume for @swap.

** Affects: ubiquity (Ubuntu)
     Importance: Undecided
         Status: New

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

Title:
  btrfs filesystem - swapfile created leads to error - swap disabled

Status in ubiquity package in Ubuntu:
  New

Bug description:
  With the current installer, Ubuntu creates /swapfile even when during installation the drive is formatted as BTRFS.
  But this will show an error in syslog and the swapfile will not be used since btrfs does not allow a swapfile.
  This means swap is disabled when Ubuntu is installed with btrfs filesystem. This happens for everyone, it is not device specific or anything like that. 

  As far as I know, all best practices around swapfile and btrfs point
  to:

  1. create a dedicated swap subvolume in the root subvolume --> note the current Ubuntu Installer already creates @ and @home subvolumes and properly configures them in /etc/fstab
  2. create a folder /swap and mount the subvolume there.
  3. create the swapfile and apply chattr +c.
  4. enable swap

  Please at least prevent the /swapfile from being created if filesystem
  is btrfs.

  Also please consider configuring swap for btrfs, since the installer
  already creates subvolumes, consider creating the subvolume for @swap.

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



More information about the foundations-bugs mailing list