Bug 1851270

Summary: /boot file system cannot be of type btrfs volume
Product: [Fedora] Fedora Reporter: Chris Murphy <bugzilla>
Component: anacondaAssignee: Neal Gompa <ngompa13>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: anaconda-maint-list, davide, ego.cordatus, jkonecny, jonathan, jwatt, kellin, michel, ngompa13, vanmeeuwen+fedora, vponcova, vslavik, wwoods
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: anaconda-33.19-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-08-22 19:51:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1851166    
Attachments:
Description Flags
anaconda fails when kickstart has `part /boot --fstype btrfs`
none
Second failure -- /boot cannot be on btrfs none

Description Chris Murphy 2020-06-26 01:25:20 UTC
https://fedoraproject.org/wiki/Changes/BtrfsByDefault

Summary of this particular option:
 - Instead of a 1G ext4 volume, create a 1-2G Btrfs volume and subvolume to mount at /boot.
 - Desired but not a requirement of the change proposal.

 - Advantages: 
   - Makes it possible to include in a btrfs-based snapshot and rollback regime along with sysroot.
   - Integrity checking
   - /boot on btrfs and btrfs subvolume/snapshot is already possible and supported by BLS and GRUB


Scope of the change: use mkfs.btrfs --mixed-bg for < 5G sized volumes like this. 

mkfs.btrfs uses separate data and metadata block groups by default; the "soft" recommendation for "mixed block groups" is 5GB volumes or smaller.

Comment 1 Michel Alexandre Salim 2020-06-30 21:28:35 UTC
Created attachment 1699388 [details]
anaconda fails when kickstart has `part /boot --fstype btrfs`

FYI I'm seeing failures when trying this in a kickstart.

First attempt:
part /boot --fstype=btrfs --size=1024

(see https://github.com/michel-slm/luks-kickstarts/blob/fa8348a19bd31bd3bbb7a36e5de4aee12b8c3bad/luks-btrfs-boot-minimal.ks)

Comment 2 Michel Alexandre Salim 2020-06-30 21:31:18 UTC
Created attachment 1699390 [details]
Second failure -- /boot cannot be on btrfs

Second attempt: separate the `/boot` creation into two separate commands

part btrfs.boot --fstype=btrfs --size=1024
btrfs /boot --label=fedora-boot btrfs.boot

It now fails with

```
/boot file system cannot be of type btrfs volume
```

full KS: https://github.com/michel-slm/luks-kickstarts/blob/2da058dc38d1000a48d26cbb4401a7b6797bcf55/luks-btrfs-boot-minimal.ks

Comment 3 Neal Gompa 2020-06-30 22:05:47 UTC
So, I see that this should be permitted in Rawhide: https://github.com/rhinstaller/anaconda/commit/72d1600a6894de1af44f6881a6ff8b6f1cc411ca


Can you try from Rawhide media?

Comment 4 Chris Murphy 2020-08-20 04:43:30 UTC
Consolidating btrfs issues for design and planning logics. The enhancement issue (use it by default, with -M option) is now found here:

#7 Use /boot on Btrfs by default 
https://pagure.io/fedora-btrfs/project/issue/7

Comment 5 Chris Murphy 2020-08-20 04:45:41 UTC
Oops. Renaming this to keep it as a proper bug report for the /boot on Btrfs problem in Custom and Advanced-Custom partitioning paths because it should work.

Comment 6 Vladimír Slávik 2020-08-21 12:08:41 UTC
Hi Neal, it seems this should be already solved (PR merged), and this just needs confirmation. You're also the community maintainer. With "Anaconda team" as assignee, it just keeps coming up in bug triage. Is it ok if I assign the bug to you?

Comment 7 Neal Gompa 2020-08-22 19:51:01 UTC
This is done, and if there are bugs, these should be handled separately and not in this one.

Comment 8 Neal Gompa 2020-08-22 19:51:08 UTC
This is done, and if there are bugs, these should be handled separately and not in this one.