3.4. Managing Object Storage Buckets¶
All objects in Amazon S3-like storage are stored in containers named buckets. Buckets are addressed by names that are unique in the given object storage, so an S3 user of that object storage cannot create a bucket that has the same name as a different bucket in the same object storage. Buckets are used to:
- group and isolate objects from those in other buckets,
- provide ACL management mechanisms for objects in them,
- set per-bucket access policies, for example, versioning in the bucket.
You can manage buckets with the
ostor-s3-admin tool as well as S3 API third-party S3 browsers like CyberDuck or DragonDisk.
ostor-s3-admin commands are assumed to be issued by object storage administrators, they do not include any authentication or authorization checks.
3.4.1. Listing Bucket Contents¶
You can list bucket contents with a web browser. To do this, visit the URL that consists of the external DNS name for the S3 endpoint that you specified when creating the S3 cluster and the bucket name. For example,
You can also copy the link to bucket contents by right-clicking it in CyberDuck, and then selecting Copy URL.
184.108.40.206. Managing Buckets from Command Line¶
3.4.2. Listing Object Storage Buckets¶
You can list all buckets in the S3 object storage with the
ostor-s3-admin -c list-all-buckets command. For each bucket, the command shows owner, creation data, versioning status, and total size (the size of all objects stored in the bucket plus the size of all unfinished multipart uploads for this bucket). For example:
# ostor-s3-admin -c list-all-buckets Total 3 buckets BUCKET OWNER CREATION_DATE VERSIONING TOTAL SIZE, BYTES bucket1 968d1a79968d1a79 2015-08-18T09:32:35.000Z none 1024 bucket2 968d1a79968d1a79 2015-08-18T09:18:20.000Z enabled 0 bucket3 968d1a79968d1a79 2015-08-18T09:22:15.000Z suspended 1024000
3.4.3. Querying Object Storage Bucket Information¶
You can query bucket metadata information and ACL with the
ostor-s3-admin -c query-bucket-info command. For example, for
# ostor-s3-admin -c query-bucket-info -b bucket1 BUCKET OWNER CREATION_DATE VERSIONING TOTAL SIZE, BYTES bucket1 968d1a79968d1a79 2015-08-18T09:32:35.000Z none 1024 BUCKET ACL GROUP GRANT READ WRITE READ_ACP WRITE_ACP S3 USER GRANT READ WRITE READ_ACP WRITE_ACP 968d1a79968d1a79 - - - - abcdabcdabcdabcd + + + +
3.4.4. Changing Object Storage Bucket Owners¶
You can pass ownership of a bucket to the specified user with the
ostor-s3-admin -c change-bucket-owner command. For example, to make user with ID
bf0b3b15eb7c9019 the owner of
# ostor-s3-admin -c change-bucket-owner -b bucket1 -i bf0b3b15eb7c9019 Changed owner of the bucket bucket1. New owner bf0b3b15eb7c9019
3.4.5. Deleting Object Storage Buckets¶
You can delete the specified bucket with the
ostor-s3-admin -c delete-bucket command. Deleting a bucket will delete all objects in it (including their old versions) as well as all unfinished multipart uploads for this bucket For example:
# ostor-s3-admin -c delete-bucket -b bucket1 Deleted bucket bucket1