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.  To create test disks filled with other repeated
16       patterns use nbdkit-data-plugin(1) instead.
17
18       The fixed pattern is the offset, as a 64 bit big endian integer, every
19       8 bytes.  In hexadecimal this looks like:
20
21        offset                         data
22         0000:   00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 08
23         0010:   00 00 00 00 00 00 00 10   00 00 00 00 00 00 00 18
24         0020:   00 00 00 00 00 00 00 20   00 00 00 00 00 00 00 28
25                                         ↗ └──────────┬──────────┘
26                     byte at offset 0x28              │
27
28                                            64 bit big endian int
29                                            encoding offset 0x28
30
31       The size of the virtual disk must be specified using the "size"
32       parameter.  If the size is not a multiple of 8 then the last 8 byte
33       offset in the pattern is truncated.
34
35   Largest possible size
36       nbdkit itself limits plugins to 2⁶³-1 bytes
37       (decimal: 9223372036854775807, hexadecimal: 0x7fff_ffff_ffff_ffff).
38
39       To test if NBD clients are free of bugs (not to mention nbdkit itself)
40       you can use:
41
42        nbdkit pattern 9223372036854775807
43
44       Note this is too large for qemu to open.
45
46   Little endian pattern
47       To get a little endian pattern instead of big endian apply
48       nbdkit-swab-filter(1) on top of this plugin:
49
50        nbdkit pattern 1G --filter=swab swab-bits=64
51

PARAMETERS

53       [size=]SIZE
54           Specify the virtual size of the disk image.
55
56           This parameter is required.
57
58           "size=" is a magic config key and may be omitted in most cases.
59           See "Magic parameters" in nbdkit(1).
60

FILES

62       $plugindir/nbdkit-pattern-plugin.so
63           The plugin.
64
65           Use "nbdkit --dump-config" to find the location of $plugindir.
66

VERSION

68       "nbdkit-pattern-plugin" first appeared in nbdkit 1.6.
69

SEE ALSO

71       nbdkit(1), nbdkit-plugin(3), nbdkit-data-plugin(1),
72       nbdkit-full-plugin(1), nbdkit-null-plugin(1), nbdkit-offset-filter(1),
73       nbdkit-random-plugin(1), nbdkit-sparse-random-plugin(1),
74       nbdkit-swab-filter(1), nbdkit-zero-plugin(1).
75

AUTHORS

77       Richard W.M. Jones
78
80       Copyright (C) 2018 Red Hat Inc.
81

LICENSE

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