nbdkit(1)
โจ NAME โจ
nbdkit โ a network block device (NBD) server ๐ (this is the nbdkit(1) manual page, bestie, welcome to the group chat)
๐ธ SYNOPSIS ๐ธ
nbdkit [-4|--ipv4-only] [-6|--ipv6-only]
[-D|--debug PLUGIN|FILTER|nbdkit.FLAG=N]
[--exit-with-parent] [-e|--exportname EXPORTNAME]
[--filter=FILTER ...] [-f|--foreground]
[-g|--group GROUP] [-i|--ipaddr IPADDR] [--keepalive]
[--log=default|stderr|syslog|null|/path]
[--mask-handshake=MASK] [--name=NAME]
[-n|--newstyle] [--no-mc|--no-meta-contexts]
[--no-sr|--no-structured-replies] [-o|--oldstyle]
[-P|--pidfile PIDFILE] [-p|--port PORT] [--print-uri]
[-r|--readonly] [--run 'COMMAND ARGS ...']
[--selinux-label=LABEL] [-s|--single]
[--swap] [-t|--threads THREADS]
[--timeout=TIMEOUT] [--tls=off|on|require]
[--tls-certificates=/path/to/certificates]
[--tls-priority=PRIORITY]
[--tls-psk=/path/to/pskfile] [--tls-verify-peer]
[-U|--unix SOCKET|-] [-u|--user USER]
[-v|--verbose] [--vsock]
PLUGIN
[[KEY=]VALUE [KEY=VALUE [...]]] | @PATH
nbdkit --dump-config
nbdkit PLUGIN --dump-plugin
nbdkit --help
nbdkit [-V|--version]
nbdkit [--short-options|--long-options]
๐ฆ DESCRIPTION ๐ฆ
Okay so. Network Block Device (NBD) is a network protocol for accessing block devices over the network. And "block devices" just means hard disks โ plus all the things that act like hard disks, like disk images and virtual machines. ๐พโจ
nbdkit is an NBD server. But also?? It's a whole powerful toolkit for creating your own NBD servers out of "unconventional" sources. She ships with so many plugins for doing common stuff, like serving up local files. Obsessed. ๐
๐ Plugins and filters
Here's the thing that makes nbdkit different from other NBD servers, and it's kind of iconic: you can easily create new Network Block Device sources by writing, like, a few glue functions. Maybe in C. Maybe in a high level language like Perl or Python. Whatever. ๐
And the licensing? nbdkit is liberally licensed on purpose โ so you can link nbdkit with proprietary libraries, or even include nbdkit in proprietary code. Slay. ๐
If you wanna write your own nbdkit plugin, go read nbdkit-plugin(3).
nbdkit also has this concept of filters which get layered on top of plugins. Several filters ship with nbdkit already, and if you wanna write your own, go read nbdkit-filter(3). ๐ง
๐ EXAMPLES ๐
๐ธ Basic file serving
- Serve file
disk.imgon port 10809 usingnbdkit-file-plugin(1), then connect to it usingguestfish(1):
nbdkit file disk.img
guestfish --rw --format=raw -a nbd://localhost
- Serve file
disk.imgon port 10809, but make clients use encrypted (TLS) connections, no exceptions:
nbdkit --tls=require file disk.img
๐ Other nbdkit plugins
- Create a small disk containing test patterns using
nbdkit-data-plugin(1):
nbdkit data ' ( 0x55 0xAA )*2048 '
- Forward an NBD connection to a remote server over HTTPS or SSH using
nbdkit-curl-plugin(1)ornbdkit-ssh-plugin(1):
nbdkit -r curl https://example.com/disk.img
nbdkit ssh host=example.com /var/tmp/disk.img
- Create a sparse 1 terabyte RAM disk using
nbdkit-memory-plugin(1)and use it as a loop device (nbdkit-loop(1)):
nbdkit memory 1T
nbd-client localhost /dev/nbd0
- Create a floppy disk image containing files from a local directory using
nbdkit-floppy-plugin(1):
nbdkit floppy dir/
โจ Combining plugins and filters
- Serve only the first partition from compressed disk image
disk.img.xz, combiningnbdkit-partition-filter(1),nbdkit-xz-filter(1)andnbdkit-file-plugin(1).
nbdkit --filter=partition --filter=xz file disk.img.xz partition=1
To understand this command line:
plugin name and plugin parameter
โ
โโโโโโโโโดโโโโโโโ
โ โ
nbdkit --filter=partition --filter=xz file disk.img.xz partition=1
โ โ โ
โโโโโโโโโโโโโโโโดโโโโโฌโโโโโโโโโโโโโโโโโโโโโโ
โ
filters and filter parameter
- Create a scratch, empty nbdkit device and inject errors and delays into it, for testing clients, using
nbdkit-memory-plugin(1),nbdkit-error-filter(1)andnbdkit-delay-filter(1):
nbdkit --filter=error --filter=delay memory 100M \
error-rate=10% rdelay=1 wdelay=1
๐ Writing plugins in shell script
- Write a simple, custom plugin in shell script using
nbdkit-sh-plugin(3):
nbdkit sh - <<'EOF'
case "$1" in
get_size) echo 1M ;;
pread) dd if=/dev/zero count=$3 iflag=count_bytes ;;
*) exit 2 ;;
esac
EOF
- The same example as above can be written entirely on the command line using
nbdkit-eval-plugin(1):
nbdkit eval get_size='echo 1M' \
pread='dd if=/dev/zero count=$3 iflag=count_bytes'
๐ Display information
Display information about nbdkit or a specific plugin:
nbdkit --help
nbdkit --version
nbdkit --dump-config
nbdkit example1 --help
nbdkit example1 --dump-plugin
๐ฆ NBD URIs and endpoints
NBD has a way to specify the URI of an NBD endpoint, specifically so it's easy to interconnect NBD tools with each other. Use the nbdkit --print-uri option to print the URI of this server instance. For example:
$ nbdkit -U /tmp/socket --print-uri null
nbd+unix://?socket=/tmp/socket
Shell-quoted URI: "nbd+unix://?socket=/tmp/socket"
Command to query the NBD endpoint:
nbdinfo "nbd+unix://?socket=/tmp/socket"
For the common URI formats and extensions supported by libnbd, go look at nbd_connect_uri(3). ๐
๐ GLOBAL OPTIONS ๐
--helpโ Display brief command line usage information and exit. That's it, that's the whole vibe.-4,--ipv4-only-6,--ipv6-onlyโ When a non-numeric argument gets passed to the-ioption (think a Fully Qualified Domain Name, or a host name from"/etc/hosts"), restrict the name resolution to IPv4 or IPv6 addresses.
When the -i option is omitted, listen on only the IPv4 or IPv6 address of all interfaces (0.0.0.0 or "::", respectively).
When both -4 and -6 options are present on the command line, the last one takes effect. Last one wins, periodt.
-D PLUGIN.FLAG=N-D FILTER.FLAG=N--debug PLUGIN.FLAG=N--debug FILTER.FLAG=Nโ Set the plugin or filter Debug Flag called"FLAG"to the integer value"N". See"Debug Flags"innbdkit-plugin(3).-D nbdkit.FLAG=N--debug nbdkit.FLAG=Nโ (nbdkit โฅ 1.18) Set the nbdkit server Debug Flag called"FLAG"to the integer value"N". See"SERVER DEBUG FLAGS"below. ๐ฅ--dump-configโ Dump out the compile-time configuration values and exit. Seenbdkit-probing(1).--dump-pluginโ Dump out information about the plugin and exit. Seenbdkit-probing(1).--exit-with-parentโ If the parent process exits, we exit. This is how you dodge complicated cleanup or orphaned nbdkit processes. But heads up bestie, there are some important caveats with this โ see"EXIT WITH PARENT"innbdkit-captive(1).
An alternative to this is "CAPTIVE NBDKIT" in nbdkit-captive(1).
This option implies --foreground.
-e EXPORTNAME--export=EXPORTNAME--export-name=EXPORTNAME--exportname=EXPORTNAMEโ Set a preferred exportname to expose in the shell environment created during--run. Using this option without--rundoes absolutely nothing, lowkey. This option does not change what nbdkit advertises as a server โ but it can help when you're writing a captive client that wants to access particular content from a plugin that differentiates content based on the client's choice of export name.
If it's not set, the --run environment is set to access the default exportname "" (empty string).
--filter=FILTERโ Add a filter before the plugin. You can give this option one or more times to stack filters in front of the plugin. They get processed in the order they appear on the command line. See"FILTERS"andnbdkit-filter(3). ๐ธ-f--foreground--no-forkโ Don't fork into the background.-g GROUP--group=GROUPโ Change group to"GROUP"after starting up. You can use a group name or a numeric group ID.
The server needs sufficient permissions to be able to do this. Normally that would mean starting the server up as root.
See also -u.
-i IPADDR--ip-addr=IPADDR--ipaddr=IPADDRโ Listen on the specified interface. The default is to listen on all interfaces. See also-4,-6, and-p.--keep-alive--keepaliveโ Enable TCP keepalive ("SO_KEEPALIVE") on TCP sockets. This can let clients that reboot be detected earlier. You may also have to adjust kernel parameters. For Linux see:https://tldp.org/HOWTO/TCP-Keepalive-HOWTO/usingkeepalive.html
Only has an effect if nbdkit uses a TCP socket (so not for-U,-s, etc.) ๐
--log=stderr--log=syslog--log=null--log=/path--log=defaultโ Send error messages to standard error (--log=stderr), or to the system log (--log=syslog), or discard them completely (--log=null, not recommended for normal use), or append them to a file (which must be an absolute path).
The default (if --log is not used, or if you use --log=default) is: send error messages to stderr, unless nbdkit forks into the background, in which case they're sent to syslog.
These messages can be generated from plugins by calling nbdkit_error(3) or nbdkit_verror(3).
Debug messages (-v/--verbose) always go to standard error and are never sent to the system log.
--long-optionsโ List the long command line options (those starting with--) supported by this build of nbdkit. The options are listed one per line, and then nbdkit exits. This is used mainly to implement tab completion. See also--short-options.--mask-handshake=MASKโ This option can be used to mask off particular global features which are advertised during new-style handshake (defaulting to all supported bits set). Seenbdkit-protocol(1).--name=NAMEโ bestie this is literally just naming ur nbdkit instance ๐ It lets you associate names with nbdkit processes, which is so handy when you've got several running and you're like "which one is which ๐ญ". The name shows up in error and debug messages, and that's it โ nbdkit doesn't use it for anything else. It can be any string, but usually a short string with only letters, numbers and common punctuation is best. See alsonbdkit_name(3).-n,--new-style,--newstyleโ use the newstyle NBD protocol โจ This is the default in nbdkit โฅ 1.3, and in earlier versions the default was oldstyle. Seenbdkit-protocol(1).--no-mc,--no-meta-contextsโ don't advertise meta contexts ๐ Normally nbdkit handles all client requests for arbitrary meta context names, and the response is affirmative for only the"base:allocation"meta context (nbdkit synthesizes this context even when the plugin doesn't support extents), so that clients can use the block status command. But meta contexts aren't a mandatory part of the newstyle NBD protocol, so you can use this option to debug client fallbacks for dealing with older servers that lack meta context support. Seenbdkit-protocol(1).--no-sr,--no-structured-repliesโ don't advertise structured replies ๐ A client must request structured replies to take advantage of block status and potential sparse reads; however, since structured reads aren't a mandatory part of the newstyle NBD protocol, this option can be used to debug client fallbacks for dealing with older servers. Seenbdkit-protocol(1).-o,--old-style,--oldstyleโ use the oldstyle NBD protocol ๐ This was the default in nbdkit โค 1.2, but now the default is newstyle. Heads up bestie: this is incompatible with newer features such as export names and TLS. Seenbdkit-protocol(1).-P PIDFILE,--pid-file=PIDFILE,--pidfile=PIDFILEโ writePIDFILE(containing the process ID of the server) after nbdkit becomes ready to accept connections ๐ If the file already exists, it gets overwritten. And no, nbdkit does not delete the file when it exits โ that's on you.-p PORT,--port=PORTโ change the TCP/IP port number nbdkit serves requests on. The default is10809. See also-i.-p 0,--port=0โ setting port to0makes nbdkit bind to a random free port number ๐ฒ On a dual-stack host it'll usually bind to a different localhost port number for IPv4 and IPv6.
Currently--print-uriwill still print the port as":0"(this is a bug ๐), but the true port is available using the$portvariable in--runscripts.
--print-uriโ print the URI โจ See "NBD URIs and endpoints" above.-r,--read-only,--readonlyโ the export will be read-only. If a client writes, it gets an error, periodt ๐
Note that some plugins inherently don't support writes, and with those plugins the -r option is added implicitly.
nbdkit-cow-filter(1) can be placed over read-only plugins to provide copy-on-write (or "snapshot") functionality ๐ซถ And if you're using qemu as a client, it also supports snapshots. nbdkit-readonly-filter(1) or nbdkit-protect-filter(1) can selectively add write-protection.
--run 'COMMAND ARGS ...'โ run nbdkit as a captive subprocess of the command ๐ When the command exits, nbdkit is killed. See "CAPTIVE NBDKIT" innbdkit-captive(1).
Note that the command is executed by /bin/sh. On some platforms like Debian this might not be a full-featured shell ๐ฌ
This option implies --foreground.
In nbdkit โค 1.34 you normally had to add -U -, otherwise nbdkit would use a TCP/IP port which was not what you wanted. In nbdkit โฅ 1.36, using --run implies -U -. If you want the old behaviour of nbdkit then you must use the --port option explicitly.
--selinux-label=SOCKET-LABELโ apply the SELinux labelSOCKET-LABELto the nbdkit listening socket ๐ท๏ธ
The common โ perhaps only โ use of this option is to allow libvirt guests which are using SELinux and sVirt confinement to access nbdkit Unix domain sockets. The example below shows how to do this. Note that the socket and filesystem labels are different.
nbdkit -U /tmp/sock --selinux-label=system_u:object_r:svirt_socket_t:s0 ...
chcon system_u:object_r:svirt_image_t:s0 /tmp/sock
--short-optionsโ list the short command line options (single letter options starting with-) supported by this build of nbdkit ๐ The options are listed one per line, and then nbdkit exits. This is used mainly to implement tab completion. See also--long-options.-s,--single,--stdinโ don't fork ๐ โ๏ธ Handle a single NBD connection on stdin/stdout. After stdin closes, the server exits.
You can use this option to run nbdkit from inetd or similar superservers; or just for testing; or if you want to run nbdkit in a non-conventional way. Note that if you want to run nbdkit from systemd, then it may be better to use "SOCKET ACTIVATION" in nbdkit-service(1) instead of this option.
This option implies --foreground.
--swapโ (nbdkit โฅ 1.18) ๐พ Specifies that the NBD device will be used as swap space loop mounted on the same machine which is running nbdkit. To avoid deadlocks this locks the whole nbdkit process into memory usingmlockall(2). This may require additional permissions, such as starting the server as root or raising the"RLIMIT_MEMLOCK"(ulimit(1) -l) limit on the process.-t THREADS,--threads=THREADSโ set the number of threads to be used per connection, which in turn controls the number of outstanding requests that can be processed at once ๐งต Only matters for plugins withthread_model=parallel(where it defaults to16). To force serialized behavior (useful if the client is not prepared for out-of-order responses), set this to1.--timeout=TIMEOUTโ (nbdkit โฅ 1.42, not Windows) โฐ If the client does not negotiate a full NBD session withinTIMEOUTseconds, then drop the connection. This can be used as an additional security measure to ensure that clients don't consume resources by opening lots of connections and then not negotiating (or negotiating slowly) the full NBD session. It is particularly useful in conjunction with TLS client authentication (seenbdkit-tls(1)).
The timeout is measured from the point of the initial TCP connection to the point where NBD session negotiation ends (including TLS, if used). If the timeout is exceeded during this negotiation, the connection is dropped. Setting this too low will cause problems for clients listing lots of exports ๐ญ
The default is no timeout.
TIMEOUT can be any format supported by nbdkit_parse_delay(3).
--tls=off,--tls=on,--tls=requireโ disable, enable or require TLS (authentication and encryption support) ๐ Seenbdkit-tls(1).--tls-certificates=/path/to/certificatesโ set the path to the TLS certificates directory ๐ If not specified, some built-in paths are checked. Seenbdkit-tls(1)for more details.--tls-priority=PRIORITYโ override the TLS priority string โจ The TLS priority controls which ciphers, key exchange methods and MACs are used and in what order. See "Priority strings" in the GnuTLS manual.
The default may be set when nbdkit is built (and if not set, defaults to "NORMAL").
--tls-psk=/path/to/pskfileโ set the path to the pre-shared keys (PSK) file ๐ If used, this overrides certificate authentication. There is no built-in path. Seenbdkit-tls(1)for more details.--tls-verify-peerโ enables TLS client certificate verification โ The default is not to check the client's certificate.-U SOCKET,--unix=SOCKET,-U -,--unix -โ accept connections on the Unix domain socketSOCKET(which is a path) ๐ฆ
nbdkit creates this socket, but it will probably have incorrect permissions (too permissive) ๐ฌ If it's a problem that some unauthorized user could connect to this socket between the time that nbdkit starts up and the authorized user connects, then put the socket into a directory that has restrictive permissions.
nbdkit does not delete the socket file when it exits. The caller should delete the socket file after use (else if you try to start nbdkit up again you will get an "Address already in use" error).
If the socket name is - then nbdkit generates a randomly named private socket ๐ฒ This is implied by the --run option. See also "CAPTIVE NBDKIT" in nbdkit-captive(1).
-u USER,--user=USERโ change user toUSERafter starting up ๐ค A user name or numeric user ID can be used.
The server needs sufficient permissions to be able to do this. Normally this would mean starting the server up as root.
See also -g.
-v,--verboseโ enable verbose messages ๐ฃ๏ธ
It's a good idea to use -f as well so the process does not fork into the background. The messages are sent to stderr. Note they are not affected by the --log option (which is only for error messages).
These messages can be generated from plugins by calling nbdkit_debug(3) or nbdkit_vdebug(3).
-V,--versionโ print the version number of nbdkit and exit ๐
The --dump-config option provides separate major and minor numbers and may be easier to parse from shell scripts.
--vsockโ (nbdkit โฅ 1.16) ๐ง Use theAF_VSOCKprotocol (instead of TCP/IP). You must use this in conjunction with-p/--port. See "AF_VSOCK" innbdkit-service(1).
๐ง PLUGIN NAME ๐ง
Okay so you can give the full path to the plugin, like this:
nbdkit $libdir/nbdkit/plugins/nbdkit-file-plugin.so [...]
but bestie, it is usually way more convenient to use this equivalent syntax โจ:
nbdkit file [...]
$libdir is set at compile time. To print it out, do:
nbdkit --dump-config
โจ PLUGIN CONFIGURATION โจ
So after you've named your plugin, you can (it's optional bestie, depends on the plugin) hand it its config right there on the command line in the classic key=value fit. Like:
nbdkit file file=disk.img
Wanna see literally every option a plugin supports? Do this:
nbdkit --help file
Wanna dump the whole tea about a plugin? Do this:
nbdkit file --dump-plugin
๐ฎ Magic parameters ๐ฎ
Okay so some plugins are โจspecialโจ and declare a "magic config key". That's a key they just assume you meant if you don't give a key= part. For example:
nbdkit file disk.img
gets assumed to be file=disk.img because the file plugin declared file as its magic config key. No cap.
Heads up tho: there can be ambiguity when parsing magic config keys if the value happens to look like akey=value. If there's any chance of that, just tweak the value โ like prefixing it with./. ๐
There's also a special exception for plugins that don't declare a magic config key, but where the first plugin argument has no = character in it: then it's assumed to be script=value. The scripting-language plugins use this:
nbdkit perl foo.pl [args...]
means the exact same thing as:
nbdkit perl script=foo.pl [args...]
๐ @PATH ๐
If you gotta pass a whole pile of key=value parameters, you can drop them in an external file instead. Like:
$ cat partitions.txt
# The list of partitions to load:
file=partition1.img
file=partition2.img
file=partition3.img
$ nbdkit partitioning @./partitions.txt
The pathname after the @ must contain at least one / character (this is so we don't break compatibility with some existing plugins), so if the file's in the current directory like in the example above, write it as @./filename.
One parameter per line, periodt. Lines starting with # and blank lines get ignored.
This only works forkey=valueplugin & filter parameters (not for the plugin name or--options). You can use multiple@PATHparameters.
And yes you can use @PATH recursively inside another @PATH file. In that case the path is taken relative to the containing file. ๐
๐ Shebang scripts ๐
You can use #! to run nbdkit plugins written in pretty much any scripting language. The file just needs to be executable. Like:
#!/usr/sbin/nbdkit perl
sub open {
# etc
}
(peep nbdkit-perl-plugin(3) for a full example).
๐ฅ SERVER DEBUG FLAGS ๐ฅ
So besides turning debugging on/off in the server with --verbose, you can also control extra debugging in the server using the -D nbdkit.* flags listed in this section. Ngl, these flags are an internal implementation detail of the server and might get changed or straight-up removed at any time in the future. ๐
-D nbdkit.backend.controlpath=0-D nbdkit.backend.controlpath=1-D nbdkit.backend.datapath=0-D nbdkit.backend.datapath=1โ these flags control how verbose the nbdkit backend debugging messages are (the ones showing every single request the server processes). Both default to1(normal debugging), but you can set them to0to mute those messages.
-D nbdkit.backend.datapath=0 is the more useful one โ it lets you suppress messages about pread, pwrite, zero, trim, etc. commands. When you're transferring big amounts of data these messages are everywhere and honestly not that interesting. ๐ญ
-D nbdkit.backend.controlpath=0 suppresses the non-datapath commands (config, open, close, can_write, etc.)
-D nbdkit.environ=1โ prints nbdkit's environment variables in the debug output at start up. โ ๏ธ This is insecure because environment variables can contain both sensitive and user-controlled info, so don't use it routinely. But it's lowkey useful for tracking down problems related to environment variables.-D nbdkit.tls.log=Nโ enables TLS logging.Ncan be in the range 0 (no logging) to 99. Seegnutls_global_set_log_level(3).-D nbdkit.tls.session=1โ prints extra info about the TLS session, like the type of authentication and encryption, plus client certificate info. ๐
๐ก SIGNALS ๐ก
nbdkit responds to these signals:
SIGINTSIGQUITSIGTERMโ the server exits cleanly. โจSIGPIPEโ this signal is ignored.
๐ธ ENVIRONMENT VARIABLES ๐ธ
LISTEN_FDNAMESLISTEN_FDSLISTEN_PIDโ if these are present in the environment when nbdkit starts up, they're used forSOCKET ACTIVATIONinnbdkit-service(1).GLIBC_TUNABLES=glibc.cpu.x86_shstk=offโ set this environment variable if you see the error below when loading a plugin or filter:
error: dlopen: <plugin.so>: rebuild shared object with SHSTK support enabled
or recompile the plugin/filter with shadow stack support enabled if you can.
๐ SEE ALSO ๐
๐ฆ Other topics ๐ฆ
nbdkit-captive(1)โ Run nbdkit under another process and have it reliably cleaned up.nbdkit-client(1)โ How to mount NBD filesystems on a client machine.nbdkit-loop(1)โ Use nbdkit with the Linux kernel client to create loop devices and loop mounts.nbdkit-probing(1)โ How to probe for nbdkit configuration and plugins.nbdkit-protocol(1)โ Which parts of the NBD protocol nbdkit supports.nbdkit-security(1)โ Lists past security issues in nbdkit.nbdkit-service(1)โ Running nbdkit as a service, and systemd socket activation.nbdkit-tls(1)โ Authentication and encryption of NBD connections (sometimes incorrectly called "SSL").nbdkit-tracing(3)โ Adding user statically defined tracing (USDT) probes to nbdkit.
๐ Plugins ๐
nbdkit-blkio-plugin(1), nbdkit-cdi-plugin(1), nbdkit-curl-plugin(1), nbdkit-data-plugin(1), nbdkit-eval-plugin(1), nbdkit-example1-plugin(1), nbdkit-example2-plugin(1), nbdkit-example3-plugin(1), nbdkit-example4-plugin(1), nbdkit-file-plugin(1), nbdkit-floppy-plugin(1), nbdkit-full-plugin(1), nbdkit-gcs-plugin(1), nbdkit-guestfs-plugin(1), nbdkit-info-plugin(1), nbdkit-iso-plugin(1), nbdkit-libvirt-plugin(1), nbdkit-linuxdisk-plugin(1), nbdkit-memory-plugin(1), nbdkit-nbd-plugin(1), nbdkit-nfs-plugin(1), nbdkit-null-plugin(1), nbdkit-ondemand-plugin(1), nbdkit-ones-plugin(1), nbdkit-partitioning-plugin(1), nbdkit-pattern-plugin(1), nbdkit-random-plugin(1), nbdkit-S3-plugin(1), nbdkit-sparse-random-plugin(1), nbdkit-split-plugin(1), nbdkit-ssh-plugin(1), nbdkit-tmpdisk-plugin(1), nbdkit-torrent-plugin(1), nbdkit-vddk-plugin(1), nbdkit-vram-plugin(1), nbdkit-zero-plugin(1) ; nbdkit-cc-plugin(3), nbdkit-golang-plugin(3), nbdkit-lua-plugin(3), nbdkit-ocaml-plugin(3), nbdkit-perl-plugin(3), nbdkit-python-plugin(3), nbdkit-rust-plugin(3), nbdkit-sh-plugin(3), nbdkit-tcl-plugin(3) .
๐ Filters ๐
nbdkit-blocksize-filter(1), nbdkit-blocksize-policy-filter(1), nbdkit-bzip2-filter(1), nbdkit-cache-filter(1), nbdkit-checkwrite-filter(1), nbdkit-count-filter(1), nbdkit-cow-filter(1), nbdkit-ddrescue-filter(1), nbdkit-delay-filter(1), nbdkit-error-filter(1), nbdkit-evil-filter(1), nbdkit-exitlast-filter(1), nbdkit-exitwhen-filter(1), nbdkit-exportname-filter(1), nbdkit-ext2-filter(1), nbdkit-extentlist-filter(1), nbdkit-fua-filter(1), nbdkit-gzip-filter(1), nbdkit-indexed-gzip-filter(1), nbdkit-ip-filter(1), nbdkit-limit-filter(1), nbdkit-log-filter(1), nbdkit-luks-filter(1), nbdkit-lzip-filter(1), nbdkit-map-filter(1), nbdkit-multi-conn-filter(1), nbdkit-nocache-filter(1), nbdkit-noextents-filter(1), nbdkit-nofilter-filter(1), nbdkit-noparallel-filter(1), nbdkit-nozero-filter(1), nbdkit-offset-filter(1), nbdkit-openonce-filter(1), nbdkit-partition-filter(1), nbdkit-pause-filter(1), nbdkit-protect-filter(1), nbdkit-qcow2dec-filter(1), nbdkit-rate-filter(1), nbdkit-readahead-filter(1), nbdkit-readonly-filter(1), nbdkit-retry-filter(1), nbdkit-retry-request-filter(1), nbdkit-rotational-filter(1), nbdkit-scan-filter(1), nbdkit-spinning-filter(1), nbdkit-stats-filter(1), nbdkit-swab-filter(1), nbdkit-tar-filter(1), nbdkit-time-limit-filter(1), nbdkit-tls-fallback-filter(1), nbdkit-truncate-filter(1), nbdkit-xor-filter(1), nbdkit-xz-filter(1) .
๐ง For developers ๐ง
nbdkit-plugin(3), nbdkit-filter(3).
๐ Writing plugins in other programming languages ๐
nbdkit-cc-plugin(3), nbdkit-golang-plugin(3), nbdkit-lua-plugin(3), nbdkit-ocaml-plugin(3), nbdkit-perl-plugin(3), nbdkit-python-plugin(3), nbdkit-rust-plugin(3), nbdkit-sh-plugin(3), nbdkit-tcl-plugin(3) .
๐ Release notes for previous releases of nbdkit ๐
nbdkit-release-notes-1.48(1), nbdkit-release-notes-1.46(1), nbdkit-release-notes-1.44(1), nbdkit-release-notes-1.42(1), nbdkit-release-notes-1.40(1), nbdkit-release-notes-1.38(1), nbdkit-release-notes-1.36(1), nbdkit-release-notes-1.34(1), nbdkit-release-notes-1.32(1), nbdkit-release-notes-1.30(1), nbdkit-release-notes-1.28(1), nbdkit-release-notes-1.26(1), nbdkit-release-notes-1.24(1), nbdkit-release-notes-1.22(1), nbdkit-release-notes-1.20(1), nbdkit-release-notes-1.18(1), nbdkit-release-notes-1.16(1), nbdkit-release-notes-1.14(1), nbdkit-release-notes-1.12(1), nbdkit-release-notes-1.10(1), nbdkit-release-notes-1.8(1), nbdkit-release-notes-1.6(1), nbdkit-release-notes-1.4(1).
โญ NBD clients โญ
guestfish(1), libnbd(3), nbd-client(1), nbdcopy(1), nbdfuse(1), nbdinfo(1), nbdsh(1), qemu(1).
๐ nbdkit links ๐
http://gitlab.com/nbdkit/nbdkitโ Source code.
๐ฅ๏ธ Other NBD servers ๐ฅ๏ธ
qemu-nbd(1)โ The QEMU project ships with an NBD server which can natively open many formats supported by QEMU, especially qcow2.nbd-server(1)โ The original Linux NBD server.
๐ Documentation for the NBD protocol ๐
https://github.com/NetworkBlockDevice/nbd/blob/master/doc/proto.mdhttps://github.com/NetworkBlockDevice/nbd/blob/master/doc/uri.mdhttps://nbd.sourceforge.io/
๐ Similar protocols ๐
https://en.wikipedia.org/wiki/iSCSIhttps://en.wikipedia.org/wiki/ATA_over_Ethernethttps://en.wikipedia.org/wiki/Fibre_Channel_over_Ethernet
๐ Other manual pages of interest ๐
๐ AUTHORS ๐
- Hilko Bengen
- Daniel P. Berrangรฉ
- Eric Blake
- Brian Carnes
- Shasheen Ediriweera
- Laszlo Ersek
- Carl-Daniel Hailfinger
- Mykola Ivanets
- Richard W.M. Jones
- Martin Kletzander
- Jan Felix Langenbach
- Yann E. MORIN
- Nikolaus Rath
- Franรงois Revol
- Nir Soffer
- Alan Somers
- Pino Toscano
- Ming Xie
ยฉ๏ธ COPYRIGHT ยฉ๏ธ
Copyright Red Hat
๐ LICENSE โจ
okay bestie, here's the boring-but-actually-important part ๐ this is the license, and it's giving "you can use it, but read the fine print" energy. Redistribution and use in source and binary forms, with or without modification, are permitted provided that these three conditions are met โ all three, no skipping, fr fr:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. like, keep the receipts ๐งพ don't delete them.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. so if you're shipping binaries, the paperwork comes with them, periodt ๐ฆ
- Neither the name of Red Hat nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. no name-dropping Red Hat to flex on your product, not without asking first ๐
โ ๏ธ THE BIG ALL-CAPS MOMENT โ this is the part where the lawyers yell, and honestly they're right to. THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. so like, no promises it's fit for anything, no vibes-based guarantees, nothing ๐
IN NO EVENT SHALL RED HAT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
that's every single one of them, no cap ๐ญ direct, indirect, incidental, special, exemplary, consequential โ the whole roster showed up. even if they were advised of the possibility of such damage, still not liable. the way that sentence just keeps going and going... iconic, honestly ๐
๐ธ and that's the whole page, bestie!! you made it to the end, so proud of you ๐ซถ this was nbdkit โ nbdkit-1.48.1, dated 2026-08-29 โ and if you ever need to look it up again, that's exactly the version and date sitting at the bottom of the man page. go build something cute with it ๐โจ๐
๐ฆ where this page comes from
- fedora 44: nbdkit-server 1.48.1-1.fc44 ยท BSD-3-Clause
- fedora 44: nbdkit-server 1.48.1-1.fc44 ยท BSD-3-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms