Bug 1851287

Summary: RFE: create extra subvolumes by default on btrfs
Product: [Fedora] Fedora Reporter: Chris Murphy <bugzilla>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED DEFERRED QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: anaconda-maint-list, davide, jkonecny, jonathan, jwatt, kellin, vanmeeuwen+fedora, vponcova, wwoods
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-08-20 05:09:09 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    

Description Chris Murphy 2020-06-26 03:14:49 UTC
https://fedoraproject.org/wiki/Changes/BtrfsByDefault

Summary:
 - Create additional subvolumes to exclude locations from a snapshotting send and receive regime. This is an optimization.
 - Desired but not a requirement of the change proposal.

Detail:
Creating snapshots on btrfs is not recursive, the snapshot stops at nested subvolumes.

Options:
 - Create subvolumes in nested form to prevent certain locations from being snapshot
   - Dilemma: A rollback will need to move these subvolumes to a new location, because they're nested in the old/abandoned subvolume.

- Create subvolumes at the top-level to prevent certain locations from being snapshot and add them to fstab or native systemd mount.
   - Dilemma: results in 'invalid cross-device link' when reflinking; mv will fallback to an oldbig copy.

Locations:

/var/log/
/var/lib/libvirt/images/
/var/lib/containers/

Scope: 
Anaconda knows how to do this already, just change the kickstart to add additional subvolumes.


Possible additional locations as part of a larger strategy for user home snapshotting/restore and backup integration:

~/.local/share/gnome-boxes/images/
~/.cache
~/.local/share/Trash/

Comment 1 Chris Murphy 2020-08-20 05:09:09 UTC
Consolidating btrfs issues for design and planning logics. This issue is now found here:

 #8 create additional subvolumes at install time 
https://pagure.io/fedora-btrfs/project/issue/8