Hide Forgot
Description of problem: When an existing btrfs volume or subvolume is assigned a mountpoint via kickstart the specified mountpoint is disregarded -- the filesystem is not mountpoint during installation, nor is there an entry for it in /etc/fstab. Version-Release number of selected component (if applicable): anaconda-19.31.22-1.el7 How reproducible: Always Steps to Reproduce: 1. create some btrfs vols/subvols 2. specify that they be mounted without reformatting via ks.cfg 3. observe results Actual results: mountpoints are not assigned Expected results: mountpoints assigned as per ks.cfg Additional info: Fedora bug 892747 -- patch exists already but has not been reviewed or pushed.
I have tried to verify this bug with following setup: system with two hard disks: vda: /boot (xfs), / (xfs), swap vdb: /home (btrfs) I've reinstalled this system manually recreating all partitions except /home which reused. The installation went without problems. After that I tried to use generated kickstart from /root/anacond-ks.cfg to reinstall the system once again but anaconda fails before starting GUI with: "The following problem occurred on line 33 of the kickstart file: btrfs subvol requires specification of parent volume" So i have tried to modify the line to include parent volume: btrfs /home --noformat --useexisting --subvol --name=home rhel This time the GUI started properly but with "No disks selected" in Installation Destination with following error: The following problem occurred on line 32 of the kickstart file: Specified nonexistent BTRFS volume in btrfs command
Created attachment 865486 [details] generated kickstart used for installation
See https://fedoraproject.org/wiki/Anaconda/Kickstart#btrfs if you haven't already. You cannot use btrfs as an fstype in kickstart. You have to define a volume and, optionally, some subvolumes. You will need to identify your existing btrfs volume using label or UUID. I'm not sure if setting it back to ON_QA is correct, but I believe the failure was in the test procedure.
I was not successful to write kickstart which would reuse btrfs partition myself so I tried to use the one generated by anaconda itself and that kickstart also failed to reuse btrfs. Could you please provide kickstart you used to produce this bug?
This sets up the btrfs layout in a first installation: # Partition clearing information clearpart --all --initlabel --drives=sda # Disk partitioning information part swap --fstype="swap" --ondisk=sda --size=2048 part /boot --fstype="xfs" --ondisk=sda --size=500 part btrfs.12 --fstype="btrfs" --ondisk=sda --size=4096 --grow btrfs none --label=rhel --data=single btrfs.12 btrfs /home --subvol --name=home btrfs / --subvol --name=root This will perform a second installation which will set a mountpoint for the preexisting home subvolume from the previous (above) installation: cleapart --type=none part swap --fstype="swap" --onpart=sda2 part /boot --fstype="xfs" --onpart=sda1 btrfs /home --subvol --name=home --useexisting --noformat LABEL=rhel btrfs / --subvol --name=newroot LABEL=rhel
I have followed your suggestions but any of them does not work. Suggestion for installation failed with bug 1072060. But this can be fixed with adding label "rhel" of btrfs volume at the end of last two lines. The suggestion for second installation fails with anaconda reporting an error "Unable to allocate requested partition scheme".
Since you did not include the logs I can only guess what went wrong. Try this: First install: # Partition clearing information clearpart --all --initlabel --drives=sda # Disk partitioning information part swap --fstype="swap" --ondisk=sda --size=2048 --label=swap part /boot --fstype="xfs" --ondisk=sda --size=500 --label=boot part btrfs.12 --fstype="btrfs" --ondisk=sda --size=4096 --grow btrfs none --label=rhel --data=single btrfs.12 btrfs /home --subvol --name=home rhel btrfs / --subvol --name=root rhel Second install: cleapart --type=none part swap --fstype="swap" --onpart=LABEL=swap part /boot --fstype="xfs" --onpart=LABEL=boot btrfs /home --subvol --name=home --useexisting --noformat LABEL=rhel btrfs / --subvol --name=newroot LABEL=rhel If this does not work, please attach anaconda.log and storage.log.
With these everything went fine.
This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request.