%{_bindir}/ceph-osdomap-tool
%{_bindir}/ceph-kvstore-tool
%{_mandir}/man8/rbd-replay.8*
+%{_mandir}/man8/rbd-replay-many.8*
%{_bindir}/rbd-replay
+%{_bindir}/rbd-replay-many
%if (0%{?fedora} >= 20 || 0%{?rhel} == 6)
%{_mandir}/man8/rbd-replay-prep.8*
%{_bindir}/rbd-replay-prep
--- /dev/null
+==================================================================================
+ rbd-replay-many -- replay a rados block device (RBD) workload on several clients
+==================================================================================
+
+.. program:: rbd-replay-many
+
+Synopsis
+========
+
+| **rbd-replay-many** [ *options* ] --original-image *name* *host1* [ *host2* [ ... ] ] -- *rbd_replay_args*
+
+
+Description
+===========
+
+**rbd-replay-many** is a utility for replaying a rados block device (RBD) workload on several clients.
+Although all clients use the same workload, they replay against separate images.
+This matches normal use of librbd, where each original client is a VM with its own image.
+
+Configuration and replay files are not automatically copied to clients.
+Replay images must already exist.
+
+
+Options
+=======
+
+.. option:: --original-image name
+
+ Specifies the name (and snap) of the originally traced image.
+ Necessary for correct name mapping.
+
+.. option:: --image-prefix prefix
+
+ Prefix of image names to replay against.
+ Specifying --image-prefix=foo results in clients replaying against foo-0, foo-1, etc.
+ Defaults to the original image name.
+
+.. option:: --exec program
+
+ Path to the rbd-replay executable.
+
+.. option:: --delay seconds
+
+ Delay between starting each client. Defaults to 0.
+
+
+Examples
+========
+
+Typical usage::
+
+ rbd-replay-many host-0 host-1 --original-image=image -- -c ceph.conf replay.bin
+
+This results in the following commands being executed::
+
+ ssh host-0 'rbd-replay' --map-image 'image=image-0' -c ceph.conf replay.bin
+ ssh host-1 'rbd-replay' --map-image 'image=image-1' -c ceph.conf replay.bin
+
+
+Availability
+============
+
+**rbd-replay-many** is part of the Ceph distributed storage system. Please refer to
+the Ceph documentation at http://ceph.com/docs for more information.
+
+
+See also
+========
+
+:doc:`rbd-replay <rbd-replay>`\(8),
+:doc:`rbd <rbd>`\(8)
ceph-post-file.8 \
rbd-fuse.8 \
rbd-replay.8 \
+ rbd-replay-many.8 \
rbd-replay-prep.8
--- /dev/null
+.\" Man page generated from reStructuredText.
+.
+.TH "RBD-REPLAY-MANY" "8" "September 04, 2014" "dev" "Ceph"
+.SH NAME
+rbd-replay-many \- replay a rados block device (RBD) workload on several clients
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.nf
+\fBrbd\-replay\-many\fP [ \fIoptions\fP ] \-\-original\-image \fIname\fP \fIhost1\fP [ \fIhost2\fP [ ... ] ] \-\- \fIrbd_replay_args\fP
+.fi
+.sp
+.SH DESCRIPTION
+.sp
+\fBrbd\-replay\-many\fP is a utility for replaying a rados block device (RBD) workload on several clients.
+Although all clients use the same workload, they replay against separate images.
+This matches normal use of librbd, where each original client is a VM with its own image.
+.sp
+Configuration and replay files are not automatically copied to clients.
+Replay images must already exist.
+.SH OPTIONS
+.INDENT 0.0
+.TP
+.B \-\-original\-image name
+Specifies the name (and snap) of the originally traced image.
+Necessary for correct name mapping.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-image\-prefix prefix
+Prefix of image names to replay against.
+Specifying \-\-image\-prefix=foo results in clients replaying against foo\-0, foo\-1, etc.
+Defaults to the original image name.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-exec program
+Path to the rbd\-replay executable.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-delay seconds
+Delay between starting each client. Defaults to 0.
+.UNINDENT
+.SH EXAMPLES
+.sp
+Typical usage:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+rbd\-replay\-many host\-0 host\-1 \-\-original\-image=image \-\- \-c ceph.conf replay.bin
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+This results in the following commands being executed:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+ssh host\-0 \(aqrbd\-replay\(aq \-\-map\-image \(aqimage=image\-0\(aq \-c ceph.conf replay.bin
+ssh host\-1 \(aqrbd\-replay\(aq \-\-map\-image \(aqimage=image\-1\(aq \-c ceph.conf replay.bin
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.SH AVAILABILITY
+.sp
+\fBrbd\-replay\-many\fP is part of the Ceph distributed storage system. Please refer to
+the Ceph documentation at \fI\%http://ceph.com/docs\fP for more information.
+.SH SEE ALSO
+.sp
+\fBrbd\-replay\fP(8),
+\fBrbd\fP(8)
+.SH COPYRIGHT
+2010-2014, Inktank Storage, Inc. and contributors. Licensed under Creative Commons BY-SA
+.\" Generated by docutils manpage writer.
+.
ceph-rest-api \
ceph-crush-location \
mount.fuse.ceph \
+ rbd-replay-many \
rbdmap \
yasm-wrapper
ceph-debugpack \
ceph-rbdnamer \
ceph-post-file \
- ceph-crush-location
+ ceph-crush-location \
+ rbd-replay-many
BUILT_SOURCES += init-ceph
--- /dev/null
+#!/bin/bash
+
+original_image=
+hosts=
+image_prefix=
+prog=rbd-replay
+delay=0
+
+while test -n "$1"; do
+ case "$1" in
+ --original-image)
+ original_image="$2"
+ shift
+ ;;
+ --original-image=*)
+ original_image="${1#--original-image=}"
+ ;;
+ --image-prefix)
+ image_prefix="$2"
+ shift
+ ;;
+ --image-prefix=*)
+ image_prefix="${1#--image-prefix=}"
+ ;;
+ --exec)
+ prog="$2"
+ shift
+ ;;
+ --exec=*)
+ prog="${1#--exec=}"
+ ;;
+ --delay)
+ delay="$2"
+ shift
+ ;;
+ --delay=*)
+ delay="${1#--delay=}"
+ ;;
+ --help|-h)
+ echo "Usage: $0 [options] --original-image=<name> <host1> [<host2> [...]] -- <rbd-replay-args>"
+ echo "Options:"
+ echo " --original-image=name Name (and snap) of the image that was originally traced"
+ echo " --image-prefix=prefix Prefix of the image names to replay against"
+ echo " --exec=program Path to the rbd-replay executable"
+ echo " --delay=seconds Wait <seconds> between starting each replay"
+ exit 0
+ ;;
+ --)
+ # remaining args are passed directly to rbd-replay
+ shift
+ break
+ ;;
+ -*)
+ echo "Unrecognized argument: $1" >&2
+ echo "(If you want to pass an argument directly to rbd-replay, use it after '--'.)" >&2
+ exit 1
+ ;;
+ *)
+ hosts="$hosts $1"
+ ;;
+ esac
+ shift
+done
+
+if test -z "$original_image"; then
+ echo "Specify the original image name with --original-image." >&2
+ exit 1
+fi
+
+if test -z "$hosts"; then
+ echo "No hosts specified." >&2
+ exit 1
+fi
+
+if test -z "$image_prefix"; then
+ image_prefix="$original_image"
+fi
+
+index=0
+for host in $hosts; do
+ echo ssh $host "'$prog'" --map-image "'${original_image}=${image_prefix}-${index}'" "$@"
+ ssh $host "'$prog'" --map-image "'${original_image}=${image_prefix}-${index}'" "$@" &
+ index=$((index + 1))
+ if [ $delay -gt 0 ]; then
+ sleep $delay
+ fi
+done
+wait