$plugindir/nbdkit-random-plugin.so
The plugin.
Use "nbdkit --dump-config" to find the location of $plugindir.
Plugin to serve random data
nbdkit random
[size=]
SIZE
[seed=SEED]
"nbdkit-random-plugin" is a plugin for 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 nbdkit-sparse-random-plugin(1). For a plugin containing a predictable test pattern see nbdkit-pattern-plugin(1).
The size of the virtual disk must be specified using the "size" parameter. If you specify the "seed" parameter then you will get the same random data over multiple runs with the same seed.
The random data is generated using an insecure method.
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"'
"qemu-img convert" could be used in place of nbdcopy. See also nbdkit-checkwrite-filter(1).
size=]SIZESpecify the virtual size of the disk image.
This parameter is required.
"size=" prefix may be omitted in most cases. See "Magic parameters" in nbdkit(1).
seed=SEEDSpecify the random seed to get repeatable data over multiple runs.
If not specified then a random seed is chosen.
$plugindir/nbdkit-random-plugin.so
The plugin.
Use "nbdkit --dump-config" to find the location of $plugindir.
"nbdkit-random-plugin" first appeared in nbdkit 1.4.
4 releases since Debian 10 (Buster); the text changed 3 times.