diff options
author | Randy Dunlap <randy.dunlap@oracle.com> | 2008-11-13 16:33:24 -0500 |
---|---|---|
committer | Randy Dunlap <randy.dunlap@oracle.com> | 2008-11-14 12:28:53 -0500 |
commit | 31c00fc15ebd35c1647775dbfc167a15d46657fd (patch) | |
tree | 6d8ff2a6607c94a791ccc56fd8eb625e4fdcc01a /Documentation/blockdev/nbd.txt | |
parent | 3edac25f2e8ac8c2a84904c140e1aeb434e73e75 (diff) |
Create/use more directory structure in the Documentation/ tree.
Create Documentation/blockdev/ sub-directory and populate it.
Populate the Documentation/serial/ sub-directory.
Move MSI-HOWTO.txt to Documentation/PCI/.
Move ioctl-number.txt to Documentation/ioctl/.
Update all relevant 00-INDEX files.
Update all relevant Kconfig files and source files.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Diffstat (limited to 'Documentation/blockdev/nbd.txt')
-rw-r--r-- | Documentation/blockdev/nbd.txt | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/Documentation/blockdev/nbd.txt b/Documentation/blockdev/nbd.txt new file mode 100644 index 000000000000..aeb93ffe6416 --- /dev/null +++ b/Documentation/blockdev/nbd.txt | |||
@@ -0,0 +1,47 @@ | |||
1 | Network Block Device (TCP version) | ||
2 | |||
3 | What is it: With this compiled in the kernel (or as a module), Linux | ||
4 | can use a remote server as one of its block devices. So every time | ||
5 | the client computer wants to read, e.g., /dev/nb0, it sends a | ||
6 | request over TCP to the server, which will reply with the data read. | ||
7 | This can be used for stations with low disk space (or even diskless - | ||
8 | if you boot from floppy) to borrow disk space from another computer. | ||
9 | Unlike NFS, it is possible to put any filesystem on it, etc. It should | ||
10 | even be possible to use NBD as a root filesystem (I've never tried), | ||
11 | but it requires a user-level program to be in the initrd to start. | ||
12 | It also allows you to run block-device in user land (making server | ||
13 | and client physically the same computer, communicating using loopback). | ||
14 | |||
15 | Current state: It currently works. Network block device is stable. | ||
16 | I originally thought that it was impossible to swap over TCP. It | ||
17 | turned out not to be true - swapping over TCP now works and seems | ||
18 | to be deadlock-free, but it requires heavy patches into Linux's | ||
19 | network layer. | ||
20 | |||
21 | For more information, or to download the nbd-client and nbd-server | ||
22 | tools, go to http://nbd.sf.net/. | ||
23 | |||
24 | Howto: To setup nbd, you can simply do the following: | ||
25 | |||
26 | First, serve a device or file from a remote server: | ||
27 | |||
28 | nbd-server <port-number> <device-or-file-to-serve-to-client> | ||
29 | |||
30 | e.g., | ||
31 | root@server1 # nbd-server 1234 /dev/sdb1 | ||
32 | |||
33 | (serves sdb1 partition on TCP port 1234) | ||
34 | |||
35 | Then, on the local (client) system: | ||
36 | |||
37 | nbd-client <server-name-or-IP> <server-port-number> /dev/nb[0-n] | ||
38 | |||
39 | e.g., | ||
40 | root@client1 # nbd-client server1 1234 /dev/nb0 | ||
41 | |||
42 | (creates the nb0 device on client1) | ||
43 | |||
44 | The nbd kernel module need only be installed on the client | ||
45 | system, as the nbd-server is completely in userspace. In fact, | ||
46 | the nbd-server has been successfully ported to other operating | ||
47 | systems, including Windows. | ||