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

fsck.gfs2 does not fix corruption that causes an error when moving or removing a file on a gfs2 filesystem

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • rhel-8.0.0
    • gfs2-utils
    • None
    • Impediment
    • Important
    • rhel-sst-filesystems
    • ssg_filesystems_storage_and_HA
    • 8
    • True
    • Hide

      Design

      Show
      Design
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None

      Description of problem:
      A gfs2 filesystem running kernel 3.10.0-693.2.1.el7.x86_64 became corrupt. This corruption prevented files on the gfs2 filesystem from being deleted or moved.

      /dev/mapper/QLD_Strip8_vg-qld_lv on /qualidade type gfs2 (rw,noatime,nodiratime) [SAS_Cluster:qld]

      When they run fsck.gfs2 on the filesystem the corruption is not detected or fixed.

      I have been working with bob on this and it found out that fsck.gfs2 is not looking for this issue and so does not fix the issue.
      [06/05/2019 -:- 11:53:46] bob: sbradley, In essence, somehow the customer
      got into a situation where their directory entry inode number doesn't
      match the dinode's inode number exactly. Not sure how that happened. But
      fsck is not checking for the problem, nor fixing it.


      They can edit and copy the file:

      [root@lpw6001sas03 ~]# cp /qualidade/fecho/ioc_mestre/gis/eb_docs_02_gfg.sas7bdat /qualidade/fecho/ioc_mestre/gis/XXX
      [root@lpw6001sas03 ~]# ls -la /qualidade/fecho/ioc_mestre/gis/XXX
      rw-rr- 1 root root 0 May 15 11:12 /qualidade/fecho/ioc_mestre/gis/XXX
      [root@lpw6001sas03 ~]#

      When they try to move or remove one of these files we get the error:

      [root@lpw6001sas03 ~]# mv /qualidade/fecho/ioc_mestre/gis/eb_docs_02_gfg.sas7bdat /qualidade/fecho/ioc_mestre/gis/XXX
      mv: cannot move '/qualidade/fecho/ioc_mestre/gis/eb_docs_02_gfg.sas7bdat' to '/qualidade/fecho/ioc_mestre/gis/XXX': No such file or directory
      [root@lpw6001sas03 ~]#
      [root@lpw6001sas03 ~]# rm /qualidade/fecho/ioc_mestre/gis/eb_docs_02_gfg.sas7bdat
      rm: remove regular empty file '/qualidade/fecho/ioc_mestre/gis/eb_docs_02_gfg.sas7bdat'? y
      rm: cannot remove '/qualidade/fecho/ioc_mestre/gis/eb_docs_02_gfg.sas7bdat': No such file or directory
      [root@lpw6001sas03 ~]#
      [root@lpw6001sas03 ~]# rm /qualidade/fecho/ioc_mestre/gis/et_ebentid_02_gfg.sas7bdat
      rm: remove regular empty file '/qualidade/fecho/ioc_mestre/gis/et_ebentid_02_gfg.sas7bdat'? y
      rm: cannot remove '/qualidade/fecho/ioc_mestre/gis/et_ebentid_02_gfg.sas7bdat': No such file or directory
      [root@lpw6001sas03 ~]#

      ls -1b doesn't appear to indicate that there is any discrepancy with the characters in the file name:

      [root@lpw6001sas03 ~]# ls -1b /qualidade/fecho/ioc_mestre/gis_erro_sistema/eb_docs_02_gfg.sas7bdat
      /qualidade/fecho/ioc_mestre/gis_erro_sistema/eb_docs_02_gfg.sas7bdat
      [root@lpw6001sas03 ~]#
      [root@lpw6001sas03 ~]# ls -1b /qualidade/fecho/ioc_mestre/gis_erro_sistema/et_ebentid_02_gfg.sas7bdat
      /qualidade/fecho/ioc_mestre/gis_erro_sistema/et_ebentid_02_gfg.sas7bdat
      [root@lpw6001sas03 ~]#

      rm -f doesn't produce error, but the file is still there:

      [root@lpw6001sas03 ~]# rm -f /qualidade/fecho/ioc_mestre/gis_erro_sistema/eb_docs_02_gfg.sas7bdat
      [root@lpw6001sas03 ~]#
      [root@lpw6001sas03 ~]# ls -1b /qualidade/fecho/ioc_mestre/gis_erro_sistema/eb_docs_02_gfg.sas7bdat
      /qualidade/fecho/ioc_mestre/gis_erro_sistema/eb_docs_02_gfg.sas7bdat
      [root@lpw6001sas03 ~]#
      [root@lpw6001sas03 ~]# rm /qualidade/fecho/ioc_mestre/gis_erro_sistema/eb_docs_02_gfg.sas7bdat
      rm: remove regular empty file '/qualidade/fecho/ioc_mestre/gis_erro_sistema/eb_docs_02_gfg.sas7bdat'? y
      rm: cannot remove '/qualidade/fecho/ioc_mestre/gis_erro_sistema/eb_docs_02_gfg.sas7bdat': No such file or directory

      Version-Release number of selected component (if applicable):
      gfs2-utils-3.1.10-9.el7.x86_64

      How reproducible:
      Every time.

      Steps to Reproduce:
      1. fsck.gfs2 -y /dev/vg1/lv0

      Actual results:
      The utility gfs2-utils did not fix the corruption that was on the filesystem.

      Expected results:
      The utility gfs2-utils did fix the corruption that was on the filesystem.

      Additional info:
      There is gfs2 metadata that is attached to the ticket (02382789) that contains the corruption.

      The reason why the gfs2 filesystem got corrupted is UNKNOWN.

              anprice Andrew Price
              rhn-support-sbradley Shane Bradley
              Andrew Price Andrew Price
              Cluster QE Cluster QE
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated: