nbdtab (5) - Linux Man Pages
nbdtab: configuration file for nbd-client
/etc/nbdtab - configuration file for nbd-client
This file allows to configure predefined connections for nbd-client. It may contain multiple definitions, one per line, each of which contains four space-separated fields.
To connect a device specified in the nbdtab file, run nbd-client(8) with the short name of that device as the sole argument. It will then look up the required information in nbdtab, and make the connection.
Fields are separated from one another by any number of space or tab characters; records are separated from one another by newline characters. The file may also contain any number of comments, which start with a '#' character and continue until the end of the line or the end of the file, whichever is first.
The file contains the following fields:
- The short name of the device file. That is, it should contain the name of the device without the leading /dev/ part; e.g., it could say nbd0.
- The hostname (in case of a TCP socket) or filename (in case of a unix domain socket) on which the server is listening.
- The name of the export as exported by nbd-server.
- Any extra options. This field is optional (no pun intended), and need not appear in a file if no options are necessary. The options recognized by nbd-client(8) are specified below, in the section "Options". Any unknown options in this field will produce a warning by nbd-client, unless they are prepended by an underscore ('_') character; the underscore is specifically reserved for local use, or for distribution customization.
Every command-line nbd-client option has a corresponding option in the nbdtab file, and vice versa; where this isn't the case, that is a bug.
Individual options in this field should be separated from one another by the comma character.
- bs=block size
The block size for this export. If this option is
not used, the kernel's default will be used
Corresponds to the -b option on the command line.
- port=port number
- The port on which to communicate with the nbd-server. Defaults to the IANA-assigned port for NBD, 10809.
The timeout. If this option is not specified, no
timeout is configured.
Corresponds to the -t option on the command line.
- Persist the connection, using the semantics of the -p command-line option.
- Optimize for swap; -s.
- Use the Socket Direct protocol; -S.
- Use a Unix Domain socket to connect to the server; -u.
The NBD kernel module and the NBD tools were originally written by Pavel Machek (pavel [at] ucw.cz)
The Linux kernel module is now maintained by Paul Clements (Paul.Clements [at] steeleye.com), while the userland tools are maintained by Wouter Verhelst (<wouter [at] debian.org>)
On The Hurd there is a regular translator available to perform the client side of the protocol, and the use of nbd-client is not required. Please see the relevant documentation for more information.
This manual page was written by Wouter Verhelst (<wouter [at] debian.org>). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation.
A simple nbdtab file could look like this:
# swap space, called "swapexport" on the server # optimize for swap, and try to reconnect upon disconnect. nbd0 nbdserver.example.com swapexport swap,persist # other export, called "data" on the server. No options for this one. nbd1 nbdserver.example.com data