5 .. index:: Ceph Block Device; RBD Replay
7 RBD Replay is a set of tools for capturing and replaying Rados Block Device
8 (RBD) workloads. To capture an RBD workload, ``lttng-tools`` must be installed
9 on the client, and ``librbd`` on the client must be the v0.87 (Giant) release
10 or later. To replay an RBD workload, ``librbd`` on the client must be the Giant
13 Capture and replay takes three steps:
15 #. Capture the trace. Make sure to capture ``pthread_id`` context::
18 lttng create -o traces librbd
19 lttng enable-event -u 'librbd:*'
20 lttng add-context -u -t pthread_id
22 # run RBD workload here
25 #. Process the trace with `rbd-replay-prep`_::
27 rbd-replay-prep traces/ust/uid/*/* replay.bin
29 #. Replay the trace with `rbd-replay`_. Use read-only until you know
30 it's doing what you want::
32 rbd-replay --read-only replay.bin
34 .. important:: ``rbd-replay`` will destroy data by default. Do not use against
35 an image you wish to keep, unless you use the ``--read-only`` option.
37 The replayed workload does not have to be against the same RBD image or even the
38 same cluster as the captured workload. To account for differences, you may need
39 to use the ``--pool`` and ``--map-image`` options of ``rbd-replay``.
41 .. _rbd-replay: ../../man/8/rbd-replay
42 .. _rbd-replay-prep: ../../man/8/rbd-replay-prep