Bug 18460 - Allow installation on a btrfs subvolume
Summary: Allow installation on a btrfs subvolume
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: Installer (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal enhancement
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
: 31832 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-05-15 13:27 CEST by Alejandro Vargas
Modified: 2023-04-22 21:06 CEST (History)
6 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments

Description Alejandro Vargas 2016-05-15 13:27:57 CEST
One of the more usefull features of the btrfs are the subvolume snapshots. If you use a subvolume instead of the main filesystem, you can create snapshots and revert changes whenever you want.

Suse and Ubuntu can install the system on a subvolume maned "@" and mount this as root. If you want to make changes without risk, you can rename @ as simething else and  create a new @. Then you can switch between them and hace a backup of the system.
Barry Jackson 2016-05-15 18:43:14 CEST

CC: (none) => zen25000

Ulrich Beckmann 2016-05-16 18:22:21 CEST

CC: (none) => bequimao.de

Comment 1 Ulrich Beckmann 2016-05-16 18:28:07 CEST
Did you define the intented subvolume as default subvolume? What is the error message? I did not test it so far. I am waiting for another batch of isos.

Greetings
Ulrich Beckmann
Comment 2 Marja Van Waes 2016-05-19 09:55:20 CEST
Shouldn't this already be possible, as long as you don't put /boot on a subvolume?

CC: (none) => marja11, thierry.vignaud, tmb

Comment 3 Ulrich Beckmann 2016-05-24 10:16:50 CEST
Hi Marja,

It should be possible to prepare a partition with predefined subvolumes. But you can neither mount these subvolumes to the correct mountpoints during or before installation, nor they would be added to /etc/fstab.

One subvolume "@" is already an improvement, as you never can delete the root subvolume (subvolid = 5), when the default subvolume passes to another snapshot. OpenSUSE's set of subvolumes however is far more detailed. I had converted an installation of Mageia Cauldron to such a set of subvolumes. 

Greetings,
Ulrich
Thierry Vignaud 2016-06-23 08:02:58 CEST

Blocks: (none) => 416

Comment 4 Ulrich Beckmann 2016-06-23 12:00:32 CEST
I tested an installation into a btrfs partition with predefined default subvolume @@@ with Mageia-6-sta1-LiveDVD-PLASMA5-x86_64-DVD.iso of Jun 19.
You'll have to select "Use existing partitions" and unmark formatting. It works even with an btrfs raid configuration. 

It failed when installing the bootloader. But I still have to verify, if it depends on the configuration, and then file another bug.

Best regards,
Ulrich
Comment 5 Ulrich Beckmann 2016-06-23 13:42:10 CEST
Testcase to Comment #4 (ext4, not btrfs)
https://bugs.mageia.org/show_bug.cgi?id=18774

Ulrich Beckmann
Comment 6 Ulrich Beckmann 2016-06-23 17:54:19 CEST
I repeated the test with the classical iso
UUID="2016-06-20-21-52-36-00" LABEL="Mageia-6-sta1-x86_64" TYPE="iso9660" PTUUID="7c894d90" PTTYPE="dos" PARTUUID="7c894d90-01"

After unchecking "Format" I saw a rapid message "Formatting ... But obviously it did not format anything. The prepared btrfs partition remained intact, and I got a sucessful installation including grub2-bootloader (UEFI).

So it is possible to install Mageia 6 to btrfs with predifined subvolumes.
--------------------------------------------------------------------------
[root@localhost ~]# btrfs filesystem  show /dev/sda12
Label: 'Mageia-Test'  uuid: 191c07a2-4099-4276-9fdf-dc6454db70f0
        Total devices 2 FS bytes used 3.82GiB
        devid    1 size 11.72GiB used 3.02GiB path /dev/sda12
        devid    2 size 11.72GiB used 3.00GiB path /dev/sda14

[root@localhost ~]# mount /dev/sda12 /mnt
[root@localhost ~]#
[root@localhost ~]# btrfs subvolume list /mnt
ID 257 gen 10139 top level 5 path @@@
ID 259 gen 10105 top level 257 path var/lib/machines
[root@localhost ~]#
[root@localhost ~]# btrfs subvolume get-default /mnt
ID 257 gen 10139 top level 5 path @@@
----------------------------------------------------------------------------

Best regards,
Ulrich
Comment 7 Ulrich Beckmann 2016-07-09 09:58:58 CEST
Dependency to https://bugs.mageia.org/show_bug.cgi?id=18460 removed.

Blocks: 416 => (none)

Samuel Verschelde 2016-09-09 08:59:41 CEST

Assignee: bugsquad => mageiatools

Comment 8 sturmvogel 2023-04-22 20:58:34 CEST
*** Bug 31832 has been marked as a duplicate of this bug. ***

CC: (none) => 79625490833

Comment 9 Nikolay Sabelnikov 2023-04-22 21:06:06 CEST
the error has been around for many years, but it has not been fixed yet.

Note You need to log in before you can comment on or make changes to this bug.