2015-04-07 10:11:29 +00:00
:orphan:
2011-08-19 23:43:21 +00:00
=======================================
rados -- rados object storage utility
=======================================
2011-09-09 23:21:52 +00:00
.. program :: rados
Synopsis
========
| **rados** [ -m *monaddr* ] [ mkpool | rmpool *foo* ] [ -p | --pool
*pool* ] [ -s | --snap *snap* ] [ -i *infile* ] [ -o *outfile* ]
*command* ...
Description
===========
**rados** is a utility for interacting with a Ceph object storage
2013-12-07 20:52:16 +00:00
cluster (RADOS), part of the Ceph distributed storage system.
2011-09-09 23:21:52 +00:00
Options
=======
.. option :: -p pool, --pool pool
Interact with the given pool. Required by most commands.
.. option :: -s snap, --snap snap
Read from the given pool snapshot. Valid for all pool-specific read operations.
.. option :: -i infile
will specify an input file to be passed along as a payload with the
command to the monitor cluster. This is only used for specific
monitor commands.
.. option :: -o outfile
will write any payload returned by the monitor cluster with its
reply to outfile. Only specific monitor commands (e.g. osd getmap)
return a payload.
.. option :: -c ceph.conf, --conf=ceph.conf
Use ceph.conf configuration file instead of the default
/etc/ceph/ceph.conf to determine monitor addresses during startup.
.. option :: -m monaddress[:port]
Connect to specified monitor (instead of looking through ceph.conf).
2015-04-07 23:01:02 +00:00
.. option :: -b block_size
2016-09-09 14:54:02 +00:00
Set the block size for put/get/append ops and for write benchmarking.
2015-04-07 23:01:02 +00:00
2015-01-29 03:51:37 +00:00
.. option :: --striper
Uses the striping API of rados rather than the default one.
2016-09-09 14:54:02 +00:00
Available for stat, get, put, append, truncate, rm, ls and all xattr related operation
2015-01-29 03:51:37 +00:00
2011-09-09 23:21:52 +00:00
Global commands
===============
:command: `lspools`
List object pools
:command: `df`
Show utilization statistics, including disk usage (bytes) and object
counts, over the entire system and broken down by pool.
:command: `mkpool` *foo*
Create a pool with name foo.
2013-01-29 00:43:38 +00:00
:command: `rmpool` *foo* [ *foo* --yes-i-really-really-mean-it ]
2016-05-10 08:11:36 +00:00
Delete the pool foo (and all its data).
2011-09-09 23:21:52 +00:00
2016-05-10 08:11:36 +00:00
:command: `list-inconsistent-pg` *pool*
List inconsistent PGs in given pool.
:command: `list-inconsistent-obj` *pgid*
List inconsistent objects in given PG.
:command: `list-inconsistent-snapset` *pgid*
List inconsistent snapsets in given PG.
2011-09-09 23:21:52 +00:00
Pool specific commands
======================
:command: `get` *name* *outfile*
Read object name from the cluster and write it to outfile.
:command: `put` *name* *infile*
Write object name to the cluster with contents from infile.
2016-09-09 14:54:02 +00:00
:command: `append` *name* *infile*
Append object name to the cluster with contents from infile.
2011-09-09 23:21:52 +00:00
:command: `rm` *name*
Remove object name.
2015-12-23 03:23:38 +00:00
:command: `listwatchers` *name*
List the watchers of object name.
2011-09-09 23:21:52 +00:00
:command: `ls` *outfile*
List objects in given pool and write to outfile.
:command: `lssnap`
List snapshots for given pool.
2013-05-06 23:45:12 +00:00
:command: `clonedata` *srcname* *dstname* --object-locator *key*
Clone object byte data from *srcname* to *dstname* . Both objects must be stored with the locator key *key* (usually either *srcname* or *dstname* ). Object attributes and omap keys are not copied or cloned.
2011-09-09 23:21:52 +00:00
:command: `mksnap` *foo*
Create pool snapshot named *foo* .
:command: `rmsnap` *foo*
2013-05-06 23:45:12 +00:00
Remove pool snapshot named *foo* .
2011-09-09 23:21:52 +00:00
:command: `bench` *seconds* *mode* [ -b *objsize* ] [ -t *threads* ]
2014-05-29 21:28:47 +00:00
Benchmark for *seconds* . The mode can be *write* , *seq* , or
*rand* . *seq* and *rand* are read benchmarks, either
sequential or random. Before running one of the reading benchmarks,
run a write benchmark with the *--no-cleanup* option. The default
2012-09-27 21:10:51 +00:00
object size is 4 MB, and the default number of simulated threads
2015-09-11 20:40:03 +00:00
(parallel writes) is 16. The *--run-name <label>* option is useful
for benchmarking a workload test from multiple clients. The *<label>*
2016-01-15 16:48:40 +00:00
is an arbitrary object name. It is "benchmark_last_metadata" by
default, and is used as the underlying object name for "read" and
"write" ops.
2015-04-07 23:01:02 +00:00
Note: -b *objsize* option is valid only in *write* mode.
2016-10-06 17:39:20 +00:00
Note: *write* and *seq* must be run on the same host otherwise the
objects created by *write* will have names that will fail *seq* .
2014-05-29 21:28:47 +00:00
:command: `cleanup`
2011-09-09 23:21:52 +00:00
2012-06-08 15:40:27 +00:00
:command: `listomapkeys` *name*
List all the keys stored in the object map of object name.
:command: `listomapvals` *name*
List all key/value pairs stored in the object map of object name.
The values are dumped in hexadecimal.
2016-12-02 18:36:35 +00:00
:command: `getomapval` [ --omap-key-file *file* ] *name* *key* [ *out-file* ]
2012-06-08 15:40:27 +00:00
Dump the hexadecimal value of key in the object map of object name.
2016-12-02 18:36:35 +00:00
If the optional *out-file* argument isn't provided, the value will be
written to standard output.
2012-06-08 15:40:27 +00:00
2016-12-02 18:36:35 +00:00
:command: `setomapval` [ --omap-key-file *file* ] *name* *key* [ *value* ]
Set the value of key in the object map of object name. If the optional
*value* argument isn't provided, the value will be read from standard
input.
2012-06-08 15:40:27 +00:00
2016-12-02 18:36:35 +00:00
:command: `rmomapkey` [ --omap-key-file *file* ] *name* *key*
2012-06-08 15:40:27 +00:00
Remove key from the object map of object name.
:command: `getomapheader` *name*
Dump the hexadecimal value of the object map header of object name.
:command: `setomapheader` *name* *value*
Set the value of the object map header of object name.
2011-09-09 23:21:52 +00:00
Examples
========
To view cluster utilization::
rados df
To get a list object in pool foo sent to stdout::
rados -p foo ls -
To write an object::
rados -p foo put myobject blah.txt
To create a snapshot::
rados -p foo mksnap mysnap
To delete the object::
rados -p foo rm myobject
To read a previously snapshotted version of an object::
rados -p foo -s mysnap get myobject blah.txt.old
2016-05-10 08:11:36 +00:00
To list inconsistent objects in PG 0.6::
rados list-inconsistent-obj 0.6 --format=json-pretty
2011-09-09 23:21:52 +00:00
Availability
============
2015-01-22 02:16:35 +00:00
**rados** is part of Ceph, a massively scalable, open-source, distributed storage system. Please refer to
2012-06-16 21:50:29 +00:00
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)