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

gfs2_edit restoremeta should truncate destination device

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Minor Minor
    • rhel-9.5
    • rhel-9.4
    • gfs2-utils
    • None
    • gfs2-utils-3.5.1-2.el9
    • None
    • None
    • rhel-sst-filesystems
    • ssg_filesystems_storage_and_HA
    • 20
    • 2
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None

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

      • gfs2_edit restoremeta into a sparse file as the target device, followed by
      • fsck.gfs2

        Steps to reproduce

      1. Create an empty file with:
      2. echo -n '' > sparse
      3. Restore a filesystem's metadata into that file (which becomes sparse):
      4. gfs2_edit restoremeta meta.gz sparse
      5. Check the consistency of the metadata:
      6. fsck.gfs2 sparse

      Expected results

      After the restoremeta, the sparse file should at least be as big as the filesystem the metadata belongs to. fsck.gfs2 should not complain about the device size.

      Actual results

      The restoremeta command restores the metadata, but doesn't truncate the sparse file to the filesystem size, so the blocks beyond the last metadata block are missing.
      I don't know if this only affects older versions of gfs2-utils, or if this issue still exists.

              pevans@redhat.com Paul Evans
              agruenba@redhat.com Andreas Gruenbacher
              GFS2 Maintainers Bot GFS2 Maintainers Bot
              Cluster QE Cluster QE
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: