1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
|
=head1 NAME
nbdkit-random-plugin - plugin to serve random data
=head1 SYNOPSIS
nbdkit random [size=]SIZE [seed=SEED]
=head1 DESCRIPTION
C<nbdkit-random-plugin> is a plugin for L<nbdkit(1)> which serves
random data. This plugin is mainly good for testing NBD clients.
This plugin creates a non-sparse random disk, for a sparse random disk
see L<nbdkit-sparse-random-plugin(1)>. For a plugin containing a
predictable test pattern see L<nbdkit-pattern-plugin(1)>.
The size of the virtual disk must be specified using the C<size>
parameter. If you specify the C<seed> parameter then you will get the
same random data over multiple runs with the same seed.
The random data is generated using an I<insecure> method.
=head2 Writes and testing copying
Writing to the disk is possible. If you do this the plugin will check
that what you are writing exactly matches what would be read at the
same offset (if not, it returns EIO error). You can use this to test
copying programs by making the source and destination NBD URIs be the
same:
nbdkit random size=100M --run 'nbdcopy "$uri" "$uri"'
C<qemu-img convert> could be used in place of nbdcopy.
See also L<nbdkit-checkwrite-filter(1)>.
=head1 PARAMETERS
=over 4
=item [B<size=>]SIZE
Specify the virtual size of the disk image.
This parameter is required.
C<size=> __IS_MAGIC__
=item B<seed=>SEED
Specify the random seed to get repeatable data over multiple runs.
If not specified then a random seed is chosen.
=back
=head1 FILES
=over 4
=item F<$plugindir/nbdkit-random-plugin.so>
The plugin.
Use C<nbdkit --dump-config> to find the location of C<$plugindir>.
=back
=head1 VERSION
C<nbdkit-random-plugin> first appeared in nbdkit 1.4.
=head1 SEE ALSO
L<nbdkit(1)>,
L<nbdkit-plugin(3)>,
L<nbdkit-data-plugin(1)>,
L<nbdkit-full-plugin(1)>,
L<nbdkit-null-plugin(1)>,
L<nbdkit-ones-plugin(1)>,
L<nbdkit-pattern-plugin(1)>,
L<nbdkit-sparse-random-plugin(1)>,
L<nbdkit-zero-plugin(1)>,
L<nbdcopy(1)>,
L<qemu-img(1)>.
=head1 AUTHORS
Richard W.M. Jones
=head1 COPYRIGHT
Copyright Red Hat
|