Discussion:
Preserving @home brtfs subvolume on a fresh Fedora installation
Marco Guazzone
2021-05-23 17:25:06 UTC
Permalink
Hello,

I have just done a fresh installation of Fedora 34 on a new computer and
used the automatic disk partitioning proposed by the installer.
Now my disk has the following layout:
- /boot (ext4)
- /boot/efi (EFI system partition)
- / (btrfs), with two subvolumes: @root and @home.

In case of a new fresh installation of Fedora, I would like to preserve the
@home subvolume only and instead overwrite the rest. However, I am not sure
what I should do (note, I don't want to use dnf upgrade).

Just as an experiment, I tried to simulate a fresh (re)installation of
Fedora 34 and I selected "Custom" as the disk partitioning method. The
installer showed the above disk layout. So, my idea was to use the same
approach I used in the past (with ext4 partitions). Specifically:
* For the "/boot" and "/boot/efi" partitions, I specified "/boot" and
"/boot/efi" as mount points, respectively, and flagged the "Reformat"
checkbox.
* For the "/home" subvolume, I specified "/home" as the mount point,
without flagging the "Reformat" checkbox.
* For "/", I cannot tell the installer to reformat it. I am not sure what
to do. I would create a new btrfs filesystem with "/" as the mount point,
but I am not sure it is correct.

Do you have any suggestions?

Thank you.
Marco
Chris Murphy
2021-05-24 02:06:51 UTC
Permalink
On Sun, May 23, 2021 at 11:25 AM Marco Guazzone
Post by Marco Guazzone
Hello,
I have just done a fresh installation of Fedora 34 on a new computer and used the automatic disk partitioning proposed by the installer.
- /boot (ext4)
- /boot/efi (EFI system partition)
* For the "/boot" and "/boot/efi" partitions, I specified "/boot" and "/boot/efi" as mount points, respectively, and flagged the "Reformat" checkbox.
* For the "/home" subvolume, I specified "/home" as the mount point, without flagging the "Reformat" checkbox.
* For "/", I cannot tell the installer to reformat it. I am not sure what to do. I would create a new btrfs filesystem with "/" as the mount point, but I am not sure it is correct.
Do you have any suggestions?
There's definitely a trick. The installer normally enforces
reformatting a partition/LV for sysroot. Btrfs gets an exception by
merely enforcing creation of a new subvolume on an existing Btrfs file
system for sysroot. The way to do that is to create a new / mount
point rather than clicking on an existing one; also helpful is to not
specify a size for this mount point, just leave that 2nd field empty.

There is a test case that describes this in detail and hopefully
someone will turn it into a quickdoc. (It's on my to do list but I'm
not sure when I'm going to get around to it.
https://fedoraproject.org/wiki/QA:Testcase_partitioning_custom_btrfs_preserve_home



--
Chris Murphy
_______________________________________________
users mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to users-***@lists.fedoraproject.org
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/***@lists.fedoraproject.org
Do not reply to spam on the list, report it: https://pagure.io/f
Marco Guazzone
2021-05-24 15:18:04 UTC
Permalink
Post by Chris Murphy
On Sun, May 23, 2021 at 11:25 AM Marco Guazzone
...
Post by Chris Murphy
Post by Marco Guazzone
Do you have any suggestions?
There's definitely a trick. The installer normally enforces
reformatting a partition/LV for sysroot. Btrfs gets an exception by
merely enforcing creation of a new subvolume on an existing Btrfs file
system for sysroot. The way to do that is to create a new / mount
point rather than clicking on an existing one; also helpful is to not
specify a size for this mount point, just leave that 2nd field empty.
There is a test case that describes this in detail and hopefully
someone will turn it into a quickdoc. (It's on my to do list but I'm
not sure when I'm going to get around to it.
https://fedoraproject.org/wiki/QA:Testcase_partitioning_custom_btrfs_preserve_home
Thanks a lot, Chris!

That page is exactly what I was looking for.
I followed each step and all went OK.
In case that document is targeted also to inexperienced users, I would
suggest the following changes:
* Step 5: specify to click on "Done" after selecting "Custom"
* Step 10: specify how to remove the "root" subvolume, also mentioning what
to do when the dialog box "Are you sure you want to delete all of the data
on root?" appears.

Thank you.
Best regards,
Marco

Loading...