Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-6517 Snapshot support for Ozone
  3. HDDS-7914

[Snapshot] Block FS API access to deleted (non-active) snapshots

    XMLWordPrintableJSON

Details

    Description

      Keys pertaining to deleted snapshot are still accessible through fs -ls.

      bash-4.2$ ozone sh snapshot delete vol1/buck1 snap4
      bash-4.2$ ozone sh snapshot ls vol1/buck1
      [ {
        "volumeName" : "vol1",
        "bucketName" : "buck1",
        "name" : "snap1",
        "creationTime" : 1675762737085,
        "snapshotStatus" : "SNAPSHOT_DELETED",
        "snapshotID" : "47c9566f-f936-4ae0-a8ea-2eebf90ef8a3",
        "snapshotPath" : "vol1/buck1",
        "checkpointDir" : "-47c9566f-f936-4ae0-a8ea-2eebf90ef8a3"
      }, {
        "volumeName" : "vol1",
        "bucketName" : "buck1",
        "name" : "snap2",
        "creationTime" : 1675762805211,
        "snapshotStatus" : "SNAPSHOT_ACTIVE",
        "snapshotID" : "3ef730ef-90a7-4ce3-a76f-f766fcd64e1e",
        "snapshotPath" : "vol1/buck1",
        "checkpointDir" : "-3ef730ef-90a7-4ce3-a76f-f766fcd64e1e"
      }, {
        "volumeName" : "vol1",
        "bucketName" : "buck1",
        "name" : "snap3",
        "creationTime" : 1675763112780,
        "snapshotStatus" : "SNAPSHOT_ACTIVE",
        "snapshotID" : "e3f0ef8b-5396-4b1d-afe7-1a64279967e5",
        "snapshotPath" : "vol1/buck1",
        "checkpointDir" : "-e3f0ef8b-5396-4b1d-afe7-1a64279967e5"
      }, {
        "volumeName" : "vol1",
        "bucketName" : "buck1",
        "name" : "snap4",
        "creationTime" : 1675763223154,
        "snapshotStatus" : "SNAPSHOT_DELETED",
        "snapshotID" : "9d3b12e0-a2a2-4bc2-b733-8b7d6e14aef3",
        "snapshotPath" : "vol1/buck1",
        "checkpointDir" : "-9d3b12e0-a2a2-4bc2-b733-8b7d6e14aef3"
      } ]
      bash-4.2$ ozone sh snapshot delete vol1/buck1 snap4
      FILE_NOT_FOUND Snapshot is already deleted. Pending reclamation.
      bash-4.2$
      bash-4.2$ ozone fs -ls /vol1/buck1/.snapshot/snap4
      Found 1 items
      -rw-rw-rw-   3 hadoop hadoop       3879 2023-02-07 09:46 /vol1/buck1/.snapshot/snap4/key1

      Attachments

        Issue Links

          Activity

            People

              smeng Siyao Meng
              jyosin Jyotirmoy Sinha
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: