Bug 1212929 - Subvolume layout should not depend on whether snapshots are enabled during installation
Summary: Subvolume layout should not depend on whether snapshots are enabled during in...
Status: CONFIRMED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: YaST2 (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Enhancement (vote)
Target Milestone: ---
Assignee: YaST Team
QA Contact: Jiri Srain
URL: https://trello.com/c/xbLBKfN1
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-03 06:06 UTC by Andrei Borzenkov
Modified: 2023-07-04 17:16 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.