#643 Test case **Testcase_partitioning_custom_btrfs_preserve_home** lacks important info
Closed: Fixed 4 years ago by kparal. Opened 4 years ago by lruzicka.

TL;DR

Either the test case needs some more specification in the Setup part (which I believe is the problem) or there is an Anaconda/Blivet bug preventing me from doing the test on certain settings. Your opinion is highly appreciated.

Current test

The test requires to do a Fedora installation with btrfs layout and preserve the home directory from this installation when attempting another installation on the same media.
The prerequisites section says:

  • Install Fedora 33 with btrfs layout
  • Create some distinct files and directories in your home directory or directly in /home

which leaves us with one of the following options:

  1. automatic partitioning
  2. manual partitioning with all the disk space used
  3. manual partitioning using only a part of the disk space

Automatic partitioning

When automatic partitioning is used to create the btrfs layout, the home directory will never be created and the layout only has /boot, /boot/efi, and /root partitions when in UEFI mode.

As a result, the test case cannot be performed with this layout.

Manual partitioning with all the disk space used.

Several strategies can happen:

  1. When we manually create the partitions and also create the home mount point, the home directory will be correctly created during the first installation. During the consecutive installation, we will be able to mount the boot partitions, as well as the /home partition using the Update Settings button as described in the test case, but we will not be able to create another root partition because of lack of space on the drive. An error will be reported.
  2. When we try to remount the original root partition, too, we will also get an error, this time that a new file system should be created on the root partition, but the Reformat option will be blanked out and no reformat is possible.
  3. When we delete the root partition using the - button, we get the same error as in strategy 1, although the overview shows that there is no current root partition.

Again, this layout does not allow to preserve the home directory while installing the system anew at the same time.

Manual setting with extra space left on the device.

This is the only option that allows to create another root partition to be used for the new installation while preserving the original home partition.

However, this will not be a standard situation with most of the current Fedora installations.

Expectations I had when reading the test case

  • Anaconda will be able to reuse the current btrfs setup even when the disk was previously used in its entirety.
  • The default btrfs layout will have /home in it.

It seems that neither has confirmed. Is it a bug?

Thoughts after the test case performed

  • The test case was not targeted on people using a btrfs layout but rather a Fedora 32 LVM ext4 or Standard partition layout using ext4 ( @sumantrom confirmed that he was able to perform the test case on such layout ) so that re-installations and changing the layout to btrfs is possible.
  • This seems plausible, because if only the /home is preserved as ext4, there are ways how to convert it to btrfs easily.

Am I right here?

Possible test errata (in case of notabug)

The Setup section of the test case needs rewriting with proper and thorough information about the prerequisites to perform the test case. It needs especially:

  • exact info on what an expected partition layout is (which partitions, which file systems)
  • how this layout should be achievied (default Fedora 32 installations, automatic partitioning, manual partitioning)

Result

In my opinion, the Setup section is confusing and needs tweaking unless the disability to reuse the current btrfs setup from a previous installation is a bug.

Please let me know what you think, @kparal, @chrismurphy , @adamwill , @others?

deleted_root.png
error1.png
noreformat.png


Metadata Update from @sumantrom:
- Issue tagged with: test days

4 years ago

Metadata Update from @sumantrom:
- Issue untagged with: test days
- Issue tagged with: test cases

4 years ago

For the record, this is the case @lruzicka is talking about:
https://fedoraproject.org/wiki/QA:Testcase_partitioning_custom_btrfs_preserve_home

When automatic partitioning is used to create the btrfs layout, the home directory will never be created

You say directory but mean the /home subvolume, right? How large is the disk drive you're testing with? (I see 30GiB in the screenshots). Is that a single drive? Was this in a VM? I'll try to replicate. I believe that would be a big issue for https://fedoraproject.org/wiki/Changes/BtrfsByDefault .

I'm still struggling with a freshly reinstalled laptop (there are so many things broken in F33, who tests that?! :smiley:), but I should be able to get to it tomorrow.

Metadata Update from @kparal:
- Custom field blocking adjusted to 628

