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

uuids of swapped thin pool meta volumes are no longer changing

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • rhel-9.4
    • None
    • rhel-sst-logical-storage
    • ssg_filesystems_storage_and_HA
    • 2
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • x86_64
    • None

      With the uuids staying the same, that implies that the meta volumes aren't actually properly being swapped.
      
      
      # RHEL 9.3 
      kernel-5.14.0-362.8.1.el9_3    BUILT: Tue Oct  3 02:39:10 PM CEST 2023
      lvm2-2.03.21-3.el9    BUILT: Thu Jul 13 08:50:26 PM CEST 2023
      lvm2-libs-2.03.21-3.el9    BUILT: Thu Jul 13 08:50:26 PM CEST 2023
       
       
      SCENARIO - [swap_inactive_thin_pool_meta_device_w_new_vol]
      Swap _tmeta device with newly created volume while pool is inactive
      Making pool volume
      lvcreate --yes  --thinpool POOL -L 1G  --zero n --poolmetadatasize 4M snapper_thinp
       
      Sanity checking pool device (POOL) metadata
      lvcreate --yes  -L 4M -n meta_swap.716 snapper_thinp
      lvconvert --yes --thinpool snapper_thinp/POOL --poolmetadata snapper_thinp/meta_swap.716
      thin_check /dev/mapper/snapper_thinp-meta_swap.716
      Checking thin metadata
      device details tree
      mapping tree
      data space map
      metadata space map
      lvconvert --yes --thinpool snapper_thinp/POOL --poolmetadata snapper_thinp/meta_swap.716
      lvremove -f snapper_thinp/meta_swap.716
       
      Making origin volume
      lvcreate --yes  --virtualsize 1G -T snapper_thinp/POOL -n origin
        WARNING: Sum of all thin volume sizes (6.00 GiB) exceeds the size of thin pool snapper_thinp/POOL (1.00 GiB).
      Making snapshot of origin volume
      lvcreate --yes  -k n -s /dev/snapper_thinp/origin -n snap
      Create new device to swap in as the new _tmeta device
      lvcreate --yes  -n newtmeta -L 8M snapper_thinp
        WARNING: Sum of all thin volume sizes (7.00 GiB) exceeds the size of thin pools (1.00 GiB).
       
      Dumping current pool (POOL) metadata to /tmp/snapper_thinp_dump.2697.748670
      lvchange -an --yes --select 'lv_name=POOL || pool_lv=POOL'
      lvcreate --yes  -L 4M -n meta_swap.822 snapper_thinp
        WARNING: Sum of all thin volume sizes (7.00 GiB) exceeds the size of thin pools (1.00 GiB).
      lvconvert --yes --thinpool snapper_thinp/POOL --poolmetadata snapper_thinp/meta_swap.822lvchange -ay snapper_thinp/meta_swap.822
      'thin_dump /dev/mapper/snapper_thinp-meta_swap.822 > /tmp/snapper_thinp_dump.2697.748670'
      lvchange -an snapper_thinp/meta_swap.822
      lvconvert --yes --thinpool snapper_thinp/POOL --poolmetadata snapper_thinp/meta_swap.822
      lvremove snapper_thinp/meta_swap.822
      lvchange -ay --yes --select 'lv_name=POOL || pool_lv=POOL'
       
      Current tmeta device uuid: Wf68rR-Umyh-TlHH-r0PJ-flMQ-ETVq-6yUnbf
      Restoring valid mda to new device
      thin_restore -i /tmp/snapper_thinp_dump.2697.748670 -o /dev/snapper_thinp/newtmeta
      thin_check /dev/snapper_thinp/newtmeta
      Checking thin metadata
      device details tree
      mapping tree
      data space map
      metadata space map
      Corrupting pool meta device (/dev/mapper/snapper_thinp-POOL_tmeta) with zeros
      dd if=/dev/zero of=/dev/mapper/snapper_thinp-POOL_tmeta bs=1M count=4
      4+0 records in
      4+0 records out
      4194304 bytes (4.2 MB, 4.0 MiB) copied, 0.00432214 s, 970 MB/s
      Swap in new _tmeta device
      lvconvert --yes --poolmetadata snapper_thinp/newtmeta --thinpool snapper_thinp/POOL
       
      PASS : before: Wf68rR-Umyh-TlHH-r0PJ-flMQ-ETVq-6yUnbf, after: QEKNXj-02LM-nhnT-nn40-X9uE-t9MX-UT4OGo
      New swapped tmeta device uuid: QEKNXj-02LM-nhnT-nn40-X9uE-t9MX-UT4OGo
       
      Sanity checking pool device (POOL) metadata
      lvcreate --yes  -L 4M -n meta_swap.913 snapper_thinp
        WARNING: Sum of all thin volume sizes (7.00 GiB) exceeds the size of thin pools (1.00 GiB).
      lvconvert --yes --thinpool snapper_thinp/POOL --poolmetadata snapper_thinp/meta_swap.913
      thin_check /dev/mapper/snapper_thinp-meta_swap.913
      Checking thin metadata
      device details tree
      mapping tree
      data space map
      metadata space map
      lvconvert --yes --thinpool snapper_thinp/POOL --poolmetadata snapper_thinp/meta_swap.913
      lvremove -f snapper_thinp/meta_swap.913
       
      lvremove -f snapper_thinp/newtmeta
      Removing snap volume snapper_thinp/snap
      lvremove -f /dev/snapper_thinp/snap
      Removing thin origin and other virtual thin volumes
      Removing pool snapper_thinp/POOL
      
      
      
      # RHEL 9.4 
      kernel-5.14.0-362.8.1.el9_3    BUILT: Tue Oct  3 02:39:10 PM CEST 2023
      lvm2-2.03.23-1.el9    BUILT: Tue Nov 28 02:15:42 PM CET 2023
      lvm2-libs-2.03.23-1.el9    BUILT: Tue Nov 28 02:15:42 PM CET 2023
       
       
      SCENARIO - [swap_inactive_thin_pool_meta_device_w_new_vol]
      Swap _tmeta device with newly created volume while pool is inactive
      Making pool volume
      lvcreate --yes  --thinpool POOL -L 1G --profile thin-performance --zero n --poolmetadatasize 4M snapper_thinp
       
      Sanity checking pool device (POOL) metadata
      lvcreate --yes  -L 4M -n meta_swap.589 snapper_thinp
      lvconvert --yes --thinpool snapper_thinp/POOL --poolmetadata snapper_thinp/meta_swap.589
      thin_check /dev/mapper/snapper_thinp-meta_swap.589
      Checking thin metadata
      device details tree
      mapping tree
      data space map
      metadata space map
      lvconvert --yes --thinpool snapper_thinp/POOL --poolmetadata snapper_thinp/meta_swap.589
      lvremove -f snapper_thinp/meta_swap.589
       
      Making origin volume
      lvcreate --yes  --virtualsize 1G -T snapper_thinp/POOL -n origin
      Making snapshot of origin volume
      lvcreate --yes  -k n -s /dev/snapper_thinp/origin -n snap
      Create new device to swap in as the new _tmeta device
      lvcreate --yes  -n newtmeta -L 8M snapper_thinp
       
      Dumping current pool (POOL) metadata to /tmp/snapper_thinp_dump.3899.743450
      lvchange -an --yes --select 'lv_name=POOL || pool_lv=POOL'
      lvcreate --yes  -L 4M -n meta_swap.825 snapper_thinp
      lvconvert --yes --thinpool snapper_thinp/POOL --poolmetadata snapper_thinp/meta_swap.825lvchange -ay snapper_thinp/meta_swap.825
      'thin_dump /dev/mapper/snapper_thinp-meta_swap.825 > /tmp/snapper_thinp_dump.3899.743450'
      lvchange -an snapper_thinp/meta_swap.825
      lvconvert --yes --thinpool snapper_thinp/POOL --poolmetadata snapper_thinp/meta_swap.825
      lvremove snapper_thinp/meta_swap.825
      lvchange -ay --yes --select 'lv_name=POOL || pool_lv=POOL'
       
      Current tmeta device uuid: Tg9bFb-zrTQ-iukU-vgpA-CZsx-W2hn-63nGoE
      Restoring valid mda to new device
      thin_restore -i /tmp/snapper_thinp_dump.3899.743450 -o /dev/snapper_thinp/newtmeta
      thin_check /dev/snapper_thinp/newtmeta
      Checking thin metadata
      device details tree
      mapping tree
      data space map
      metadata space map
      Corrupting pool meta device (/dev/mapper/snapper_thinp-POOL_tmeta) with zeros
      dd if=/dev/zero of=/dev/mapper/snapper_thinp-POOL_tmeta bs=1M count=4
      4+0 records in
      4+0 records out
      4194304 bytes (4.2 MB, 4.0 MiB) copied, 0.00278693 s, 1.5 GB/s
      Swap in new _tmeta device
      lvconvert --yes --poolmetadata snapper_thinp/newtmeta --thinpool snapper_thinp/POOL
      New swapped tmeta device uuid: Tg9bFb-zrTQ-iukU-vgpA-CZsx-W2hn-63nGoE
       
      FAIL: tmeta was not properly swapped
      before: Tg9bFb-zrTQ-iukU-vgpA-CZsx-W2hn-63nGoE, after: Tg9bFb-zrTQ-iukU-vgpA-CZsx-W2hn-63nGoE
      
      

              zkabelac@redhat.com Zdenek Kabelac
              cmarthal@redhat.com Corey Marthaler
              lvm-team lvm-team
              Cluster QE Cluster QE
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated: