r117: Make this slightly useful
authoryoe <yoe>
Wed, 26 Oct 2005 09:13:27 +0000 (09:13 +0000)
committeryoe <yoe>
Wed, 26 Oct 2005 09:13:27 +0000 (09:13 +0000)
README

diff --git a/README b/README
index d3d1073..af9252d 100644 (file)
--- a/README
+++ b/README
@@ -1 +1,79 @@
-Initial README
+NBD README
+==========
+
+Welcome to the NBD userland support files!
+
+This package contains nbd-server and nbd-client. You'll want to run the
+client on a machine where you want to use an NBD device, and the server
+on a different machine; although it's technically possible to use
+nbd-server and nbd-client on the same machine, you may run into some
+deadlock issues if you do that[1].
+
+To install the package, please see the INSTALL file. You'll need to
+install it on both the client and the server.
+
+Using NBD is quite easy. First, on the client, you need to create the
+device nodes:
+
+# cd /dev
+# ./MAKEDEV nb0
+
+(if you need more than one NBD device, repeat the above command for nb1,
+nb2, ...)
+
+Next, start the server. You can use a file or a block device for that:
+
+nbd-server <port> <filename>
+
+e.g.,
+
+nbd-server 1234 /home/wouter/nbd-export
+
+Note that the filename must be an absolute path; i.e., something like
+/path/to/file, not ../file. See the nbd-server manpage for details on
+any available options.
+
+Finally, you'll be able to star the client:
+
+nbd-client <hostname> <port> <nbd device>
+
+e.g.,
+
+nbd-client 10.0.0.1 1234 /dev/nb0
+
+nbd-client must be ran as root; the same is not true for nbd-server (but
+do make sure that /var/run is writeable by the server that nbd-server
+runs as; otherwise, you won't get a PID file, though the server will
+keep running).
+
+There are packages (or similar) available for the following operating
+systems:
+
+Debian: "nbd-client" and "nbd-server", since woody.
+Gentoo: the "nbd" ebuild in the "sys-block" category, available in
+       Portage since 2002.
+FreeBSD: "net/nbd-server", available in the ports tree since 2003.
+       FreeBSD doesn't have kernel support for NBD, so obviously the
+       client isn't built there.
+SuSE: "nbd", since SuSE 10.0
+
+If you're packaging NBD for a different operating system that isn't in
+the above list, I'd like to know about it.
+
+Thanks, and have fun,
+
+Wouter Verhelst
+
+
+
+
+[1] When you write something to a block device, the kernel will not
+immediately write that to the physical block device; instead, your
+changes are written to a cache, which is periodically flushed by a
+kernel thread, 'kblockd'. If you're using a single-processor system,
+then you'll have only one kblockd, meaning, the kernel can't write to
+more than one block device at the same time.
+
+If, while your kblockd is emptying the NBD buffer cache, the kernel
+decides that the cache your nbd-server is writing to needs to be
+emptied, then you've got a deadlock.