btrfs filesystem - swapfile created leads to error - swap disabled
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubiquity (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
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.
Status changed to 'Confirmed' because the bug affects multiple users.