|
NAMEnbdkit - which parts of the NBD protocol nbdkit supportsSYNOPSISnbdkit [-n|--newstyle] [--mask-handshake MASK] [--no-sr] [-o|--oldstyle] [-e|--exportname EXPORTNAME] [...] DESCRIPTIONThis page documents the level of support in nbdkit for various parts of the NBD protocol.NEW STYLE VS OLD STYLE PROTOCOLThe NBD protocol comes in two incompatible forms that we call "oldstyle" and "newstyle". Unfortunately which protocol you should use depends on the client and cannot be known in advance, nor can it be negotiated from the server side.nbdkit defaults to the newstyle protocol since nbdkit ≥ 1.3. The newstyle protocol is better in every respect than the oldstyle protocol and you should prefer it if possible. The newstyle protocol also includes an extension where a client may request structured replies for even more capabilities, such as sparse reads or obtaining block status. By default, nbdkit advertises as many features as it can support (in some cases, this can be limited by what callbacks the plugin handles), even if the client does not negotiate to use all advertised features. Use the -e or --exportname flag to set the optional exportname for the newstyle protocol. Nbdkit also includes some options that are useful mainly when performing integration tests, for proving whether clients have sane fallback behavior when dealing various older servers permitted by the NBD protocol. Use the --no-sr flag to force the newstyle protocol to decline any client request for structured replies. Use the --mask-handshake parameter to mask off particular global features which are advertised during new-style handshake (defaulting to all supported bits set). Clearing bit 0 (the low order bit) limits a client to using just "NBD_OPT_EXPORT_NAME" (and is incompatible with TLS or structured replies); clearing bit 1 causes the handshake to send more padding bytes in response to "NBD_OPT_EXPORT_NAME". Other bits in the mask will only have an effect if the NBD protocol is extended in the future to define other global bits. Use the -o or --oldstyle flag to force the oldstyle protocol. In this mode, --no-sr and --mask-handshake have no effect. Common clients and the protocol they requireClient Protocol ------------------------------------------------------------ qemu <= 2.5 without exportname oldstyle qemu <= 2.5 with exportname newstyle qemu >= 2.6 client can talk either protocol qemu >= 2.11 client tries structured replies nbd-client < 3.10 client can talk either protocol nbd-client >= 3.10 newstyle, no structured replies any TLS (encrypted) client newstyle nbdkit nbd plugin client can talk either protocol nbdkit >= 1.13.3 nbd plugin tries structured replies libnbd either protocol, tries structured replies Errors seen if using the wrong protocolIf you use qemu ≤ 2.5 without the exportname field against a newstyle server, it will give the error:Server requires an export name If you use qemu ≤ 2.5 with the exportname field against an oldstyle server, it will give the error: Server does not support export names If you use the oldstyle protocol with nbd-client ≥ 3.10, it will give the error: Error: It looks like you're trying to connect to an oldstyle server. NBD protocol and port numberPort 10809/tcp is reserved by IANA for the NBD protocol, but you can use nbdkit on any port or on Unix domain sockets.The NBD protocol specification claims that you should always use newstyle when using port 10809, and use oldstyle on all other ports, but this claim is not based on the reality of what NBD servers do, and nbdkit does not require or encourage this. NBD PROTOCOL FEATURES SUPPORTED BY NBDKIT
SEE ALSOnbdkit(1), https://github.com/NetworkBlockDevice/nbd/blob/master/doc/proto.md, https://nbd.sourceforge.io/.AUTHORSEric BlakeRichard W.M. Jones Pino Toscano COPYRIGHTCopyright (C) 2013-2020 Red Hat Inc.LICENSERedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
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. 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.
Visit the GSP FreeBSD Man Page Interface. |