1nbdkit-streaming-plugin(1) NBDKIT nbdkit-streaming-plugin(1)
2
3
4
6 nbdkit-streaming-plugin - nbdkit streaming plugin
7
9 nbdkit streaming pipe=FILENAME [size=SIZE]
10
12 "nbdkit-streaming-plugin" is a plugin for nbdkit(1) that can turn
13 certain kinds of input into a stream.
14
15 If the NBD client opens the NBD port, and writes from the start to the
16 end of the disk without seeking backwards, then this plugin will turn
17 the resulting disk image into a stream of data which is written to the
18 named "pipe" parameter.
19
20 ┌───────────┐
21 client │ nbdkit │ plugin streams
22 writes ──────▶│ streaming │──────▶ data to pipe
23 │ plugin │
24 └───────────┘
25
26 Typical usage is with qemu tools. The following command will not work
27 because the output is a pipe or socket:
28
29 qemu-img convert input -O raw pipe
30
31 However this will work:
32
33 nbdkit -U - streaming pipe=pipe --run '
34 qemu-img convert -n input -O raw $nbd
35 '
36
37 ┌───────────┐ ┌───────────┐
38 reads │ qemu-img │ │ nbdkit │ plugin streams
39 input ──────▶│ convert │──────▶│ streaming │──────▶ data to pipe
40 file │ command │ │ plugin │
41 └───────────┘ ↑└───────────┘
42 Unix domain socket (-U -)
43
44 For use of the --run and -U - options, see nbdkit-captive(1).
45
47 pipe=FILENAME
48 Write to the named pipe or socket. If the pipe or socket does not
49 exist, then it is created (as a named FIFO), otherwise the existing
50 pipe or socket is opened and used.
51
52 This parameter is required.
53
54 size=SIZE
55 Specify the virtual size of the stream.
56
57 This parameter is optional. If not specified, then the virtual
58 disk appears to the client to be very large (effectively infinite).
59 Whether you need to specify this parameter depends on the client.
60 Some clients don't check the size and just write/stream, others do
61 checks or calculations based on the apparent size.
62
64 $plugindir/nbdkit-streaming-plugin.so
65 The plugin.
66
67 Use "nbdkit --dump-config" to find the location of $plugindir.
68
70 "nbdkit-streaming-plugin" first appeared in nbdkit 1.2.
71
73 nbdkit(1), nbdkit-plugin(3).
74
76 Richard W.M. Jones
77
79 Copyright (C) 2014 Red Hat Inc.
80
82 Redistribution and use in source and binary forms, with or without
83 modification, are permitted provided that the following conditions are
84 met:
85
86 · Redistributions of source code must retain the above copyright
87 notice, this list of conditions and the following disclaimer.
88
89 · Redistributions in binary form must reproduce the above copyright
90 notice, this list of conditions and the following disclaimer in the
91 documentation and/or other materials provided with the
92 distribution.
93
94 · Neither the name of Red Hat nor the names of its contributors may
95 be used to endorse or promote products derived from this software
96 without specific prior written permission.
97
98 THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND ANY
99 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
100 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
101 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR CONTRIBUTORS BE
102 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
103 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
104 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
105 BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
106 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
107 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
108 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
109
110
111
112nbdkit-1.16.1 2019-12-03 nbdkit-streaming-plugin(1)