table of contents
XNBD-CLIENT(1) | xNBD Manual | XNBD-CLIENT(1) |
NAME¶
xnbd-client - Connect to a server running xnbd-server(8), to use its exported block device
SYNOPSIS¶
xnbd-client [OPTIONS] [bs=SIZE] [timeout=SECONDS] HOST PORT NBD-DEVICE
xnbd-client [OPTIONS] --connect NBD-DEVICE HOST PORT [HOST PORT ..]
xnbd-client --disconnect NBD-DEVICE
xnbd-client --check NBD-DEVICE
xnbd-client [OPTIONS] --getsize64 HOST PORT [HOST PORT ..]
DESCRIPTION¶
With xnbd-client, you can connect to a server running xnbd-server or xnbd-wrapper, thus using raw diskspace from that server as a block device on the local client.
To do this, support from the Linux Kernel is necessary, in the form of the Network Block Device (NBD). When you have that, either in the kernel, or as a module, you can connect to an NBD server and use its exported file through a block special file with major mode 43.
Long options can also be specified with two leading dashes. Some options are call-compatible to nbd-client(1) as are most behavioural switches. This makes xnbd-client a plug-in replacement for nbd-client.
OPTIONS¶
The following options are supported:
--blocksize SIZE
For compatibility to nbd-client(1) you can also use bs=SIZE.
--check|-c
If the device is connected, xnbd-client will exit with an exit state of 0 and print the PID of the xnbd-client instance that connected it to stdout.
If the device exists but is not connected (i.e. is free for use), xnbd-client will exit with code 2 and not print anything on stdout.
If the device does not exist (for example because the nbd module was not loaded) or if an error occurred, xnbd-client will exit with a positive return code other than 2 and not print anything on stdout, either.
--connect|-C
--disconnect|-d
--getsize64
--exportname NAME
--retry COUNT
--recovery-command COMMAND
--recovery-command-reboot: Invoke the reboot(8) command on unexpected disconnection
--timeout SECONDS
For compatibility to nbd-client(1) you can also use timeout=SECONDS
POSITIONAL ARGUMENTS¶
The following positional options are supported:
HOST
PORT
NBD-DEVICE
You can specify multiple host port tuples. xnbd-client will try to connect to each of them in order until it succeeds to establish a connection to a server.
BUGS¶
The NBD device is known to deadlock when not being used altogether with the deadline scheduler. Make sure to do:
echo deadline > /sys/block/nbd0/queue/scheduler
SEE ALSO¶
xnbd-server(8), xnbd-wrapper(8)
AUTHOR¶
The NBD kernel module and the NBD tools have been written by Pavel Macheck (pavel@ucw.cz) and is now maintained by Paul Clements (Paul.Clements@steeleye.com).
The xNBD userland programs have been written by Takahiro Hirofuchi (t.hirofuchi@aist.go.jp).
This manual page was written by Arno Toell (arno@debian.org) for the Debian GNU/Linux system (but may be used by others). Large parts are verbatim copies of the original nbd-server and nbd-client manual pages written by Wouter Verhelst (wouter@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.
02/12/2014 | xNBD 0.3.0 |