Ozone Command Line Interface

The Ozone Command Line Interface (CLI) serves as the primary tool for interacting with Ozone from the command line.

Volume Operations

Volume operations in Ozone are governed by ACLs (Access Control Lists), restricting volume creation permissions to ozone admins only.

Commands

  • Create Volume: To create a volume, use the following command:
Bash
Copy

Or specify the OM service ID:

Bash
Copy
  • Volume Info: Retrieve information about a volume using:
Bash
Copy
  • List Volumes: List all volumes with:
Bash
Copy
  • Delete Volume: To delete a volume, execute:
Bash
Copy

For recursive deletion (including all keys and buckets within the volume), use:

Bash
Copy

Confirm deletion by entering 'yes' when prompted.

Bucket Operations

Interact with buckets in Ozone using the following commands:

  • Create Bucket: To create a bucket, use:
Bash
Copy

Or specify the OM service ID:

Bash
Copy

By default, buckets are configured to support the file system (FILE_SYSTEM_OPTIMIZED).

  • Bucket Info: Retrieve information about a bucket with:
Bash
Copy
  • Delete Bucket: Delete a bucket using:
Bash
Copy

For recursive deletion (including all keys within the bucket), utilize:

Bash
Copy

Confirm deletion by entering 'yes' when prompted. This will delete all the keys within the bucket, and then the bucket itself. After running the command there is no way to recover deleted contents.

Key Operations

Perform various operations on keys in Ozone using the following commands:

  • Upload Keys: Upload a key to a specified location:
Bash
Copy
  • Key Info: Retrieve information about a key:
Bash
Copy
  • Get Key on Local System: Download a key to the local system:
Bash
Copy
  • Delete Key: To delete the key:
Bash
Copy

If the key is in an FSO (File System Optimized) bucket, it will be moved to the trash upon deletion. The location of the trash folder is /volume/bucket/.Trash/user. If the key is in an OBS (Object Store) bucket, it will be permanently deleted.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
  Last updated