4 years ago

https://fedoraproject.org/wiki/QA:Testcase_partitioning_custom_btrfs_preserve_home

  • Setup step 1 is:

    Install Fedora 33 with btrfs layout

The only requirement, unstated in this step, is that you create a /home mount point. For simplicity and reproducibility, I suggest that step 1 be modified to explicitly ask for Automatic partitioning.

  • Setup step 2 assumes the user has rebooted and ran gnome-initial-setup.

I think it's OK to assume it, because how else do they get to this point? But it could be stated explicitly.

  • How to test step 1

Making sensible choices is good advice, because the point is to not go off the rails. The test case can't account for every possible thing (it doesn't even bring up Advanced-Custom, there are zero guardrails there). But if it's vague, it's OK to remove it and just be explicit.

Let's just chew off that much. And see if the resulting changes fix most of the issues.

For the record, this is the case @lruzicka is talking about:
https://fedoraproject.org/wiki/QA:Testcase_partitioning_custom_btrfs_preserve_home

When automatic partitioning is used to create the btrfs layout, the home directory will never be created

You say directory but mean the /home subvolume, right?

Yes, that's correct. The subvolume term is new for me and I need to get used to it, so I chose the directory because that is how /home is mounted in the system - it looks like a directory.

How large is the disk drive you're testing with? (I see 30GiB in the screenshots). Is that a single drive?

This is a single SATA drive, but the type of drive should not be a problem here.

Was this in a VM?

Yes, a virtual machine.

I installed Fedora-Workstation-Live-x86_64-33-20200909.n.0.iso on a empty newly-created 15GB disk drive (in libvirt) using automatic partitioning and /root and /home subvolumes are present as expected:

$ findmnt /
TARGET SOURCE           FSTYPE OPTIONS
/      /dev/vda2[/root] btrfs  rw,relatime,seclabel,space_cache,subvolid=258,subvol=/root
$ findmnt /home
TARGET SOURCE           FSTYPE OPTIONS
/home  /dev/vda2[/home] btrfs  rw,relatime,seclabel,space_cache,subvolid=256,subvol=/home

@lruzicka Can you please verify whether you haven't done some mistake during your initial testing? And if you can reproduce an automatic partitioning installation which doesn't create a separate /home subvolume, can you try to figure out in which exact cases this happens?

The only requirement, unstated in this step, is that you create a /home mount point. For simplicity and reproducibility, I suggest that step 1 be modified to explicitly ask for Automatic partitioning.

Done:
https://fedoraproject.org/w/index.php?title=QA%3ATestcase_partitioning_custom_btrfs_preserve_home&type=revision&diff=587662&oldid=586957

I can confirm that when I follow the following workflow, the stuff works as expected:

  • installed system is Fedora Workstation 33
  • the g-i-s is run and a user account is created
  • some files and directories are created in the /home directory
  • the system is reinstalled and new installation created

My experience was based on using the Fedora Server DVD image. The test case only says Install Fedora 33 and does not limit it to the Workstation image.

I am now trying different combinations with netinst and server to see if this could be exactly specified.

Only desktop editions use btrfs by default, at the moment. With Server DVD and automatic partitioning, you should end up with LVM+XFS layout. I made this a bit more clear in the test case in the diff I posted above, but I wasn't specific, because the default layout will change in time and the testcase would be often outdated.

(Which means, Server DVD is not applicable for this test case. The requirement is to have a btrfs layout created).

Only desktop editions use btrfs by default, at the moment. With Server DVD and automatic partitioning, you should end up with LVM+XFS layout. I made this a bit more clear in the test case in the diff I posted above, but I wasn't specific, because the default layout will change in time and the testcase would be often outdated.

But you could specify the layout and change it to make it a btrfs layout.
The reason I created this ticket was to discuss how the test case should be written so that the feature can be tested without confusion, i.e. the issue is here to enhance the test case.

Metadata Update from @lruzicka:
- Issue marked as depending on: #628

4 years ago

So I have installed and rebooted the possible combinations, always used Automatic partitioning (the default) and realized the following:

  1. Fedora WS Live creates the btrfs layout and also the /home subvolume
  2. Everything-netinst always creates the btrfs layout and also the /home subvolume, no matter which installation (WS, Server, Custom, Minial) is selected.
  3. Fedora Server DVD creates the lvmxfs layout.

Also I installed Server from Server DVD and did not choose automatic partitioning. Instead I chose Custom partitioning and chose the btrfs layout which I let to be created automatically. No, /home subvolume is created, so I added that to the layout, too.
With this settings, I am not able to perform the test case, because no new root00 cannot be created.

And we are back at the original question: Is the test case workflow expected to work for Fedora Server DVD, if I manually create the btrfs layout with an extra /home subvolume, or not?

The test case itself has been already updated by @kparal , so except the above question, the issue is now resolved, I think.

Also I installed Server from Server DVD and did not choose automatic partitioning. Instead I chose Custom partitioning and chose the btrfs layout which I let to be created automatically. No, /home subvolume is created,

I can confirm this. The Create layout automatically hyperlink in Custom part using btrfs works differently on Workstation Live and on Server DVD. In the latter case, no /home subvolume is created. @chrismurphy is this expected? It smells like a bug to me.

Metadata Update from @kparal:
- Issue unmarked as depending on: #628

4 years ago

Is the test case workflow expected to work for Fedora Server DVD, if I manually create the btrfs layout with an extra /home subvolume, or not?

We'll figure out if the missing /home subvolume is a bug or not. Regardless, if you make sure it gets created and therefore the layout is exactly the same as in e.g. the Workstation default layout, the expectation is that the test case should be working for you. I limited the scope in the test case to make sure the setup phase is well specified, but it should work even in the case you mention, yes. I'm still working on trying to reproduce the "insufficient space" error you saw. I briefly saw it as well, then couldn't reproduce it. There's something fishy in there.

Ok, my reproducer is this (tested on Fedora Server DVD 20200906):

  • Hit Install Fedora 33 in grub.
  • Select language (English).
  • Confirm the pre-release warning.
  • In Anaconda, go to the Installation Destination pane.
  • Select Custom and click Done.
  • Select BTRFS layout and click on "Click here to create them automatically" -> /boot and / will be created.
  • Click on + and add the /home subvolume -> see image for the layout.
  • Click on Done and accept changes.
  • Fix the root password or/and the user creation.
  • Click Begin installation.
  • Boot into the system and create some structure in the /home directory or /home/user directory.
  • Reboot into new installation.
  • Repeat the process until the the Custom partitioning.
  • Then select the old /boot as a new mount point for /boot and hit Update Settings.
  • Repeat the same with /home.
  • Then hit + and try creating the new / this produces the not enough space error
  • Or try mounting the old / as the new / -> this produces the you need to create a new filesystem in / error, but you will not be let to do it.

Metadata Update from @lruzicka:
- Issue marked as depending on: #628

4 years ago

Metadata Update from @lruzicka:
- Custom field blocking reset (from 628)
- Issue unmarked as blocking: #628
- Issue unmarked as depending on: #628

4 years ago

I am also downloading the newest Server DVD and will try that on it, too.

I found out I can reproduce this with a Workstation Live (let's focus on simpler cases first). It all depends on the New mount points will use the following partitioning scheme value. If you choose Btrfs, you can add a new btrfs root subvolume (at least on Workstation Live). But if you choose Standard partition, it will not allow you to create a new root, because it's trying to create a standard partition and there's no space for that. The devilish part here is that:
a) the drop-down list value seems to be related to an automatic partition creation, but it is applied to manual partition creation as well
b) the drop-down list is inaccessible once you create/mount your first partition. So you can't even change it when you need it, and therefore it's very hard to figure out that this is the cause of the problem. It took me a long time and a lot of debugging to realize this.

Here's a video:
https://youtu.be/s5OKNXzwTtM

So we're back to the good old "Anaconda UI is terrible!" problem. This is all caused by a broken UI workflow.

