.TH "XNBD-SERVER" "8" .SH "NAME" xnbd-server \(em serve a file as a block device to other computers running the GNU/Linux(tm) Operating System .SH "SYNOPSIS" .PP \fBxnbd-server\fR [\-\-bgctlprefix \fIPATH\fR] [\-\-cow] [\-\-daemonize] [\-\-help] [\-\-inetd] [\-\-logpath \fIPATH\fR] [\-\-lport \fIPORT\fR] [\-\-proxy] [\-\-readonly] [\-\-target] [\-\-version] \fIFILE\fR .PP \fBxnbd-server\fR [\-\-proxy] [\fIoptions\fR] \fB\fITARGET_HOST\fR \fITARGET_PORT\fR \fICACHE_IMAGE\fR \fIBITMAP_IMAGE\fR\fP .PP \fBxnbd-server\fR [\-\-target] [\fIoptions\fR] \fB\fICACHE_IMAGE\fR\fP .PP \fBxnbd-server\fR [\-\-help] [\-\-version] .SH "DESCRIPTION" .PP \fBxnbd-server\fR is the server for the Linux Network Block Device (NBD). With xNBD, a client can use a file, exported over the network from a server, as a block device. It can then be used for whatever purpose a normal block device (hard disk, CD-ROM, ...) can be used for. .PP xNBD can be useful for diskless clients that need swap space, but you can also create a file system on it and use it as though it were a local file system. .PP xNBD offers several advantages over the original NBD implementation. In addition to features offered by NBD, xNBD supports better performance, (distributed) Copy-on-Write, (basic) snapshot support and Live Storage Migration along with IPv6 support. .PP xNBD can operate in two modes, the target mode and the alternative proxy mode. In target mode, xNBD offers a listening TCP connection which allows a \fBxnbd-client\fR(1) to access the exported \fICACHE_IMAGE\fR. In proxy mode, xNBD connects another running xnbd-server instance and acts as transparent proxy to the origin target server. This is very useful for storage migration for Virtual Machine Monitors. .SH "OPTIONS" .PP The following options are supported: .IP "\fB\-\-bgctlprefix \fIPATH\fR\fP " 10 The xNBD server can be controlled through a control socket. When given, use \fIprefix\fR as file name, default is \fI/tmp/xnbd-bg.ctl\fP). .IP "\fB\-\-cow\fP" 10 Enable Copy-on-Write mode. When this option is provided, write-operations are not committed to the exported \fIFILE\fR, but to a separate file. This separate file is removed when the connection is closed, which means that serving this way will make xnbd-server slow down (especially on large block devices with lots of writes), and that after disconnecting and reconnecting the client or the server, all changes are lost. .IP "\fB\-\-daemonize\fP " 10 Go into background as soon as the xnbd-server is started up .IP "\fB\-\-inetd\fP" 10 If xNBD shall be run from a Internet super-server, (e.g. inetd), this argument instructs xNBD to redirect output to \fIstderr\fP instead of a log file. .IP "\fB\-\-logpath \fIFILE\fR\fP " 10 Log informational messages to the given \fIFILE\fR if given. Defaults to \fI/var/log/xnbd-server.log\fR .IP "\fB\-\-lport \fIPORT\fR\fP " 10 Accept incoming connections on the given \fIPORT\fR. A valid port is any number between 1 and 65536. You may not use the same listeing port more than once per system. If this argument is not given, xNBD will listen on port 8520 by default. .IP "\fB\-\-proxy\fP" 10 In the proxy server mode of xNBD, all I/O requests are intercepted, and redirected to a origin target server if needed. All updated blocks are saved at the proxy server, and read blocks are also cached. No write does not happen at the target server. .IP "" 10 This feature is used for distributed Copy-on-Write NBD disks; one read-only disk image is shared among multiple clients, and updated disk data is saved at each proxy .IP "\fB\-\-readonly\fP" 10 Export the \fIFILE\fR read only. If a client tries to write to a read-only exported file, it will receive an error, but the connection will stay up. .IP "\fB\-\-target\fP" 10 Start an xNBD server in target mode, that is it will export block level access to the given \fIFILE\fR. .IP "" 10 \fIWARNING:\fP If you need concurrent access from multiple clients, you can access an exported image concurrently from multiple clients. Yet xNBD does not do any locking or synchronization. In most cases you WILL need a cluster file system on the exported \fIFILE\fR image to avoid damage on your data. .SH "POSITIONAL ARGUMENTS" .PP The following positional options are supported: .IP "\fBFILE\fP" 10 The filename of the \fIFILE\fR that should be exported. This can be an arbitrary file, including disk images and real block devices (i.e. a block device like \fI/dev/sda1\fP). .IP "\fBTARGET_HOST\fP" 10 When in proxy mode, use the given \fITARGET_HOST\fR as origin host. The resulting xnbd-server instance will forward requests transparently to this remote side. .IP "\fBTARGET_PORT\fP" 10 The target origin port to connect in proxy mode .IP "\fBBITMAP_IMAGE\fP" 10 The bitmap file uses for synchronization when connecting to a target origin host. A bitmap file records block numbers of updated and cached blocks. .SH "SIGNALS" .IP "\fBSIGHUP\fP" 10 When in proxy mode, a SIGHUP instructs the \fBnbd-server\fR to detach from its origin. From there and beyond, the nbd server instance will run as if it would have been started in target mode. .SH "SEE ALSO" .PP xnbd-client (1). .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 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. .\" created by instant / docbook-to-man, Thu 07 Feb 2013, 22:09