1nbdkit-pattern-plugin(1)            NBDKIT            nbdkit-pattern-plugin(1)
2
3
4

NAME

6       nbdkit-pattern-plugin - plugin to serve a fixed pattern of data for
7       testing
8

SYNOPSIS

10        nbdkit pattern [size=]SIZE
11

DESCRIPTION

13       "nbdkit-pattern-plugin" is a plugin for nbdkit(1) which serves a fixed
14       pattern of data, read only.  This is used for testing nbdkit filters
15       and NBD clients.
16
17       The fixed pattern is the offset, as a 64 bit big endian integer, every
18       8 bytes.  In hexadecimal this looks like:
19
20        offset                         data
21         0000:   00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 08
22         0010:   00 00 00 00 00 00 00 10   00 00 00 00 00 00 00 18
23         0020:   00 00 00 00 00 00 00 20   00 00 00 00 00 00 00 28
24                                         ↗ └──────────┬──────────┘
25                     byte at offset 0x28              │
26
27                                            64 bit big endian int
28                                            encoding offset 0x28
29
30       The size of the virtual disk must be specified using the "size"
31       parameter.  If the size is not a multiple of 8 then the last 8 byte
32       offset in the pattern is truncated.
33
34   Largest possible size
35       nbdkit itself limits plugins to 2⁶³-1 bytes
36       (decimal: 9223372036854775807, hexadecimal: 0x7fff_ffff_ffff_ffff).
37
38       To test if NBD clients are free of bugs (not to mention nbdkit itself)
39       you can use:
40
41        nbdkit pattern 9223372036854775807
42
43       Note this is too large for qemu to open.
44

PARAMETERS

46       [size=]SIZE
47           Specify the virtual size of the disk image.
48
49           This parameter is required.
50
51           "size=" is a magic config key and may be omitted in most cases.
52           See "Magic parameters" in nbdkit(1).
53

FILES

55       $plugindir/nbdkit-pattern-plugin.so
56           The plugin.
57
58           Use "nbdkit --dump-config" to find the location of $plugindir.
59

VERSION

61       "nbdkit-pattern-plugin" first appeared in nbdkit 1.6.
62

SEE ALSO

64       nbdkit(1), nbdkit-plugin(3), nbdkit-data-plugin(1),
65       nbdkit-full-plugin(1), nbdkit-null-plugin(1), nbdkit-offset-filter(1),
66       nbdkit-random-plugin(1), nbdkit-zero-plugin(1).
67

AUTHORS

69       Richard W.M. Jones
70
72       Copyright (C) 2018 Red Hat Inc.
73

LICENSE

75       Redistribution and use in source and binary forms, with or without
76       modification, are permitted provided that the following conditions are
77       met:
78
79       ·   Redistributions of source code must retain the above copyright
80           notice, this list of conditions and the following disclaimer.
81
82       ·   Redistributions in binary form must reproduce the above copyright
83           notice, this list of conditions and the following disclaimer in the
84           documentation and/or other materials provided with the
85           distribution.
86
87       ·   Neither the name of Red Hat nor the names of its contributors may
88           be used to endorse or promote products derived from this software
89           without specific prior written permission.
90
91       THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND ANY
92       EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
93       IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
94       PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR CONTRIBUTORS BE
95       LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
96       CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
97       SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
98       BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
99       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
100       OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
101       ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
102
103
104
105nbdkit-1.18.4                     2020-04-16          nbdkit-pattern-plugin(1)
Impressum