1RADOS(8) Ceph RADOS(8)
2
3
4
6 rados - rados object storage utility
7
9 rados [ options ] [ command ]
10
11
13 rados is a utility for interacting with a Ceph object storage cluster
14 (RADOS), part of the Ceph distributed storage system.
15
17 -p pool, --pool pool
18 Interact with the given pool. Required by most commands.
19
20 -s snap, --snap snap
21 Read from the given pool snapshot. Valid for all pool-specific
22 read operations.
23
24 -i infile
25 will specify an input file to be passed along as a payload with
26 the command to the monitor cluster. This is only used for spe‐
27 cific monitor commands.
28
29 -o outfile
30 will write any payload returned by the monitor cluster with its
31 reply to outfile. Only specific monitor commands (e.g. osd
32 getmap) return a payload.
33
34 -c ceph.conf, --conf=ceph.conf
35 Use ceph.conf configuration file instead of the default
36 /etc/ceph/ceph.conf to determine monitor addresses during
37 startup.
38
39 -m monaddress[:port]
40 Connect to specified monitor (instead of looking through
41 ceph.conf).
42
43 -b block_size
44 Set the block size for put/get/append ops and for write bench‐
45 marking.
46
47 --striper
48 Uses the striping API of rados rather than the default one.
49 Available for stat, stat2, get, put, append, truncate, rm, ls
50 and all xattr related operation
51
53 lspools
54 List object pools
55
56 df Show utilization statistics, including disk usage (bytes) and
57 object counts, over the entire system and broken down by pool.
58
59 list-inconsistent-pg pool
60 List inconsistent PGs in given pool.
61
62 list-inconsistent-obj pgid
63 List inconsistent objects in given PG.
64
65 list-inconsistent-snapset pgid
66 List inconsistent snapsets in given PG.
67
69 get name outfile
70 Read object name from the cluster and write it to outfile.
71
72 put name infile [--offset offset]
73 Write object name with start offset (default:0) to the cluster
74 with contents from infile. Warning: The put command creates a
75 single RADOS object, sized just as large as your input file.
76 Unless your objects are of reasonable and consistent sizes, that
77 is probably not what you want -- consider using RGW/S3, CephFS,
78 or RBD instead.
79
80 append name infile
81 Append object name to the cluster with contents from infile.
82
83 rm name
84 Remove object name.
85
86 listwatchers name
87 List the watchers of object name.
88
89 ls outfile
90 List objects in given pool and write to outfile.
91
92 lssnap List snapshots for given pool.
93
94 clonedata srcname dstname --object-locator key
95 Clone object byte data from srcname to dstname. Both objects
96 must be stored with the locator key key (usually either srcname
97 or dstname). Object attributes and omap keys are not copied or
98 cloned.
99
100 mksnap foo
101 Create pool snapshot named foo.
102
103 rmsnap foo
104 Remove pool snapshot named foo.
105
106 bench seconds mode [ -b objsize ] [ -t threads ]
107 Benchmark for seconds. The mode can be write, seq, or rand. seq
108 and rand are read benchmarks, either sequential or random.
109 Before running one of the reading benchmarks, run a write bench‐
110 mark with the --no-cleanup option. The default object size is 4
111 MB, and the default number of simulated threads (parallel
112 writes) is 16. The --run-name <label> option is useful for
113 benchmarking a workload test from multiple clients. The <label>
114 is an arbitrary object name. It is "benchmark_last_metadata" by
115 default, and is used as the underlying object name for "read"
116 and "write" ops. Note: -b objsize option is valid only in write
117 mode. Note: write and seq must be run on the same host other‐
118 wise the objects created by write will have names that will fail
119 seq.
120
121 cleanup [ --run-name run_name ] [ --prefix prefix ]
122 Clean up a previous benchmark operation. Note: the default
123 run-name is "benchmark_last_metadata"
124
125 listxattr name
126 List all extended attributes of an object.
127
128 getxattr name attr
129 Dump the extended attribute value of attr of an object.
130
131 setxattr name attr value
132 Set the value of attr in the extended attributes of an object.
133
134 rmxattr name attr
135 Remove attr from the extended attributes of an object.
136
137 stat name
138 Get stat (ie. mtime, size) of given object
139
140 stat2 name
141 Get stat (similar to stat, but with high precision time) of
142 given object
143
144 listomapkeys name
145 List all the keys stored in the object map of object name.
146
147 listomapvals name
148 List all key/value pairs stored in the object map of object
149 name. The values are dumped in hexadecimal.
150
151 getomapval [ --omap-key-file file ] name key [ out-file ]
152 Dump the hexadecimal value of key in the object map of object
153 name. If the optional out-file argument is not provided, the
154 value will be written to standard output.
155
156 setomapval [ --omap-key-file file ] name key [ value ]
157 Set the value of key in the object map of object name. If the
158 optional value argument is not provided, the value will be read
159 from standard input.
160
161 rmomapkey [ --omap-key-file file ] name key
162 Remove key from the object map of object name.
163
164 getomapheader name
165 Dump the hexadecimal value of the object map header of object
166 name.
167
168 setomapheader name value
169 Set the value of the object map header of object name.
170
171 export filename
172 Serialize pool contents to a file or standard output.n"
173
174 import [--dry-run] [--no-overwrite] < filename | - >
175 Load pool contents from a file or standard input
176
178 To view cluster utilization:
179
180 rados df
181
182 To get a list object in pool foo sent to stdout:
183
184 rados -p foo ls -
185
186 To write an object:
187
188 rados -p foo put myobject blah.txt
189
190 To create a snapshot:
191
192 rados -p foo mksnap mysnap
193
194 To delete the object:
195
196 rados -p foo rm myobject
197
198 To read a previously snapshotted version of an object:
199
200 rados -p foo -s mysnap get myobject blah.txt.old
201
202 To list inconsistent objects in PG 0.6:
203
204 rados list-inconsistent-obj 0.6 --format=json-pretty
205
207 rados is part of Ceph, a massively scalable, open-source, distributed
208 storage system. Please refer to the Ceph documentation at
209 http://ceph.com/docs for more information.
210
212 ceph(8)
213
215 2010-2014, Inktank Storage, Inc. and contributors. Licensed under Cre‐
216 ative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)
217
218
219
220
221dev Apr 29, 2019 RADOS(8)