2015-04-07 10:11:29 +00:00
|
|
|
:orphan:
|
|
|
|
|
2011-09-09 23:21:52 +00:00
|
|
|
=================================================================
|
2011-10-03 18:25:44 +00:00
|
|
|
radosgw-admin -- rados REST gateway user administration utility
|
2011-09-09 23:21:52 +00:00
|
|
|
=================================================================
|
|
|
|
|
2011-10-03 18:25:44 +00:00
|
|
|
.. program:: radosgw-admin
|
2011-09-09 23:21:52 +00:00
|
|
|
|
|
|
|
Synopsis
|
|
|
|
========
|
|
|
|
|
2011-10-03 18:25:44 +00:00
|
|
|
| **radosgw-admin** *command* [ *options* *...* ]
|
2011-09-09 23:21:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
Description
|
|
|
|
===========
|
|
|
|
|
2015-01-22 18:21:52 +00:00
|
|
|
:program:`radosgw-admin` is a RADOS gateway user administration utility. It
|
2011-09-09 23:21:52 +00:00
|
|
|
allows creating and modifying users.
|
|
|
|
|
|
|
|
|
|
|
|
Commands
|
|
|
|
========
|
|
|
|
|
2015-01-22 18:21:52 +00:00
|
|
|
:program:`radosgw-admin` utility uses many commands for administration purpose
|
|
|
|
which are as follows:
|
2011-09-09 23:21:52 +00:00
|
|
|
|
|
|
|
:command:`user create`
|
2015-01-22 18:21:52 +00:00
|
|
|
Create a new user.
|
2011-09-09 23:21:52 +00:00
|
|
|
|
|
|
|
:command:`user modify`
|
2015-01-22 18:21:52 +00:00
|
|
|
Modify a user.
|
2011-09-09 23:21:52 +00:00
|
|
|
|
|
|
|
:command:`user info`
|
2012-06-23 09:50:24 +00:00
|
|
|
Display information of a user, and any potentially available
|
2015-01-22 18:21:52 +00:00
|
|
|
subusers and keys.
|
2011-09-09 23:21:52 +00:00
|
|
|
|
|
|
|
:command:`user rm`
|
2015-01-22 18:21:52 +00:00
|
|
|
Remove a user.
|
|
|
|
|
|
|
|
:command:`user suspend`
|
|
|
|
Suspend a user.
|
|
|
|
|
|
|
|
:command:`user enable`
|
|
|
|
Re-enable user after suspension.
|
|
|
|
|
|
|
|
:command:`user check`
|
|
|
|
Check user info.
|
|
|
|
|
|
|
|
:command:`user stats`
|
|
|
|
Show user stats as accounted by quota subsystem.
|
|
|
|
|
|
|
|
:command:`caps add`
|
|
|
|
Add user capabilities.
|
|
|
|
|
|
|
|
:command:`caps rm`
|
|
|
|
Remove user capabilities.
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2012-06-23 09:50:24 +00:00
|
|
|
:command:`subuser create`
|
2015-01-22 18:21:52 +00:00
|
|
|
Create a new subuser (primarily useful for clients using the Swift API).
|
2012-06-23 09:50:24 +00:00
|
|
|
|
|
|
|
:command:`subuser modify`
|
2015-01-22 18:21:52 +00:00
|
|
|
Modify a subuser.
|
2012-06-23 09:50:24 +00:00
|
|
|
|
|
|
|
:command:`subuser rm`
|
2015-01-22 18:21:52 +00:00
|
|
|
Remove a subuser.
|
|
|
|
|
|
|
|
:command:`key create`
|
|
|
|
Create access key.
|
|
|
|
|
|
|
|
:command:`key rm`
|
|
|
|
Remove access key.
|
2012-06-23 09:50:24 +00:00
|
|
|
|
2011-09-09 23:21:52 +00:00
|
|
|
:command:`bucket list`
|
2015-01-22 18:21:52 +00:00
|
|
|
List all buckets.
|
|
|
|
|
|
|
|
:command:`bucket link`
|
|
|
|
Link bucket to specified user.
|
2011-09-09 23:21:52 +00:00
|
|
|
|
|
|
|
:command:`bucket unlink`
|
2015-01-22 18:21:52 +00:00
|
|
|
Unlink bucket from specified user.
|
|
|
|
|
|
|
|
:command:`bucket stats`
|
|
|
|
Returns bucket statistics.
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2012-10-16 01:18:18 +00:00
|
|
|
:command:`bucket rm`
|
2015-01-22 18:21:52 +00:00
|
|
|
Remove a bucket.
|
|
|
|
|
|
|
|
:command:`bucket check`
|
|
|
|
Check bucket index.
|
2012-08-09 20:27:21 +00:00
|
|
|
|
2012-10-16 01:18:18 +00:00
|
|
|
:command:`object rm`
|
2015-01-22 18:21:52 +00:00
|
|
|
Remove an object.
|
2012-08-09 16:55:27 +00:00
|
|
|
|
2015-01-22 18:21:52 +00:00
|
|
|
:command:`object unlink`
|
|
|
|
Unlink object from bucket index.
|
2012-06-23 09:50:24 +00:00
|
|
|
|
2015-01-22 18:21:52 +00:00
|
|
|
:command:`quota set`
|
|
|
|
Set quota params.
|
|
|
|
|
|
|
|
:command:`quota enable`
|
|
|
|
Enable quota.
|
|
|
|
|
|
|
|
:command:`quota disable`
|
|
|
|
Disable quota.
|
|
|
|
|
|
|
|
:command:`region get`
|
|
|
|
Show region info.
|
|
|
|
|
2016-04-09 04:47:28 +00:00
|
|
|
:command:`region list`
|
2015-01-22 18:21:52 +00:00
|
|
|
List all regions set on this cluster.
|
|
|
|
|
|
|
|
:command:`region set`
|
|
|
|
Set region info (requires infile).
|
|
|
|
|
|
|
|
:command:`region default`
|
|
|
|
Set default region.
|
|
|
|
|
|
|
|
:command:`region-map get`
|
|
|
|
Show region-map.
|
|
|
|
|
|
|
|
:command:`region-map set`
|
|
|
|
Set region-map (requires infile).
|
|
|
|
|
|
|
|
:command:`zone get`
|
|
|
|
Show zone cluster params.
|
|
|
|
|
|
|
|
:command:`zone set`
|
|
|
|
Set zone cluster params (requires infile).
|
|
|
|
|
|
|
|
:command:`zone list`
|
|
|
|
List all zones set on this cluster.
|
2012-06-23 09:50:24 +00:00
|
|
|
|
2012-10-16 01:18:18 +00:00
|
|
|
:command:`pool add`
|
2015-01-22 18:21:52 +00:00
|
|
|
Add an existing pool for data placement.
|
2012-07-25 19:56:59 +00:00
|
|
|
|
|
|
|
:command:`pool rm`
|
2015-01-22 18:21:52 +00:00
|
|
|
Remove an existing pool from data placement set.
|
2012-07-25 19:56:59 +00:00
|
|
|
|
|
|
|
:command:`pools list`
|
2015-01-22 18:21:52 +00:00
|
|
|
List placement active set.
|
2012-07-25 19:56:59 +00:00
|
|
|
|
2011-09-09 23:21:52 +00:00
|
|
|
:command:`policy`
|
2015-01-22 18:21:52 +00:00
|
|
|
Display bucket/object policy.
|
|
|
|
|
|
|
|
:command:`log list`
|
|
|
|
List log objects.
|
2011-09-09 23:21:52 +00:00
|
|
|
|
|
|
|
:command:`log show`
|
2015-01-22 18:21:52 +00:00
|
|
|
Dump a log from specific object or (bucket + date + bucket-id).
|
2015-09-25 03:39:50 +00:00
|
|
|
(NOTE: required to specify formatting of date to "YYYY-MM-DD-hh")
|
2015-01-22 18:21:52 +00:00
|
|
|
|
|
|
|
:command:`log rm`
|
|
|
|
Remove log object.
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2012-06-19 22:17:53 +00:00
|
|
|
:command:`usage show`
|
2015-01-22 18:21:52 +00:00
|
|
|
Show the usage information (with optional user and date range).
|
2012-06-19 22:17:53 +00:00
|
|
|
|
|
|
|
:command:`usage trim`
|
2015-01-22 18:21:52 +00:00
|
|
|
Trim usage information (with optional user and date range).
|
|
|
|
|
|
|
|
:command:`gc list`
|
|
|
|
Dump expired garbage collection objects (specify --include-all to list all
|
|
|
|
entries, including unexpired).
|
|
|
|
|
|
|
|
:command:`gc process`
|
|
|
|
Manually process garbage.
|
|
|
|
|
|
|
|
:command:`metadata get`
|
|
|
|
Get metadata info.
|
|
|
|
|
|
|
|
:command:`metadata put`
|
|
|
|
Put metadata info.
|
|
|
|
|
|
|
|
:command:`metadata rm`
|
|
|
|
Remove metadata info.
|
|
|
|
|
|
|
|
:command:`metadata list`
|
|
|
|
List metadata info.
|
|
|
|
|
|
|
|
:command:`mdlog list`
|
|
|
|
List metadata log.
|
|
|
|
|
|
|
|
:command:`mdlog trim`
|
|
|
|
Trim metadata log.
|
|
|
|
|
|
|
|
:command:`bilog list`
|
|
|
|
List bucket index log.
|
|
|
|
|
|
|
|
:command:`bilog trim`
|
|
|
|
Trim bucket index log (use start-marker, end-marker).
|
|
|
|
|
|
|
|
:command:`datalog list`
|
|
|
|
List data log.
|
|
|
|
|
|
|
|
:command:`datalog trim`
|
|
|
|
Trim data log.
|
|
|
|
|
|
|
|
:command:`opstate list`
|
|
|
|
List stateful operations entries (use client_id, op_id, object).
|
|
|
|
|
|
|
|
:command:`opstate set`
|
|
|
|
Set state on an entry (use client_id, op_id, object, state).
|
|
|
|
|
|
|
|
:command:`opstate renew`
|
|
|
|
Renew state on an entry (use client_id, op_id, object).
|
|
|
|
|
|
|
|
:command:`opstate rm`
|
|
|
|
Remove entry (use client_id, op_id, object).
|
|
|
|
|
|
|
|
:command:`replicalog get`
|
|
|
|
Get replica metadata log entry.
|
|
|
|
|
|
|
|
:command:`replicalog delete`
|
|
|
|
Delete replica metadata log entry.
|
2012-06-19 22:17:53 +00:00
|
|
|
|
2016-02-04 02:51:58 +00:00
|
|
|
:command:`orphans find`
|
|
|
|
Init and run search for leaked rados objects
|
|
|
|
|
|
|
|
:command:`orphans finish`
|
|
|
|
Clean up search for leaked rados objects
|
|
|
|
|
2011-09-09 23:21:52 +00:00
|
|
|
|
|
|
|
Options
|
|
|
|
=======
|
|
|
|
|
|
|
|
.. option:: -c ceph.conf, --conf=ceph.conf
|
|
|
|
|
2015-01-22 18:21:52 +00:00
|
|
|
Use ``ceph.conf`` configuration file instead of the default
|
2011-09-09 23:21:52 +00:00
|
|
|
``/etc/ceph/ceph.conf`` to determine monitor addresses during
|
|
|
|
startup.
|
|
|
|
|
|
|
|
.. option:: -m monaddress[:port]
|
|
|
|
|
|
|
|
Connect to specified monitor (instead of looking through ceph.conf).
|
|
|
|
|
|
|
|
.. option:: --uid=uid
|
|
|
|
|
2012-06-23 09:50:24 +00:00
|
|
|
The radosgw user ID.
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2015-01-22 18:21:52 +00:00
|
|
|
.. option:: --subuser=<name>
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2015-01-22 18:21:52 +00:00
|
|
|
Name of the subuser.
|
|
|
|
|
|
|
|
.. option:: --email=email
|
|
|
|
|
|
|
|
The e-mail address of the user.
|
2011-09-09 23:21:52 +00:00
|
|
|
|
|
|
|
.. option:: --display-name=name
|
|
|
|
|
|
|
|
Configure the display name of the user.
|
|
|
|
|
2015-01-22 18:21:52 +00:00
|
|
|
.. option:: --access-key=<key>
|
|
|
|
|
|
|
|
S3 access key.
|
|
|
|
|
|
|
|
.. option:: --gen-access-key
|
|
|
|
|
|
|
|
Generate random access key (for S3).
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2015-01-22 18:21:52 +00:00
|
|
|
.. option:: --secret=secret
|
|
|
|
|
|
|
|
The secret associated with a given key.
|
|
|
|
|
|
|
|
.. option:: --gen-secret
|
|
|
|
|
|
|
|
Generate random secret key.
|
|
|
|
|
|
|
|
.. option:: --key-type=<type>
|
|
|
|
|
2017-03-13 08:14:08 +00:00
|
|
|
key type, options are: swift, s3.
|
2015-01-22 18:21:52 +00:00
|
|
|
|
|
|
|
.. option:: --temp-url-key[-2]=<key>
|
|
|
|
|
|
|
|
Temporary url key.
|
|
|
|
|
|
|
|
.. option:: --system
|
|
|
|
|
|
|
|
Set the system flag on the user.
|
2011-09-09 23:21:52 +00:00
|
|
|
|
|
|
|
.. option:: --bucket=bucket
|
|
|
|
|
|
|
|
Specify the bucket name.
|
|
|
|
|
|
|
|
.. option:: --object=object
|
|
|
|
|
|
|
|
Specify the object name.
|
|
|
|
|
|
|
|
.. option:: --date=yyyy-mm-dd
|
|
|
|
|
2015-01-22 18:21:52 +00:00
|
|
|
The date needed for some commands.
|
2012-06-19 22:17:53 +00:00
|
|
|
|
|
|
|
.. option:: --start-date=yyyy-mm-dd
|
|
|
|
|
2015-01-22 18:21:52 +00:00
|
|
|
The start date needed for some commands.
|
2012-06-19 22:17:53 +00:00
|
|
|
|
|
|
|
.. option:: --end-date=yyyy-mm-dd
|
|
|
|
|
2015-01-22 18:21:52 +00:00
|
|
|
The end date needed for some commands.
|
|
|
|
|
|
|
|
.. option:: --shard-id=<shard-id>
|
|
|
|
|
|
|
|
Optional for mdlog list. Required for ``mdlog trim``,
|
|
|
|
``replica mdlog get/delete``, ``replica datalog get/delete``.
|
2011-09-09 23:21:52 +00:00
|
|
|
|
|
|
|
.. option:: --auth-uid=auid
|
|
|
|
|
2015-01-22 18:21:52 +00:00
|
|
|
The librados auid.
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2012-08-09 20:27:21 +00:00
|
|
|
.. option:: --purge-data
|
|
|
|
|
2015-01-22 18:21:52 +00:00
|
|
|
Remove user data before user removal.
|
|
|
|
|
|
|
|
.. option:: --purge-keys
|
|
|
|
|
|
|
|
When specified, subuser removal will also purge all the subuser keys.
|
2012-08-09 20:27:21 +00:00
|
|
|
|
|
|
|
.. option:: --purge-objects
|
|
|
|
|
2015-01-22 18:21:52 +00:00
|
|
|
Remove all objects before bucket removal.
|
2012-08-09 20:27:21 +00:00
|
|
|
|
2015-01-22 18:21:52 +00:00
|
|
|
.. option:: --metadata-key=<key>
|
|
|
|
|
|
|
|
Key to retrieve metadata from with ``metadata get``.
|
|
|
|
|
|
|
|
.. option:: --rgw-region=<region>
|
|
|
|
|
|
|
|
Region in which radosgw is running.
|
|
|
|
|
|
|
|
.. option:: --rgw-zone=<zone>
|
|
|
|
|
|
|
|
Zone in which radosgw is running.
|
|
|
|
|
|
|
|
.. option:: --fix
|
|
|
|
|
|
|
|
Besides checking bucket index, will also fix it.
|
|
|
|
|
|
|
|
.. option:: --check-objects
|
|
|
|
|
|
|
|
bucket check: Rebuilds bucket index according to actual objects state.
|
|
|
|
|
|
|
|
.. option:: --format=<format>
|
|
|
|
|
|
|
|
Specify output format for certain operations: xml, json.
|
|
|
|
|
|
|
|
.. option:: --sync-stats
|
|
|
|
|
|
|
|
Option to 'user stats', update user stats with current stats reported by
|
|
|
|
user's buckets indexes.
|
|
|
|
|
|
|
|
.. option:: --show-log-entries=<flag>
|
|
|
|
|
|
|
|
Enable/disable dump of log entries on log show.
|
|
|
|
|
|
|
|
.. option:: --show-log-sum=<flag>
|
|
|
|
|
|
|
|
Enable/disable dump of log summation on log show.
|
|
|
|
|
|
|
|
.. option:: --skip-zero-entries
|
|
|
|
|
|
|
|
Log show only dumps entries that don't have zero value in one of the numeric
|
|
|
|
field.
|
|
|
|
|
|
|
|
.. option:: --infile
|
|
|
|
|
|
|
|
Specify a file to read in when setting data.
|
|
|
|
|
|
|
|
.. option:: --state=<state string>
|
|
|
|
|
|
|
|
Specify a state for the opstate set command.
|
|
|
|
|
|
|
|
.. option:: --replica-log-type
|
|
|
|
|
|
|
|
Replica log type (metadata, data, bucket), required for replica log
|
|
|
|
operations.
|
|
|
|
|
|
|
|
.. option:: --categories=<list>
|
|
|
|
|
|
|
|
Comma separated list of categories, used in usage show.
|
|
|
|
|
|
|
|
.. option:: --caps=<caps>
|
|
|
|
|
|
|
|
List of caps (e.g., "usage=read, write; user=read".
|
|
|
|
|
|
|
|
.. option:: --yes-i-really-mean-it
|
|
|
|
|
|
|
|
Required for certain operations.
|
|
|
|
|
|
|
|
|
|
|
|
Quota Options
|
|
|
|
=============
|
|
|
|
|
|
|
|
.. option:: --max-objects
|
|
|
|
|
|
|
|
Specify max objects (negative value to disable).
|
|
|
|
|
|
|
|
.. option:: --max-size
|
|
|
|
|
|
|
|
Specify max size (in bytes, negative value to disable).
|
|
|
|
|
|
|
|
.. option:: --quota-scope
|
|
|
|
|
|
|
|
Scope of quota (bucket, user).
|
|
|
|
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2016-02-04 02:51:58 +00:00
|
|
|
Orphans Search Options
|
|
|
|
======================
|
|
|
|
|
|
|
|
.. option:: --pool
|
|
|
|
|
|
|
|
Data pool to scan for leaked rados objects
|
|
|
|
|
|
|
|
.. option:: --num-shards
|
|
|
|
|
|
|
|
Number of shards to use for keeping the temporary scan info
|
|
|
|
|
2016-09-15 17:40:14 +00:00
|
|
|
.. option:: --orphan-stale-secs
|
|
|
|
|
|
|
|
Number of seconds to wait before declaring an object to be an orphan.
|
|
|
|
Default is 86400 (24 hours).
|
|
|
|
|
2016-09-19 18:40:12 +00:00
|
|
|
.. option:: --job-id
|
|
|
|
|
|
|
|
Set the job id (for orphans find)
|
|
|
|
|
|
|
|
.. option:: --max-concurrent-ios
|
|
|
|
|
|
|
|
Maximum concurrent ios for orphans find.
|
|
|
|
Default is 32.
|
|
|
|
|
2016-02-04 02:51:58 +00:00
|
|
|
|
2011-09-09 23:21:52 +00:00
|
|
|
Examples
|
|
|
|
========
|
|
|
|
|
|
|
|
Generate a new user::
|
|
|
|
|
2012-06-11 21:49:11 +00:00
|
|
|
$ radosgw-admin user create --display-name="johnny rotten" --uid=johnny
|
|
|
|
{ "user_id": "johnny",
|
|
|
|
"rados_uid": 0,
|
|
|
|
"display_name": "johnny rotten",
|
|
|
|
"email": "",
|
|
|
|
"suspended": 0,
|
|
|
|
"subusers": [],
|
|
|
|
"keys": [
|
|
|
|
{ "user": "johnny",
|
|
|
|
"access_key": "TCICW53D9BQ2VGC46I44",
|
|
|
|
"secret_key": "tfm9aHMI8X76L3UdgE+ZQaJag1vJQmE6HDb5Lbrz"}],
|
|
|
|
"swift_keys": []}
|
2011-09-09 23:21:52 +00:00
|
|
|
|
|
|
|
Remove a user::
|
|
|
|
|
2012-06-11 21:49:11 +00:00
|
|
|
$ radosgw-admin user rm --uid=johnny
|
2012-08-09 20:27:21 +00:00
|
|
|
|
|
|
|
Remove a user and all associated buckets with their contents::
|
|
|
|
|
|
|
|
$ radosgw-admin user rm --uid=johnny --purge-data
|
2011-09-09 23:21:52 +00:00
|
|
|
|
|
|
|
Remove a bucket::
|
|
|
|
|
2016-12-13 08:27:22 +00:00
|
|
|
$ radosgw-admin bucket rm --bucket=foo
|
|
|
|
|
|
|
|
Link bucket to specified user::
|
|
|
|
|
|
|
|
$ radosgw-admin bucket link --bucket=foo --bucket_id=<bucket id> --uid=johnny
|
|
|
|
|
|
|
|
Unlink bucket from specified user::
|
|
|
|
|
|
|
|
$ radosgw-admin bucket unlink --bucket=foo --uid=johnny
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2012-06-21 17:46:55 +00:00
|
|
|
Show the logs of a bucket from April 1st, 2012::
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2015-09-25 03:39:50 +00:00
|
|
|
$ radosgw-admin log show --bucket=foo --date=2012-04-01-01 --bucket-id=default.14193.1
|
2012-06-21 17:46:55 +00:00
|
|
|
|
2012-06-21 18:34:20 +00:00
|
|
|
Show usage information for user from March 1st to (but not including) April 1st, 2012::
|
2012-06-21 17:46:55 +00:00
|
|
|
|
|
|
|
$ radosgw-admin usage show --uid=johnny \
|
|
|
|
--start-date=2012-03-01 --end-date=2012-04-01
|
|
|
|
|
|
|
|
Show only summary of usage information for all users::
|
|
|
|
|
|
|
|
$ radosgw-admin usage show --show-log-entries=false
|
|
|
|
|
|
|
|
Trim usage information for user until March 1st, 2012::
|
|
|
|
|
|
|
|
$ radosgw-admin usage trim --uid=johnny --end-date=2012-04-01
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2015-01-22 18:21:52 +00:00
|
|
|
|
2011-09-09 23:21:52 +00:00
|
|
|
Availability
|
|
|
|
============
|
|
|
|
|
2015-01-22 18:21:52 +00:00
|
|
|
:program:`radosgw-admin` is part of Ceph, a massively scalable, open-source,
|
|
|
|
distributed storage system. Please refer to the Ceph documentation at
|
|
|
|
http://ceph.com/docs for more information.
|
|
|
|
|
2011-09-09 23:21:52 +00:00
|
|
|
|
|
|
|
See also
|
|
|
|
========
|
|
|
|
|
|
|
|
:doc:`ceph <ceph>`\(8)
|
2015-01-22 18:21:52 +00:00
|
|
|
:doc:`radosgw <radosgw>`\(8)
|