Bug 1212929

Summary: Subvolume layout should not depend on whether snapshots are enabled during installation
Product: [openSUSE] openSUSE Tumbleweed Reporter: Andrei Borzenkov <arvidjaar>
Component: YaST2Assignee: YaST Team <yast-internal>
Status: CONFIRMED --- QA Contact: Jiri Srain <jsrain>
Severity: Enhancement    
Priority: P5 - None CC: ancor, aschnell
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
URL: https://trello.com/c/xbLBKfN1
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Andrei Borzenkov 2023-07-03 06:06:35 UTC
Currently if snapshots were disabled during installation, installer puts root on /@ subvolume. Users can enable snapshots later and it will appear to work as usual until user attempts rollback. At which point content of /@ subvolume becomes completely hidden, it is not visible in snapper output and for a user it looks like mysteriously lost space.

Because /@ subvolume contains all other system subvolumes it is also impossible to simply delete it, user must mount and manually clean it up which is rather error prone. The latest user experience on this:

https://forums.opensuse.org/t/one-small-snapshot-takes-a-lot-of-disk-space-in-btrfs/167359

I do not see any reason for this artificial difference in subvolume layouts. There is absolutely no harm in having root always on /.snapshot/1/subvolume after installation. This will provide consistent layout and make it easy to enable snapshots later. It will also simplify installer :)

Ideally, installer should also create snapper metadata for the initial snapshot unconditionally (but may be this is better done by snapper when snapshots are enabled).
Comment 1 Stefan Hundhammer 2023-07-03 08:13:50 UTC
Arvin, IIRC this toplevel '@' subvolume was introduced years ago (around 2016?). I know there was an explicit feature request by the product manager for it. Do you recall the background and reasons?

What would be the implications if we changed this to what Andrei suggests?
Comment 2 Arvin Schnell 2023-07-03 09:33:09 UTC
AFAIU the suggestion is not to remove to @ subvolume but to install into
@/.snapshot/1/subvolume (the @ is missing in comment #0). That sound like a
good idea.