.TH "XNBD-CLIENT" "1" .SH "NAME" xnbd-client \(em connect to a server running \fBxnbd-server\fR(8), to use its exported block device .SH "SYNOPSIS" .PP \fBxnbd-client\fR [\-\-blocksize \fISIZE\fR] [\-\-connect] [\-\-exportname \fINAME\fR] [\-\-recovery-command \fICOMMAND\fR] [\-\-recovery-command-reboot \fICOMMAND\fR] [\-\-retry \fICOUNT\fR] [\-\-timeout \fISECONDS\fR] \fINBD-DEVICE\fR [ \fIHOST\fR \fIPORT\fR \&...] .PP \fBxnbd-client\fR [bs=\fISIZE\fR] [timeout=\fISECONDS\fR] \fB\fIHOST\fR \fIPORT\fR \fINBD-DEVICE\fR\fP .PP \fBxnbd-client\fR \-\-disconnect \fINBD-DEVICE\fR .PP \fBxnbd-client\fR \-\-check \fINBD-DEVICE\fR .SH "DESCRIPTION" .PP With \fBxnbd-client\fR, you can connect to a server running \fBxnbd-server\fR or \fBxnbd-wrapper\fR, thus using raw diskspace from that server as a blockdevice on the local client. .PP 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. .PP Long options can also be specified with two leading dashes. Some options are call compatible to \fBnbd-client\fR(1) as are most behavioural switches. This makes xnbd-client a plug-in replacement for nbd-client. .SH "OPTIONS" .PP The following options are supported: .IP "\fB\-\-blocksize \fISIZE\fR\fP" 10 Use the provided value as block size. Default is 1024; allowed values are either 512, 1024, 2048 or 4096. For best results use a block size value of 4096 .IP "" 10 For compatibility to \fBnbd-client\fR(1) you can also use \fBbs=\fISIZE\fR\fP .IP "\fB\-\-check\fP|\fB-c\fP" 10 Check whether the specified nbd device is connected. .IP "" 10 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. .IP "" 10 If the device is not connected or does not exist (for example because the nbd module was not loaded), xnbd-client will exit with an exit state of 1 and not print anything on stdout. .IP "" 10 If an error occurred, xnbd-client will exit with an exit state of 2, and not print anything on stdout either. .IP "\fB\-\-connect\fP|\fB-C\fP" 10 Connect to the nbd-server .IP "\fB\-\-disconnect\fP|\fB-d\fP" 10 Disconnect the specified nbd device from the server. Terminates execution with an exit state of 0 on success. .IP "\fB\-\-exportname\fP \fINAME\fR" 10 If the server supports to access devices by an identifier, use \fINAME\fR to request access to a particular volume. This command is useful in combination with a \fBxnbd-wrapper\fR and only succeeds, if the remote host is exporting the requested device. .IP "\fB\-\-retry \fICOUNT\fR\fP" 10 Try up to "\fICOUNT\fR" times to connect to the associated nbd-server. Default is 1, that is nbd-client will stop after the first unsuccessful try. .IP "\fB\-\-recovery-command\fP" 10 invoke a specified command "\fICOMMAND\fR" on unexpected disconnection .IP "\fB\-\-recovery-command-reboot\fP" 10 Invoke the \fBreboot\fR(8) command on unexpected disconnection .IP "\fB\-\-timeout\fP \fISECONDS\fR" 10 Use a timeout period (default is 0 which means not to use a timeout). Please do not use this option for now, as it seems not to work due to a bug in the kernel module. .IP "" 10 For compatibility to \fBnbd-client\fR(1) you can also use \fBtimeout=\fISECONDS\fR\fP .SH "POSITIONAL ARGUMENTS" .PP The following positional options are supported: .IP "\fBHOST\fP" 10 The site to connect to a remote xnbd-server. You can specify any resolvable hostname, IPv4 or IPv6 address. .IP "\fBPORT\fP" 10 The port number to connect to on remote side .IP "\fBNBD-DEVICE\fP" 10 The local nbd-device to be associated with the remote \fBxnbd-server\fR. .PP You can specify multiple \fIhost\fR \fIport\fR tuples. \fBxnbd-client\fR will try to connect to each of them in order until it succeeds to establish a connection to a server. .SH "BUGS" .PP The NBD device is known to deadlock when not being used altogether with the deadline scheduler. Make sure to do: .PP \fBecho deadline > /sys/block/nbd0/queue/scheduler\fR .SH "SEE ALSO" .PP xnbd-server (8), xnbd-wrapper (8). .SH "AUTHOR" .PP 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). .PP The xNBD userland (client and server) have been written by Takahiro Hirofuchi (t.hirofuchi@aist.go.jp) .PP This manual page was written by Arno Toell (debian@toell.net) for the \fBDebian GNU/Linux\fP system (but may be used by others). Large parts are verbatim copies of the original \fBnbd-server\fR and \fBnbd-client\fR 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. .\" created by instant / docbook-to-man, Thu 07 Feb 2013, 22:09