Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-89471

Installation fails when preserving LVM VG

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • rhel-9.5
    • python-blivet
    • None
    • No
    • Moderate
    • rhel-storage-management
    • ssg_platform_storage
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • All
    • None

      What were you trying to do that didn't work?

      One of our customer observed that the installation fails on RHEL 9 when performing kickstart installation to preserve an PV created in the previous installation.

      For example,

      Do installation first with the layout where we create to PV as part of different VG.
      For example using the VG "cs" for OS and using VG "data" as a data partition.

      clearpart --none --initlabel
      # Disk partitioning information
      part pv.1 --fstype="lvmpv" --ondisk=vda --size=7008
      part pv.2 --fstype="lvmpv" --ondisk=vda --size=1000
      part /boot --fstype="xfs" --ondisk=vda --size=600
      volgroup cs --pesize=4096 pv.1
      volgroup data --pesize=4096 pv.2
      logvol / --fstype="xfs" --size=6000 --name=root --vgname=cs
      logvol /home --fstype="xfs" --size=1000 --name=home --vgname=cs
      logvol /data --fstype="xfs" --size=500 --name=data --vgname=data
      

      Now if we want to preserve this "/data" partition, on the next installation we have the option to use the "--noformat" option for the part "pv.2" and VG "data" so that its preserved.

      clearpart --list=vda1,vda2
      # Disk partitioning information
      part pv.1 --fstype="lvmpv" --ondisk=vda --size=7008
      part pv.2 --fstype="lvmpv" --ondisk=vda --onpart=vda3 --noformat
      part /boot --fstype="xfs" --ondisk=vda --size=600
      volgroup cs --pesize=4096 pv.1
      volgroup data --noformat
      logvol / --fstype="xfs" --size=6000 --name=root --vgname=cs
      logvol /home --fstype="xfs" --size=1000 --name=home --vgname=cs
      logvol /data --name=data --vgname=data --noformat
      

      However the OS installation fails with the error because it cannot locate "data" VG.

      DEBUG:program:Return code: 0
      DEBUG:blivet:                             LVMVolumeGroupDevice.update_sysfs_path: data ; status: False ;
      DEBUG:blivet:                 LVMLogicalVolumeDevice._setup: data-data ; orig: False ; status: False ; controllable: True ;
      INFO:program:Running [99] lvm lvchange -ay data/data --config= log {level=7 file=/tmp/lvm.log syslog=0} ...
      INFO:program:stdout[99]: 
      INFO:program:stderr[99]:   Volume group "data" not found
        Cannot process volume group data
      

      We see that the system.device file which is created by Anaconda installer does not have the data of the "/dev/vda3" because that is never added into this file since vgcreate command did not run for that VG since it was already present form previous installation.

      # LVM uses devices listed in this file.
      # Created by LVM command vgcreate pid 3561 at Wed Apr 30 08:10:45 2025
      # HASH=1123818934
      PRODUCT_UUID=5a937ddf-5c72-4657-b1cf-9ef0bc05d1e4
      VERSION=1.1.3
      IDTYPE=devname IDNAME=/dev/vda2 DEVNAME=/dev/vda2 PVID=BquelTaUax9gb7lI85jf7sIBu9RWzbre PART=2
      

      This issue is not seen with RHEL 8.10 (since it does not have /etc/lvm/devices/system.devices file)

      This issue is also not present in the recent CentOS 9 Stream ISO, even though the same /etc/lvm/devices/system.devices file does exist there during installation.

      What is the impact of this issue to you?

      Due to this, we are not able to preserve existing partition, when installing new OS on RHEL 9

      Please provide the package NVR for which the bug is seen:

      Anaconda ISO of RHEL 9.5

      How reproducible is this bug?:

      Everytime

      Steps to reproduce

      1.  
      2.  
      3.  

      Expected results

      Anaconda should be able to activate the PV and VG which are being used with "–noformat" and complete the installation 

      Actual results

      Anaconda is not able to activate PV and VG which used with "–noformat" and fail with the python exception traceback.

              vtrefny@redhat.com Vojtěch Trefný
              rhn-support-amepatil Ameya Patil
              Vojtěch Trefný Vojtěch Trefný
              Release Test Team Release Test Team
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: