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

NAME

6       nbdkit-memory-plugin - nbdkit virtual memory (RAM disk) plugin
7

SYNOPSIS

9        nbdkit memory size=SIZE
10

DESCRIPTION

12       "nbdkit-memory-plugin" is a plugin for nbdkit(1) which stores a single
13       disk image in virtual memory, and discards it when nbdkit exits.  This
14       plugin can be used for testing or where you don't care about the final
15       content of the disk image.
16
17       All nbdkit clients will see the same disk content, initially all
18       zeroes.
19
20       The disk image is stored in memory using a sparse array.  The allocated
21       parts of the disk image cannot be larger than physical RAM plus swap,
22       less whatever is being used by the rest of the system.  If you want to
23       allocate more space than this use nbdkit-file-plugin(1) backed by a
24       temporary file instead.
25
26       However the virtual size can be as large as you like, up to the maximum
27       supported by nbdkit (2⁶³-1 bytes).  This limit is tested when nbdkit is
28       compiled, and it should work on all platforms and architectures
29       supported by nbdkit.
30
31   Preloading small amounts of data
32       If you want an in-memory disk image preinitialized with a small amount
33       of data specified on the command line, look at nbdkit-data-plugin(1)
34       instead.  Note by "small" this does not mean that the virtual disk
35       image must be small, but that the amount of data initially stored
36       sparsely is small enough to specify on the command line.
37
38   Preloading large amounts of data
39       If you want to preload a large amount of data (eg. a disk image) into
40       the memory plugin, use qemu-img(1):
41
42        $ rm -f pid
43        $ nbdkit -P pid memory size=10G
44
45        # wait for nbdkit to become ready to accept connections:
46        $ while [ ! -f pid ]; do sleep 1; done
47
48        # preload Fedora disk image:
49        $ virt-builder fedora-28 --size=10G
50        $ qemu-img convert -p -n fedora-28.img nbd:localhost:10809
51

PARAMETERS

53       size=SIZE
54           Specify the virtual size of the disk image.
55
56           This parameter is required.
57

SEE ALSO

59       nbdkit(1), nbdkit-plugin(3), nbdkit-data-plugin(1),
60       nbdkit-file-plugin(1).
61

AUTHORS

63       Richard W.M. Jones
64
66       Copyright (C) 2017-2018 Red Hat Inc.
67

LICENSE

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