Frequently Asked Question

radosgw-admin
Last Updated 3 hours ago

radosgw-admin is the command‑line utility for administering a Ceph RADOS Gateway (RGW) service. It lets you manage users, buckets, ACLs, usage statistics and other RGW‑specific objects directly from a shell.


1. Prerequisites

Requirement Command
Ceph client tools installed sudo apt install ceph-common
Access to the RGW endpoint (e.g. http://rgw‑host:8080)
Sufficient privileges (usually a Ceph admin key)
If any of the above are missing, install the client tools or obtain the appropriate keyring file.

2. Basic syntax

radosgw-admin  [arguments...] [--help]
  • – one of the sub‑commands listed in the official docs.
  • --help – prints help for the command or sub‑command.
  • --no-mon – skip monitor discovery (useful when you already have a --gateway URL).

3. Managing users

3.1 Create a new user

radosgw-admin user create --uid=alice --display-name="Alice Smith" --email=alice@example.com
  • --uid – optional; if omitted a UUID is generated.
  • --display-name – human‑readable name.
  • --email – optional contact field.

3.2 List users

radosgw-admin user list

3.3 Show user details

radosgw-admin user info --uid=alice

3.4 Update user metadata

radosgw-admin user modify --uid=alice --display-name="Alice S."

3.5 Delete a user

radosgw-admin user rm --uid=alice

4. Managing buckets

4.1 Create a bucket

radosgw-admin bucket create --bucket=my-bucket

4.2 List buckets

radosgw-admin bucket list

4.3 Delete a bucket

radosgw-admin bucket rm --bucket=my-bucket

4.4 Set bucket properties (e.g., versioning)

radosgw-admin bucket check --bucket=my-bucket   # verify existence
radosgw-admin bucket set-versioning --bucket=my-bucket --status=Enabled

5. Managing ACLs

5.1 Set an ACL on an object

radosgw-admin object put acl --bucket=my-bucket --object=my-object --acl=public-read

5.2 Get ACL of an object

radosgw-admin object get acl --bucket=my-bucket --object=my-object

5.3 Remove ACL (reset to default)

radosgw-admin object acl rm --bucket=my-bucket --object=my-object

6. Managing usage statistics

6.1 Show usage for a bucket

radosgw-admin bucket stats --bucket=my-bucket

6.2 Show overall RGW usage

radosgw-admin df

6.3 Export usage to CSV (useful for reporting)

radosgw-admin bucket stats --bucket=my-bucket --output=csv > bucket_stats.csv

7. Commonly used sub‑commands (quick reference)

Command Purpose
user create Create a new RGW user
user info Show user details
user modify Update user metadata
user rm Delete a user
bucket create Create a bucket
bucket list List all buckets
bucket rm Delete a bucket
bucket set‑versioning Enable/disable bucket versioning
object put acl Apply an ACL to an object
object get acl Retrieve an object's ACL
bucket stats Display usage statistics
df Show overall RGW capacity usage

Run radosgw-admin --help for a full list of options and global flags.


8. Practical workflow example

# 1. Create a user
radosgw-admin user create --uid=bob --display-name="Bob Johnson"

# 2. Create a bucket owned by that user
radosgw-admin bucket create --bucket=bob-data

# 3. Set a policy that the bucket is publicly readable
radosgw-admin bucket set-policy --bucket=bob-data --policy=public-read

# 4. Upload a test object
radosgw-admin object put bob-data/test.txt --data="Hello, world!"

# 5. Verify the object and its ACL
radosgw-admin object stat --bucket=bob-data --object=test.txt
radosgw-admin object get acl --bucket=bob-data --object=test.txt

9. Troubleshooting tips

Symptom Check
command not found Ensure ceph-common (or ceph client) is installed.
Access denied Verify you are using a key that has allow rgw capabilities.
No output or timeout Confirm network connectivity to the RGW endpoint; use --gateway http://host:port if needed.
Unexpected JSON errors Run the command with --debug to see detailed request/response data.

10. Where to find more information

  • Official Ceph documentation – radosgw-admin reference.
  • Ceph mailing lists and #ceph on IRC for community support.
  • Your internal RGW deployment guide for site‑specific configuration details.

All commands shown are intended for use on a system with appropriate Ceph client tools installed and with a valid keyring that grants RGW administrative privileges.

This FAQ was generated and/or edited by GAIN, GENs Artificial Intelligence Network and should not be considered 100% accurate. Always check facts and do your research, things change all the time. If you are unsure about any information provided, please raise a support ticket for clarification.

This website relies on temporary cookies to function, but no personal data is ever stored in the cookies.
OK
Powered by GEN UK CLEAN GREEN ENERGY

Loading ...