btrfs root / swapfile issues

Bug #1750657 reported by Michael Hudson-Doyle
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
curtin
Confirmed
Medium
Unassigned
subiquity
Fix Released
High
Unassigned

Bug Description

From a testing report:

- I first went with the default partitioning and a btrfs root volume. On boot, I see warnings about swap:
Feb 20 02:11:41 localhost.localdomain kernel: swapon: swapfile has holes
...
Feb 20 02:11:59 djavm swapon[394]: swapon: /swap.img: swapon failed: Invalid argument

Curtin probably shouldn't create swapfiles on btrfs /, and probably subiquity shouldn't let you install with btrfs / unless you have a swap partition, or a least not without a "are you sure?" option

summary: - installing with btrfs / fails when creating swapfile
+ btrfs root / swapfile issues
Revision history for this message
Ryan Harper (raharper) wrote :

https://btrfs.wiki.kernel.org/index.php/FAQ#Does_btrfs_support_swap_files.3F

Yeah, so that's a no-no. I think curtin can reject, and subiquity shouldn't allow the config.

Changed in curtin:
importance: Undecided → Medium
status: New → Confirmed
Changed in subiquity:
status: New → Triaged
importance: Undecided → High
tags: added: id-5a9fa534c1bfb6845a68093e
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

I created https://github.com/CanonicalLtd/subiquity/pull/295 for the simplest possible fix. Too simple? Opinions welcome.

Changed in subiquity:
status: Triaged → In Progress
Changed in subiquity:
status: In Progress → Fix Released
Revision history for this message
Ebbex (eb4x) wrote :

This is not just affecting btrfs, I'm using XFS and my files have holes too. And according to the swapon man page, ext4 could have the same issue.

I've found the commit that is a step in the right direction;

https://github.com/CanonicalLtd/curtin/commit/a909966f9c235282267024e86adf404dab83ccfe

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.