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

[RHEL10] LVM VG size blivet doesn't use the real size of the PV format

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

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • rhel-10.1
    • rhel-10.0
    • python-blivet
    • python-blivet-3.10.0-18.el10
    • No
    • Moderate
    • rhel-storage-management
    • ssg_platform_storage
    • 7
    • 10
    • 3
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None

      When calculating VG size and free space in the VG, blivet doesn't check the size of the LVM PV format, but assumes it has the same size as the underlying device. This leads to wrong assumption about VG size and free space when the PV format is smaller than the device when for example the underlying block device was resized.

      Example of wrong values for a 5 GiB VG:

      # vgs test
        VG   #PV #LV #SN Attr   VSize  VFree 
        test   1   0   0 wz--n- <5.00g <5.00g
      

      blivet values:

      In [1]: import blivet; b=blivet.Blivet(); b.reset()
      In [2]: test = b.devicetree.get_device_by_name("test")
      In [3]: test.size
      Out[3]: Size (9.99609375 GiB)
      In [4]: test.free_space
      Out[4]: Size (9.99609375 GiB)
      

      See also this upstream issue: https://github.com/storaged-project/blivet/issues/1320

              vtrefny@redhat.com Vojtěch Trefný
              vtrefny@redhat.com Vojtěch Trefný
              Vojtěch Trefný Vojtěch Trefný
              Release Test Team Release Test Team
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: