Mailinglist Archive: opensuse-features (39 mails)

< Previous Next >
[openFATE 318392] Install into btrfs subvolume
Feature changed by: Thorsten Kukuk (kukuk)
Feature #318392, revision 6
Title: Install into btrfs subvolume

Requested by: Thorsten Kukuk (kukuk)
Partner organization: openSUSE.org

Description:
If you do a rollback of SLE12 the very first time, the original root
volume is no longer reacheable and will never be automatically removed,
means we have a disk space leak here.
The reason is, that the original installation is not a
subvolume/snapshot and thus will not show up in /.snapshots.
If we install on btrfs, and snapshots/rollback is enabled, we should
instead install into a subvolume /.snapshots/1/snapshot and make that
the new root.
+ If btrfs is the root filesystem and "Enable snapshots" is selected in
+ the proposal, we should do the following:
+ * Inclulde snapper in inst-sys (import when needed, remove after it is
+ used)
+ * right after libstorage has created the root filesystem:
+ * snapper must be called to create the config
+ * snapper has to create a first read-write snapshot
+ * snapper has to set that snapshot as new default root subvolume
+ * The subvolumes have to be created in the initial root filesystem,
+ else we cannot delete the initial snapshot later. See bnc#910602,
+ comment 8.
+ * The subvolumes have to be mounted in the first read-write snapshot
+ * YaST has to install into this first read-write snapshot (/.
+ snapshots/1/snapshot), not into "/"


Business case (Partner benefit):
openSUSE.org: Fix a very huge disk space leak problem.

Discussion:
#1: Thorsten Kukuk (kukuk) (2015-01-23 14:58:31)
Arvin, I think you can describe better, how the initial instannation
into a subvolume has to look like, that we see it later in /.snapshots/
?

#2: Arvin Schnell (aschnell) (2015-01-26 18:13:31) (reply to #1)
I would implement this as follows:
Required steps during installation:
* right after libstorage has created the root filesystem, snapper must
be called to create the config, a first read-write snapshot and set the
default subvolume
* the root filesystem must be mounted to use the new default subvolume
* snapper must not be called again later by YaST
Problems:
* libstorage does not know whether snapshots/rollback are enabled, new
API required
* snapper does not have the required command, needs implementation
* snapper does not work with a chrooted target, needs implementation
* snapper is needed in the instsys (not even all requirements are
there)
The problems make it difficult to do a proof-of-concept test.
Further question:
* Should there only be the option "rollback on / off?" or should it
also be possible to configure snapper without rollbacks (that is
installing into subvolume)?
* There is no easy way for the user to enable rollbacks later on. Is
that OK?


#3: Lukas Ocilka (locilka) (2015-01-27 11:00:14) (reply to #2)
To solve the "not in inst-sys" problem vs RAM used by inst-sys, I
suggest using `extend` to import snapper and libs into the inst-sys
ONLY when btrfs (and snapshots + rollback) are requested and remove it
after it's used. We do the very same while checking for user/root
password.




--
openSUSE Feature:
https://features.opensuse.org/318392

< Previous Next >
List Navigation
This Thread
  • No further messages
References