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

cache reduce can lead to problems with pool reactivation

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • rhel-9.5
    • None
    • No
    • None
    • rhel-sst-logical-storage
    • ssg_filesystems_storage_and_HA
    • 3
    • False
    • Hide

      None

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

      First off, when was cache/writecache reduction enabled? I don't believe QE was informed of this feature being enabled. The last I remember was RHEL7 bug 1399292 to ensure that is stayed disabled until further notice. It appears this has been enabled but not tested for all of RHEL9.

      ## RHEL 9.5
       
      kernel-5.14.0-496.el9    BUILT: Mon Aug 12 11:29:40 PM CEST 2024
      lvm2-2.03.24-2.el9    BUILT: Wed Aug  7 09:41:45 PM CEST 2024
      lvm2-libs-2.03.24-2.el9    BUILT: Wed Aug  7 09:41:45 PM CEST 2024
       
       
      [root@virt-009 ~]# lvcreate --yes --activate y -L 4G -n cache_6_7010 cache_6_701 /dev/sde2
        Logical volume "cache_6_7010" created.
      [root@virt-009 ~]# lvcreate --yes --activate y -L 1G -n cache_6_7010_fast cache_6_701 /dev/sde1
        Logical volume "cache_6_7010_fast" created.
      [root@virt-009 ~]# lvcreate --yes --activate y -L 8M -n cache_6_7010_fast_meta cache_6_701 /dev/sde1
        Logical volume "cache_6_7010_fast_meta" created.
      [root@virt-009 ~]# lvconvert --type cache-pool --poolmetadata cache_6_701/cache_6_7010_fast_meta cache_6_701/cache_6_7010_fast --yes
        WARNING: Converting cache_6_701/cache_6_7010_fast and cache_6_701/cache_6_7010_fast_meta to cache pool's data and metadata volumes with metadata wiping.
        THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
        Converted cache_6_701/cache_6_7010_fast and cache_6_701/cache_6_7010_fast_meta to cache pool.
      [root@virt-009 ~]# lvconvert --type cache --cachepool cache_6_701/cache_6_7010_fast cache_6_701/cache_6_7010 --yes
        Logical volume cache_6_701/cache_6_7010 is now cached.
       
      [root@virt-009 ~]# lvs
        LV           VG            Attr       LSize  Pool                      Origin               Data%  Meta%  Move Log Cpy%Sync Convert
        cache_6_7010 cache_6_701   Cwi-a-C---  4.00g [cache_6_7010_fast_cpool] [cache_6_7010_corig] 0.09   2.15            0.00            
       
      [root@virt-009 ~]# lvreduce -f -l 162 /dev/cache_6_701/cache_6_7010
        No file system found on /dev/cache_6_701/cache_6_7010.
        Size of logical volume cache_6_701/cache_6_7010_corig changed from 4.00 GiB (1024 extents) to 648.00 MiB (162 extents).
        Logical volume cache_6_701/cache_6_7010 successfully resized.
       
      [root@virt-009 ~]# lvextend -l 486 /dev/cache_6_701/cache_6_7010
        Size of logical volume cache_6_701/cache_6_7010_corig changed from 648.00 MiB (162 extents) to <1.90 GiB (486 extents).
        Logical volume cache_6_701/cache_6_7010 successfully resized.
       
      [root@virt-009 ~]# lvchange -an /dev/cache_6_701/cache_6_7010
        WARNING: Integrity check of metadata for pool cache_6_701/cache_6_7010_fast_cpool failed.
      [root@virt-009 ~]# echo $?
      0
       
      [root@virt-009 ~]# lvchange -ay /dev/cache_6_701/cache_6_7010
        Check of pool cache_6_701/cache_6_7010_fast_cpool failed (status:64). Manual repair required!
      [root@virt-009 ~]# echo $?
      5
       
      [root@virt-009 ~]# lvs -a -o +devices,segtype
        LV                              VG            Attr       LSize  Pool                      Origin               Data%  Meta%  Move Log Cpy%Sync Convert Devices                          Type      
        cache_6_7010                    cache_6_701   Cwi---C--- <1.90g [cache_6_7010_fast_cpool] [cache_6_7010_corig]                                         cache_6_7010_corig(0)            cache     
        [cache_6_7010_corig]            cache_6_701   owi---C--- <1.90g                                                                                        /dev/sde2(0)                     linear    
        [cache_6_7010_fast_cpool]       cache_6_701   Cwi---C---  1.00g                                                                                        cache_6_7010_fast_cpool_cdata(0) cache-pool
        [cache_6_7010_fast_cpool_cdata] cache_6_701   Cwi-------  1.00g                                                                                        /dev/sde1(0)                     linear    
        [cache_6_7010_fast_cpool_cmeta] cache_6_701   ewi-------  8.00m                                                                                        /dev/sde1(256)                   linear    
        [lvol0_pmspare]                 cache_6_701   ewi-------  8.00m                                                                                        /dev/sde3(0)                     linear    
       
       
       
       
       
       
       
      ## RHEL 9.3
       
      kernel-5.14.0-362.24.1.el9_3    BUILT: Thu Feb 15 12:57:51 PM CET 2024
      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
       
       
      [root@virt-482 ~]# lvcreate --yes --activate y -L 4G -n cache_6_7010 cache_6_701 /dev/sda
        Logical volume "cache_6_7010" created.
      [root@virt-482 ~]# lvcreate --yes --activate y -L 1G -n cache_6_7010_fast cache_6_701 /dev/sdb
        Logical volume "cache_6_7010_fast" created.
      [root@virt-482 ~]# lvcreate --yes --activate y -L 8M -n cache_6_7010_fast_meta cache_6_701 /dev/sdb
        Logical volume "cache_6_7010_fast_meta" created.
      [root@virt-482 ~]# lvconvert --type cache-pool --poolmetadata cache_6_701/cache_6_7010_fast_meta cache_6_701/cache_6_7010_fast --yes
        WARNING: Converting cache_6_701/cache_6_7010_fast and cache_6_701/cache_6_7010_fast_meta to cache pool's data and metadata volumes with metadata wiping.
        THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
        Converted cache_6_701/cache_6_7010_fast and cache_6_701/cache_6_7010_fast_meta to cache pool.
      [root@virt-482 ~]# lvconvert --type cache --cachepool cache_6_701/cache_6_7010_fast cache_6_701/cache_6_7010 --yes
        Logical volume cache_6_701/cache_6_7010 is now cached.
      [root@virt-482 ~]# lvs
        LV           VG            Attr       LSize  Pool                      Origin               Data%  Meta%  Move Log Cpy%Sync Convert
        cache_6_7010 cache_6_701   Cwi-a-C---  4.00g [cache_6_7010_fast_cpool] [cache_6_7010_corig] 0.09   2.15            0.00            
        root         rhel_virt-482 -wi-ao---- <8.00g                                                                                       
        swap         rhel_virt-482 -wi-ao----  1.00g                                                                                       
      [root@virt-482 ~]# lvreduce -f -l 162 /dev/cache_6_701/cache_6_7010
        No file system found on /dev/cache_6_701/cache_6_7010.
        Size of logical volume cache_6_701/cache_6_7010_corig changed from 4.00 GiB (1024 extents) to 648.00 MiB (162 extents).
        Logical volume cache_6_701/cache_6_7010 successfully resized.
      [root@virt-482 ~]# lvextend -l 486 /dev/cache_6_701/cache_6_7010        
        Size of logical volume cache_6_701/cache_6_7010_corig changed from 648.00 MiB (162 extents) to <1.90 GiB (486 extents).
        Logical volume cache_6_701/cache_6_7010 successfully resized.
      [root@virt-482 ~]# lvchange -an /dev/cache_6_701/cache_6_7010
        WARNING: Cannot parse output 'cache_check 1.0.6
      ' from /usr/sbin/cache_check.
        WARNING: Check is skipped, please upgrade installed version of /usr/sbin/cache_check!
      [root@virt-482 ~]# echo $?
      0
      [root@virt-482 ~]# lvchange -ay /dev/cache_6_701/cache_6_7010
        WARNING: Cannot parse output 'cache_check 1.0.6
      ' from /usr/sbin/cache_check.
        WARNING: Check is skipped, please upgrade installed version of /usr/sbin/cache_check!
      [root@virt-482 ~]# echo $?
      0
      

              mtsai@redhat.com Ming Hung Tsai
              cmarthal@redhat.com Corey Marthaler
              lvm-team lvm-team
              Cluster QE Cluster QE
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: