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