r329: Wasn't supposed to be part of this commit
[nbd.git] / README
diff --git a/README b/README
index 98251fa..3ca8a49 100644 (file)
--- a/README
+++ b/README
@@ -21,6 +21,14 @@ device nodes:
 (if you need more than one NBD device, repeat the above command for nb1,
 nb2, ...)
 
+Since there's a problem with nbd and the (default) cfq I/O scheduler,
+you may want to set it to deadline:
+
+echo 'deadline' > /sys/block/nbd0/queue/scheduler
+
+(again, repeat the above for nbd1, nbd2, etc, if you need more than one
+device)
+
 Next, start the server. You can use a file or a block device for that:
 
 nbd-server <port> <filename>
@@ -33,7 +41,7 @@ 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:
+Finally, you'll be able to start the client:
 
 nbd-client <hostname> <port> <nbd device>
 
@@ -52,18 +60,24 @@ This configuration file is expected to be found at
 
 # This is a comment
 [generic]
-       # The [generic] section is required, but can not currently
-       # contain any options. This section name is reserved for future
-       # use.
+       # The [generic] section is required, even if nothing is specified
+       # there.
+       # When either of these options are specified, nbd-server drops
+       # privileges to the given user and group after opening ports, but
+       # _before_ opening files.
+       user = nbd
+       group = nbd
 [export1]
        exportname = /export/nbd/export1-file
        port = 12345
        authfile = /export/nbd/export1-authfile
        timeout = 30
        filesize = 10000000
-       readonly = no
+       readonly = false
        multifile = false
-       copyonwrite = no
+       copyonwrite = false
+       prerun = dd if=/dev/zero of=%s bs=1k count=500
+       postrun = rm -f %s
 [otherexport]
        exportname = /export/nbd/experiment
        port = 12346
@@ -89,6 +103,8 @@ 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
+Fedora: "nbd", since Fedora 7
+uClibc's "buildroot" script also seems to have support for NBD.
 
 If you're packaging NBD for a different operating system that isn't in
 the above list, I'd like to know about it.
@@ -110,3 +126,7 @@ 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 of the block device your nbd-server is writing to
 needs to be emptied, then you've got a deadlock.
+
+A kernel patch exists[2] to create a separate kernel thread for NBD
+writes which woul fix this problem; however, it has not made it into
+mainline yet.