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

[snapshot] Ozone fs -ls on snapshot doesn't work for OBJECT_STORE

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3.0
    • None
    • Ozone Manager

    Description

      As OBJECT_STORE layout type doesn't support fs ls API, currently listing .snapshot isn't supported.

      ### FILE_SYSTEM_OPTIMIZED
      [root@ozs7b-2 ~]# ozone sh bucket info vol1/fsobuck
      {
        "metadata" : { },
        "volumeName" : "vol1",
        "name" : "fsobuck",
        ..
        "bucketLayout" : "FILE_SYSTEM_OPTIMIZED",
        "owner" : "hdfs",
        "link" : false
      }
      [root@ozs7b-2 ~]# ozone sh key put vol1/fsobuck/key1 anaconda-ks.cfg
      ..
      [root@ozs7b-2 ~]# ozone sh snapshot create vol1/fsobuck snap2
      [root@ozs7b-2 ~]# ozone fs -ls ofs://ozone1/vol1/fsobuck/.snapshot/snap2
      Found 1 items
      -rw-rw-rw-   3 hdfs hdfs       3302 2022-11-18 14:47 ofs://ozone1/vol1/fsobuck/.snapshot/snap2/key1
      
      
      ### OBJECT_STORE
      [root@ozs7b-2 ~]# ozone sh bucket info vol1/obsbuck
      {
        "metadata" : { },
        "volumeName" : "vol1",
        "name" : "obsbuck",
         ..
        "bucketLayout" : "OBJECT_STORE",
        "owner" : "hdfs",
        "link" : false
      }
      [root@ozs7b-2 ~]# ozone sh key put vol1/obsbuck/key1 anaconda-ks.cfg
      ..
      
      [root@ozs7b-2 ~]# ozone fs -ls ofs://ozone1/vol1/obsbuck/.snapshot/snap2
      -ls: Bucket: obsbuck has layout: OBJECT_STORE, which does not support file system semantics. Bucket Layout must be FILE_SYSTEM_OPTIMIZED or LEGACY.
      

      Also, we can't list it from the ozone sh key list as these keys aren't listed.

      [root@ozs7b-2 ~]# ozone sh key list vol1/obsbuck
      [ {
        "volumeName" : "vol1",
        "bucketName" : "obsbuck",
        "name" : "key1",
        "dataSize" : 3302,
        "creationTime" : "2022-11-18T14:47:56.761Z",
        "modificationTime" : "2022-11-18T14:47:59.528Z",
        "replicationConfig" : {
          "replicationFactor" : "THREE",
          "requiredNodes" : 3,
          "replicationType" : "RATIS"
        }
      } ]
      

      Attachments

        Activity

          People

            swamirishi Swaminathan Balachandran
            ssulav Soumitra Sulav
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: