1RADOS(8)                             Ceph                             RADOS(8)
2
3
4

NAME

6       rados - rados object storage utility
7

SYNOPSIS

9       rados [ options ] [ command ]
10
11

DESCRIPTION

13       rados  is  a utility for interacting with a Ceph object storage cluster
14       (RADOS), part of the Ceph distributed storage system.
15

OPTIONS

17       -p pool, --pool pool
18              Interact with the given pool. Required by most commands.
19
20       --pgid As an alternative to --pool, --pgid also allow users to  specify
21              the  PG  id  to  which  the  command will be directed. With this
22              option, certain commands like ls allow users to limit the  scope
23              of the command to the given PG.
24
25       -N namespace, --namespace namespace
26              Specify the rados namespace to use for the object.
27
28       -s snap, --snap snap
29              Read  from  the given pool snapshot. Valid for all pool-specific
30              read operations.
31
32       -i infile
33              will specify an input file to be passed along as a payload  with
34              the  command  to the monitor cluster. This is only used for spe‐
35              cific monitor commands.
36
37       -o outfile
38              will write any payload returned by the monitor cluster with  its
39              reply  to  outfile.  Only  specific  monitor  commands (e.g. osd
40              getmap) return a payload.
41
42       -c ceph.conf, --conf=ceph.conf
43              Use  ceph.conf  configuration  file  instead  of   the   default
44              /etc/ceph/ceph.conf   to   determine  monitor  addresses  during
45              startup.
46
47       -m monaddress[:port]
48              Connect  to  specified  monitor  (instead  of  looking   through
49              ceph.conf).
50
51       -b block_size
52              Set  the  block size for put/get/append ops and for write bench‐
53              marking.
54
55       --striper
56              Uses the striping API of rados  rather  than  the  default  one.
57              Available  for  stat,  stat2, get, put, append, truncate, rm, ls
58              and all xattr related operation
59

GLOBAL COMMANDS

61       lspools
62              List object pools
63
64       df     Show utilization statistics, including disk  usage  (bytes)  and
65              object counts, over the entire system and broken down by pool.
66
67       list-inconsistent-pg pool
68              List inconsistent PGs in given pool.
69
70       list-inconsistent-obj pgid
71              List inconsistent objects in given PG.
72
73       list-inconsistent-snapset pgid
74              List inconsistent snapsets in given PG.
75

POOL SPECIFIC COMMANDS

77       get name outfile
78              Read object name from the cluster and write it to outfile.
79
80       put name infile [--offset offset]
81              Write  object  name with start offset (default:0) to the cluster
82              with contents from infile.  Warning: The put command  creates  a
83              single  RADOS  object,  sized  just as large as your input file.
84              Unless your objects are of reasonable and consistent sizes, that
85              is  probably not what you want -- consider using RGW/S3, CephFS,
86              or RBD instead.
87
88       append name infile
89              Append object name to the cluster with contents from infile.
90
91       rm name
92              Remove object name.
93
94       listwatchers name
95              List the watchers of object name.
96
97       ls outfile
98              List objects in the given pool and write to outfile. Instead  of
99              --pool  if  --pgid  will  be  specified,  ls  will only list the
100              objects in the given PG.
101
102       lssnap List snapshots for given pool.
103
104       clonedata srcname dstname --object-locator key
105              Clone object byte data from srcname to  dstname.   Both  objects
106              must  be stored with the locator key key (usually either srcname
107              or dstname).  Object attributes and omap keys are not copied  or
108              cloned.
109
110       mksnap foo
111              Create pool snapshot named foo.
112
113       rmsnap foo
114              Remove pool snapshot named foo.
115
116       bench seconds mode [ -b objsize ] [ -t threads ]
117              Benchmark  for seconds. The mode can be write, seq, or rand. seq
118              and rand are  read  benchmarks,  either  sequential  or  random.
119              Before running one of the reading benchmarks, run a write bench‐
120              mark with the --no-cleanup option. The default object size is  4
121              MB,  and  the  default  number  of  simulated  threads (parallel
122              writes) is 16. The  --run-name  <label>  option  is  useful  for
123              benchmarking  a workload test from multiple clients. The <label>
124              is an arbitrary object name. It is "benchmark_last_metadata"  by
125              default,  and  is  used as the underlying object name for "read"
126              and "write" ops.  Note: -b objsize option is valid only in write
127              mode.   Note:  write and seq must be run on the same host other‐
128              wise the objects created by write will have names that will fail
129              seq.
130
131       cleanup [ --run-name run_name ] [ --prefix prefix ]
132              Clean  up  a  previous  benchmark  operation.  Note: the default
133              run-name is "benchmark_last_metadata"
134
135       listxattr name
136              List all extended attributes of an object.
137
138       getxattr name attr
139              Dump the extended attribute value of attr of an object.
140
141       setxattr name attr value
142              Set the value of attr in the extended attributes of an object.
143
144       rmxattr name attr
145              Remove attr from the extended attributes of an object.
146
147       stat name
148              Get stat (ie. mtime, size) of given object
149
150       stat2 name
151              Get stat (similar to stat, but  with  high  precision  time)  of
152              given object
153
154       listomapkeys name
155              List all the keys stored in the object map of object name.
156
157       listomapvals name
158              List  all  key/value  pairs  stored  in the object map of object
159              name.  The values are dumped in hexadecimal.
160
161       getomapval [ --omap-key-file file ] name key [ out-file ]
162              Dump the hexadecimal value of key in the object  map  of  object
163              name.   If  the  optional out-file argument is not provided, the
164              value will be written to standard output.
165
166       setomapval [ --omap-key-file file ] name key [ value ]
167              Set the value of key in the object map of object  name.  If  the
168              optional  value argument is not provided, the value will be read
169              from standard input.
170
171       rmomapkey [ --omap-key-file file ] name key
172              Remove key from the object map of object name.
173
174       getomapheader name
175              Dump the hexadecimal value of the object map  header  of  object
176              name.
177
178       setomapheader name value
179              Set the value of the object map header of object name.
180
181       export filename
182              Serialize pool contents to a file or standard output.n"
183
184       import [--dry-run] [--no-overwrite] < filename | - >
185              Load pool contents from a file or standard input
186

EXAMPLES

188       To view cluster utilization:
189
190          rados df
191
192       To get a list object in pool foo sent to stdout:
193
194          rados -p foo ls -
195
196       To get a list of objects in PG 0.6:
197
198          rados --pgid 0.6 ls
199
200       To write an object:
201
202          rados -p foo put myobject blah.txt
203
204       To create a snapshot:
205
206          rados -p foo mksnap mysnap
207
208       To delete the object:
209
210          rados -p foo rm myobject
211
212       To read a previously snapshotted version of an object:
213
214          rados -p foo -s mysnap get myobject blah.txt.old
215
216       To list inconsistent objects in PG 0.6:
217
218          rados list-inconsistent-obj 0.6 --format=json-pretty
219

AVAILABILITY

221       rados  is  part of Ceph, a massively scalable, open-source, distributed
222       storage  system.  Please   refer   to   the   Ceph   documentation   at
223       http://ceph.com/docs for more information.
224

SEE ALSO

226       ceph(8)
227
229       2010-2020,  Inktank Storage, Inc. and contributors. Licensed under Cre‐
230       ative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)
231
232
233
234
235dev                              Apr 21, 2020                         RADOS(8)
Impressum