jojochuang commented on code in PR #275: URL: https://github.com/apache/ozone-site/pull/275#discussion_r2719978308
########## docs/03-core-concepts/03-namespace/01-volumes/03-quotas.md: ########## @@ -4,4 +4,51 @@ sidebar_label: Quotas # Volume Quotas -**TODO:** File a subtask under [HDDS-9857](https://issues.apache.org/jira/browse/HDDS-9857) and complete this page or section. +## What are Volume Quotas? + +Volume quotas in Ozone provide a mechanism to limit resource consumption at the volume level. They enable administrators to control and manage storage resources in multi-tenant environments, preventing any single volume from monopolizing cluster resources. + +Quotas act as upper bounds that constrain how much storage space and how many objects can be stored within a volume. When quotas are set, Ozone enforces these limits during write operations, ensuring that resource usage stays within the defined boundaries. + +## Quota Management + +Ozone defines two types of quota: namespace quota and storage space quota. + +- **Namespace Quota:** A namespace quota limits the number of objects in a volume. This number cannot be greater than `LONG.MAX_VALUE` in Java. +- **Storage Space Quota:** A storage space quota limits the maximum used space of a volume. It allows the use of units B, KB, MB, GB and TB. + +### Key Characteristics + +- **Hierarchical Enforcement:** Volume quotas apply to the aggregate of all contained buckets +- **Visibility:** Quota usage and limits can be monitored through the CLI and management interfaces +- **Enforcement:** When a quota is reached, write operations fail with a descriptive error message + +:::note Important Notes + +- By default, the volume quota is unlimited. +- The total quota of the buckets cannot exceed the volume quota. +- Volume quota has no effect if bucket quota is not set. +- Volume having linked bucket do not consume space quota for keys within linked bucket. Linked bucket keys will consume space quota of source volume and source bucket. +- If the cluster is upgraded from old version less than 1.1.0, use of quota on older volumes and buckets (We can confirm by looking at the info for the volume or bucket, and if the quota value is -2 the volume or bucket is old) is not recommended. Since the old key is not counted to the bucket's usedBytes and namespace quota, the quota setting is inaccurate at this point. + +::: + +## Setting Both Quotas Simultaneously + +You can set both space and namespace quotas at the same time: + +```bash +# Set both space (1TB) and namespace (1 million objects) quotas simultaneously +ozone sh volume setquota --space=1TB --count=1000000 /volume1 Review Comment: ```suggestion ozone sh volume setquota --space-quota=1TB --namespace-quota=1000000 /volume1 ``` ########## docs/03-core-concepts/03-namespace/01-volumes/03-quotas.md: ########## @@ -4,4 +4,51 @@ sidebar_label: Quotas # Volume Quotas -**TODO:** File a subtask under [HDDS-9857](https://issues.apache.org/jira/browse/HDDS-9857) and complete this page or section. +## What are Volume Quotas? + +Volume quotas in Ozone provide a mechanism to limit resource consumption at the volume level. They enable administrators to control and manage storage resources in multi-tenant environments, preventing any single volume from monopolizing cluster resources. + +Quotas act as upper bounds that constrain how much storage space and how many objects can be stored within a volume. When quotas are set, Ozone enforces these limits during write operations, ensuring that resource usage stays within the defined boundaries. + +## Quota Management + +Ozone defines two types of quota: namespace quota and storage space quota. + +- **Namespace Quota:** A namespace quota limits the number of objects in a volume. This number cannot be greater than `LONG.MAX_VALUE` in Java. +- **Storage Space Quota:** A storage space quota limits the maximum used space of a volume. It allows the use of units B, KB, MB, GB and TB. + +### Key Characteristics + +- **Hierarchical Enforcement:** Volume quotas apply to the aggregate of all contained buckets +- **Visibility:** Quota usage and limits can be monitored through the CLI and management interfaces +- **Enforcement:** When a quota is reached, write operations fail with a descriptive error message + +:::note Important Notes + +- By default, the volume quota is unlimited. +- The total quota of the buckets cannot exceed the volume quota. +- Volume quota has no effect if bucket quota is not set. +- Volume having linked bucket do not consume space quota for keys within linked bucket. Linked bucket keys will consume space quota of source volume and source bucket. +- If the cluster is upgraded from old version less than 1.1.0, use of quota on older volumes and buckets (We can confirm by looking at the info for the volume or bucket, and if the quota value is -2 the volume or bucket is old) is not recommended. Since the old key is not counted to the bucket's usedBytes and namespace quota, the quota setting is inaccurate at this point. + +::: + +## Setting Both Quotas Simultaneously + +You can set both space and namespace quotas at the same time: + +```bash +# Set both space (1TB) and namespace (1 million objects) quotas simultaneously +ozone sh volume setquota --space=1TB --count=1000000 /volume1 + +# Check current quota settings and usage +ozone sh volume info /volume1 + +# Clear the space quota (set space limit to unlimited) +ozone sh volume clrquota --space /volume1 Review Comment: ```suggestion ozone sh volume clrquota --space-quota /volume1 ``` ########## docs/03-core-concepts/03-namespace/01-volumes/03-quotas.md: ########## @@ -4,4 +4,51 @@ sidebar_label: Quotas # Volume Quotas -**TODO:** File a subtask under [HDDS-9857](https://issues.apache.org/jira/browse/HDDS-9857) and complete this page or section. +## What are Volume Quotas? + +Volume quotas in Ozone provide a mechanism to limit resource consumption at the volume level. They enable administrators to control and manage storage resources in multi-tenant environments, preventing any single volume from monopolizing cluster resources. + +Quotas act as upper bounds that constrain how much storage space and how many objects can be stored within a volume. When quotas are set, Ozone enforces these limits during write operations, ensuring that resource usage stays within the defined boundaries. + +## Quota Management + +Ozone defines two types of quota: namespace quota and storage space quota. + +- **Namespace Quota:** A namespace quota limits the number of objects in a volume. This number cannot be greater than `LONG.MAX_VALUE` in Java. +- **Storage Space Quota:** A storage space quota limits the maximum used space of a volume. It allows the use of units B, KB, MB, GB and TB. + +### Key Characteristics + +- **Hierarchical Enforcement:** Volume quotas apply to the aggregate of all contained buckets +- **Visibility:** Quota usage and limits can be monitored through the CLI and management interfaces +- **Enforcement:** When a quota is reached, write operations fail with a descriptive error message + +:::note Important Notes + +- By default, the volume quota is unlimited. +- The total quota of the buckets cannot exceed the volume quota. +- Volume quota has no effect if bucket quota is not set. +- Volume having linked bucket do not consume space quota for keys within linked bucket. Linked bucket keys will consume space quota of source volume and source bucket. +- If the cluster is upgraded from old version less than 1.1.0, use of quota on older volumes and buckets (We can confirm by looking at the info for the volume or bucket, and if the quota value is -2 the volume or bucket is old) is not recommended. Since the old key is not counted to the bucket's usedBytes and namespace quota, the quota setting is inaccurate at this point. + +::: + +## Setting Both Quotas Simultaneously + +You can set both space and namespace quotas at the same time: + +```bash +# Set both space (1TB) and namespace (1 million objects) quotas simultaneously +ozone sh volume setquota --space=1TB --count=1000000 /volume1 + +# Check current quota settings and usage +ozone sh volume info /volume1 + +# Clear the space quota (set space limit to unlimited) +ozone sh volume clrquota --space /volume1 + +# Clear the namespace quota (set object count limit to unlimited) +ozone sh volume clrquota --count /volume1 Review Comment: ```suggestion ozone sh volume clrquota --namespace-quota /volume1 ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
