Depending on whether you are an administrator or an individual user, the Ozone shell
commands enable you to create, delete, view, list, and update volumes. Before running these
commands, you must have configured the Ozone Service ID for your cluster from the
Configuration tab of the Ozone service on Cloudera Manager.
Creating volume and specifying quota🔗
Only an administrator can create a volume and assign it to a user. You must assign
administrator privileges to users before they can create volumes.
Creating a volume:
Command Syntax
ozone sh volume create [--namespace-quota=<quotaInNamespace>]
[--space-quota=<quotaInBytes>] <uri>
Command Usage
Create volume with only space quota:
ozone sh volume create --space–quota=<quotaInBytes> <uri>
Create volume with only namespace
quota:
ozone sh volume create --namespace-quota=<quotaInNamespace> <uri>
Create volume with both space and namespace quota:
ozone sh volume create --namespace-quota=<quotaInNamespace> --space–quota=<quotaInBytes> <uri>
Purpose
Creates a volume with the quota.
Arguments
--namespace-quota: Specify the number of buckets in a volume. This is an
optional parameter.
--space-quota: Specifies the maximum size the volume can occupy in the
cluster. This is an optional parameter.
uri: The name of the volume to create in the
<prefix>://<Service ID>/<volumename>
format.
Examples
ozone sh volume create --space-quota=2TB o3://ozone1/vol1
This
command creates a 2 TB volume named vol1. Here, ozone1 is the Ozone Service
ID.
ozone sh volume create --namespace-quota=100 o3://ozone1/vol1
This
command sets the namespace quota of vol1 to 100.
Checking namespace and space quota for volume🔗
Command Syntax
ozone sh volume info <uri>
Purpose
Get the quota value and usedNamespace information of the volume.
Arguments
uri: The name of the volume you want to view in the
<prefix>://<Service ID>/<volumename> format.
Example
ozone sh volume info o3://ozone1/vol1
This command gets the quota value and usedNamespace of
vol1.
ozone sh volume setquota [-hV] [--namespace-quota=<quotaInNamespace>]
[--space-quota=<quotaInBytes>] <uri>
Command Usage
Update volume with only space quota:
ozone sh volume setquota --space-quota=<quotaInBytes> <uri>
Update volume with only namespace
quota:
ozone sh volume setquota --namespace-quota=<quotaInNamespace> <uri>
Update volume with both space and namespace quota:
ozone sh volume setquota --namespace-quota=<quotaInNamespace> --space-quota=<quotaInBytes> <uri>
Purpose
Updates the quota of the specific volume.
Arguments
--namespace-quota: Updates the maximum number of buckets this volume can have.
--space-quota: Updates the maximum size the volume can occupy in the
cluster.
uri: The name of the volume to update in the
<prefix>://<Service ID>/<volumename>
format.
Example
ozone sh volume setquota --namespace-quota=1000 --space-quota=10GB o3://ozone1/vol1
This
command sets the vol1 namespace quota to 1000 and the space quota
to 10 GB.
Clearing volume quota🔗
Namespace
Command Syntax
ozone sh volume clrquota [-hV] [--namespace-quota] [--space-quota] <uri>
Command Usage
Clear volume with only space quota:
ozone sh volume clrquota --space-quota <uri>
Clear volume with only namespace
quota:
ozone sh volume clrquota --namespace-quota <uri>
Clear volume with both space and namespace quota:
ozone sh volume clrquota --space-quota --namespace-quota <uri>
Purpose
Clear the namespace and space quota of the volume.
Arguments
--namespace-quota: Clears the namespace quota of a volume.
--space-quota: Clears the space quota of a volume.
Example
ozone sh volume clrquota --namespace-quota o3://ozone1/vol1
This
command clears the namespace quota of vol1.
ozone sh volume clrquota --space-quota o3://ozone1/vol1
This
command clears the space quota of vol1.
We want your opinion
How can we improve this page?
What kind of feedback do you have?
This site uses cookies and related technologies, as described in our privacy policy, for purposes that may include site operation, analytics, enhanced user experience, or advertising. You may choose to consent to our use of these technologies, or