It's possible that there's even some additional issue when running from Server DVD. But this problem above is 100% reproducible for me.

Metadata Update from @kparal:
- Custom field blocking adjusted to 628
- Issue marked as blocking: #628
- Issue marked as depending on: #628

4 years ago

Thanks, that is indeed the whole problem. So, when I follow my reproducer up to the point of trying to remount the older partitions, but I select the BTRFS layout from the drop down menu before actually remounting, I am able to proceed with the addition of the new root root00 and everything starts working magically.

I must say, that I find this totally confusing, because I would expect that Anaconda recognizes the layout from the previous installation automatically. Do you think this is a buggy behaviour? I am not sure about it -> it can also be a feature ... somehow "stupid", but still.

Metadata Update from @lruzicka:
- Issue unmarked as depending on: #628

4 years ago

New mount points will use the following partitioning scheme

There are hidden guardrails in Custom. And you only find out about them by bumping into them. The specifics of those guardrails depend on the scheme you choose at the very start. And their defaults can be modified by product.

This last point is what causes Server DVD with Btrfs scheme selected, not having /home. The default Server install lacks a separate /home by default, no matter the scheme.

Thanks for clarification, Chris. However, I believe that my #comment-677549 is such a trap for our users that it should definitely be reported as a bug against Anaconda (when creating a new mount point, you should be able to specify whether you want a standard partition or you want a new subvolume in an existing btrfs/lvm), and it should be marked as a CommonBug so that at least some people avoid this pitfall.
@lruzicka Would you have time to report this bug, please? Feel free to link to the video I created :-)

I'll make sure I add a note to the testcase, because otherwise people will burn lots of time on this again in the future.

Metadata Update from @kparal:
- Issue marked as depending on: #628

4 years ago

It's a difficult problem. Without guardrails, we get Advanced-Custom UI. And with guardrails, it takes away certain features and use cases, and gets more complicated when making various compromises and exceptions to the rules. And it often results in UI discontinuities, like this. It's both a bug and a feature.

I can report that bug, but I do not feel that @chrismurphy thinks it should be done. Shall we bring this to the test list first to get a broader discussion, @kparal ?

I understand that "it's a difficult problem", but at the same time the user experience is just broken and totally opaque. There are so many improvements just in messaging to the user that would make this situation better. I'll file it and let the developers to deal with it (or let it rot there).

Definitely file it, it's suboptimal anytime the user becomes this confused. Maybe it could be very concisely explained in a Quick Doc? Or even a sidebar/note in the current install guide to steer the user into making a scheme selection before doing anything else?

By the way, I've made changes to the install guide which is mostly Fedora 21 (not a typo) based. I updated the jargon, which has changed since then, and one or two screenshots, and separately updated for Btrfs and zram-swap by default. Those changes have been merged into the rawhide version of the install guide.

Most changes are in this section:
https://docs.fedoraproject.org/en-US/fedora/rawhide/install-guide/install/Installing_Using_Anaconda/#sect-installation-gui-storage-partitioning

The PRs are:
https://pagure.io/fedora-docs/install-guide/pull-request/55
https://pagure.io/fedora-docs/install-guide/pull-request/56

These are the most minimal changes I thought possible; of course it could use more. But anything contradictory or confusing that remains should get fixed.

Once this test case is solid, I'd like to convert it into a Quick Doc. Maybe it can be referenced from within the install guide, once the deleted BLS snippets bug is fixed.

Bug 1874724 - dual boot Fedora, 2nd installation erases 1st installation's /boot/loader/entries *conf files

Metadata Update from @kparal:
- Issue unmarked as depending on: #628

4 years ago

@lruzicka reported the bug here (thanks!):
https://bugzilla.redhat.com/show_bug.cgi?id=1878620

It's now in Anaconda developers' hands. The testcase has been adjusted to mention this, I believe this ticket can now be closed.

Metadata Update from @kparal:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

4 years ago

Log in to comment on this ticket.

Metadata
Attachments 3
Attached 4 years ago View Comment
Attached 4 years ago View Comment
Attached 4 years ago View Comment