Update Red Hat Copyright Notices
[nbdkit.git] / plugins / random / nbdkit-random-plugin.pod
blob040d86bfca7007d7a4b22202459f9c1bcbe286ea
1 =head1 NAME
3 nbdkit-random-plugin - plugin to serve random data
5 =head1 SYNOPSIS
7  nbdkit random [size=]SIZE [seed=SEED]
9 =head1 DESCRIPTION
11 C<nbdkit-random-plugin> is a plugin for L<nbdkit(1)> which serves
12 random data.  This plugin is mainly good for testing NBD clients.
13 This plugin creates a non-sparse random disk, for a sparse random disk
14 see L<nbdkit-sparse-random-plugin(1)>.
16 The size of the virtual disk must be specified using the C<size>
17 parameter.  If you specify the C<seed> parameter then you will get the
18 same random data over multiple runs with the same seed.
20 The random data is generated using an I<insecure> method.
22 =head2 Writes and testing copying
24 Writing to the disk is possible.  If you do this the plugin will check
25 that what you are writing exactly matches what would be read at the
26 same offset (if not, it returns EIO error).  You can use this to test
27 copying programs by making the source and destination NBD URIs be the
28 same:
30  nbdkit -U - random size=100M --run 'nbdcopy "$uri" "$uri"'
32 C<qemu-img convert> could be used in place of nbdcopy.
33 See also L<nbdkit-checkwrite-filter(1)>.
35 =head1 PARAMETERS
37 =over 4
39 =item [B<size=>]SIZE
41 Specify the virtual size of the disk image.
43 This parameter is required.
45 C<size=> is a magic config key and may be omitted in most cases.
46 See L<nbdkit(1)/Magic parameters>.
48 =item B<seed=>SEED
50 Specify the random seed to get repeatable data over multiple runs.
52 If not specified then a random seed is chosen.
54 =back
56 =head1 FILES
58 =over 4
60 =item F<$plugindir/nbdkit-random-plugin.so>
62 The plugin.
64 Use C<nbdkit --dump-config> to find the location of C<$plugindir>.
66 =back
68 =head1 VERSION
70 C<nbdkit-random-plugin> first appeared in nbdkit 1.4.
72 =head1 SEE ALSO
74 L<nbdkit(1)>,
75 L<nbdkit-plugin(3)>,
76 L<nbdkit-data-plugin(1)>,
77 L<nbdkit-full-plugin(1)>,
78 L<nbdkit-null-plugin(1)>,
79 L<nbdkit-pattern-plugin(1)>,
80 L<nbdkit-sparse-random-plugin(1)>,
81 L<nbdkit-zero-plugin(1)>,
82 L<nbdcopy(1)>,
83 L<qemu-img(1)>.
85 =head1 AUTHORS
87 Richard W.M. Jones
89 =head1 COPYRIGHT
91 Copyright Red Hat