r266: mktemp provides an absolute path...
[nbd.git] / nbd-client.8.sgml
1 <!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
2
3 <!-- Process this file with docbook-to-man to generate an nroff manual
4      page: `docbook-to-man manpage.sgml > manpage.1'.  You may view
5      the manual page with: `docbook-to-man manpage.sgml | nroff -man |
6      less'.  A typical entry in a Makefile or Makefile.am is:
7
8 manpage.1: manpage.sgml
9         docbook-to-man $< > $@
10   -->
11
12   <!-- Fill in your name for FIRSTNAME and SURNAME. -->
13   <!ENTITY dhfirstname "<firstname>Wouter</firstname>">
14   <!ENTITY dhsurname   "<surname>Verhelst</surname>">
15   <!-- Please adjust the date whenever revising the manpage. -->
16   <!ENTITY dhdate      "<date>$Date$</date>">
17   <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
18        allowed: see man(7), man(1). -->
19   <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
20   <!ENTITY dhemail     "<email>wouter@debian.org</email>">
21   <!ENTITY dhusername  "Wouter Verhelst">
22   <!ENTITY dhucpackage "<refentrytitle>NBD-CLIENT</refentrytitle>">
23   <!ENTITY dhpackage   "nbd-client">
24
25   <!ENTITY debian      "<productname>Debian GNU/Linux</productname>">
26   <!ENTITY gnu         "<acronym>GNU</acronym>">
27 ]>
28
29 <refentry>
30   <refentryinfo>
31     <address>
32       &dhemail;
33     </address>
34     <author>
35       &dhfirstname;
36       &dhsurname;
37     </author>
38     <copyright>
39       <year>2001</year>
40       <holder>&dhusername;</holder>
41     </copyright>
42     &dhdate;
43   </refentryinfo>
44   <refmeta>
45     &dhucpackage;
46
47     &dhsection;
48   </refmeta>
49   <refnamediv>
50     <refname>&dhpackage;</refname>
51
52     <refpurpose>connect to a server running nbd-server(1), to use its
53     exported block device</refpurpose>
54   </refnamediv>
55   <refsynopsisdiv>
56     <cmdsynopsis>
57       <command>&dhpackage;</command>
58       <arg><option>bs=<replaceable>blocksize</replaceable></option></arg>
59       <arg choice=plain><option><replaceable>host</replaceable></option></arg>
60       <arg choice=plain><option><replaceable>port</replaceable></option></arg>
61       <arg choice=plain><option><replaceable>nbd-device</replaceable></option></arg>
62       <arg><option>-swap</option></arg>
63     </cmdsynopsis>
64     <cmdsynopsis>
65       <command>&dhpackage;</command>
66       <arg choice=plain><option>-d <replaceable>nbd-device</replaceable></option></arg>
67     </cmdsynopsis>
68   </refsynopsisdiv>
69   <refsect1>
70     <title>DESCRIPTION</title>
71
72     <para>With <command>&dhpackage;</command>, you can connect to a
73     server running <command>nbd-server</command>, thus using raw
74     diskspace from that server as a blockdevice on the local
75     client.</para>
76
77     <para>To do this, support from the Linux Kernel is necessary, in
78     the form of the Network Block Device (NBD). When you have that,
79     either in the kernel, or as a module, you can connect to an NBD
80     server and use its exported file through a block special file with
81     major mode 43.</para>
82
83   </refsect1>
84   <refsect1>
85     <title>OPTIONS</title>
86
87     <para>The following options are supported:</para>
88
89     <variablelist>
90       <varlistentry>
91         <term><option>bs=<replaceable>blocksize</replaceable></option></term>
92         <listitem>
93           <para>Use a blocksize of "blocksize". Default is 1024;
94             allowed values are either 512, 1024, 2048 or 4096</para>
95         </listitem>
96       </varlistentry>
97       <varlistentry>
98         <term><option>host</option></term>
99         <listitem>
100           <para>The hostname of the machine running
101             <command>nbd-server</command>.</para>
102         </listitem>
103       </varlistentry>
104       <varlistentry>
105         <term><option>port</option></term>
106         <listitem>
107           <para>The TCP port on which <command>nbd-server</command> is
108             running at the server.</para>
109         </listitem>
110       </varlistentry>
111       <varlistentry>
112         <term><option>nbd-device</option></term>
113         <listitem>
114           <para>The block special file this nbd-client should connect
115             to.</para>
116         </listitem>
117       </varlistentry>
118       <varlistentry>
119         <term><option>-swap</option></term>
120         <listitem>
121           <para>Specifies that this NBD device will be used as
122             swapspace. If you intend to do that, please use this
123             option to prevent deadlocks. You'll need a special kernel
124             patch, available at NBD's homepage:
125             http://atrey.karlin.mff.cuni.cz/~pavel</para>
126         </listitem>
127       </varlistentry>
128     </variablelist>
129   </refsect1>
130   <refsect1>
131     <title>EXAMPLES</title>
132
133     <para>Some examples of nbd-client usage:</para>
134     <itemizedlist mark="none">
135       <listitem>
136         <para>To connect to a server running on port 2000 at host
137           "server.domain.com", using the client's block special file
138           "/dev/nb0":</para>
139         <para><command>nbd-client server.domain.com 2000
140           /dev/nb0</command></para>
141       </listitem>
142       <listitem>
143         <para>To connect to a server running on port 2001 at host
144           "swapserver.domain.com", using the client's block special
145           file "/dev/nb1", for swap purposes:</para>
146         <para><command>nbd-client swapserver.domain.com 2001 /dev/nb1
147           -swap</command></para>
148       </listitem>
149       <listitem>
150         <para>To disconnect the above connection again (after making
151           sure the block special file is not in use anymore):</para>
152         <para><command>nbd-client -d /dev/nb1</command></para>
153       </listitem>
154     </itemizedlist>
155   </refsect1>
156   <refsect1>
157     <title>SEE ALSO</title>
158
159     <para>nbd-server (1).</para>
160
161   </refsect1>
162   <refsect1>
163     <title>AUTHOR</title>
164     <para>The NBD kernel module and the NBD tools have been written by
165     Pavel Macheck (pavel@ucw.cz).</para>
166
167     <para>The kernel module is now maintained by Paul Clements
168     (Paul.Clements@steeleye.com), while the userland tools are maintained by
169     Wouter Verhelst (wouter@debian.org)</para>
170
171     <para>This manual page was written by &dhusername; (&dhemail;) for
172     the &debian; system (but may be used by others).  Permission is
173     granted to copy, distribute and/or modify this document under the
174     terms of the <acronym>GNU</acronym> General Public License,
175     version 2, as published by the Free Software Foundation.</para>
176
177   </refsect1>
178 </refentry>
179
180 <!-- Keep this comment at the end of the file
181 Local variables:
182 mode: sgml
183 sgml-omittag:t
184 sgml-shorttag:t
185 sgml-minimize-attributes:nil
186 sgml-always-quote-attributes:t
187 sgml-indent-step:2
188 sgml-indent-data:t
189 sgml-parent-document:nil
190 sgml-default-dtd-file:nil
191 sgml-exposed-tags:nil
192 sgml-local-catalogs:nil
193 sgml-local-ecat-files:nil
194 End:
195 -->