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
60       -O object_size
61              Set the object size for put/get ops and for write benchmarking
62
63       --lock-cookie locker-cookie
64              Will set the lock cookie for acquiring advisory lock  (lock  get
65              command).   If  the  cookie  is  not  empty, this option must be
66              passed to lock break command  to  find  the  correct  lock  when
67              releasing lock.
68

GLOBAL COMMANDS

70       lspools
71              List object pools
72
73       df     Show  utilization  statistics,  including disk usage (bytes) and
74              object counts, over the entire system and broken down by pool.
75
76       list-inconsistent-pg pool
77              List inconsistent PGs in given pool.
78
79       list-inconsistent-obj pgid
80              List inconsistent objects in given PG.
81
82       list-inconsistent-snapset pgid
83              List inconsistent snapsets in given PG.
84

POOL SPECIFIC COMMANDS

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

EXAMPLES

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

AVAILABILITY

230       rados is part of Ceph, a massively scalable,  open-source,  distributed
231       storage   system.   Please   refer   to   the   Ceph  documentation  at
232       http://ceph.com/docs for more information.
233

SEE ALSO

235       ceph(8)
236
238       2010-2021, Inktank Storage, Inc. and contributors. Licensed under  Cre‐
239       ative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)
240
241
242
243
244dev                              Mar 18, 2021                         RADOS(8)
Impressum