Where is the Network Block Device format described?

840 views Asked by At

What is the format of network block device protocol? It is stated that it is simple, but I can't find any RFC or similar things that describes what client and server should send.

2

There are 2 answers

0
BZKN On

Further adding to it, the exact communication format of NBD client and NBD server can be briefly described as following:

Client: The client component of NBD configures a local block device as /dev/nbdX. Requests submitted to this device are sent through a socket to the server side implemented in userspace. The client can be configured with a userspace utility called nbd-client [1].

Server: Server implements userspace handlers for requests sent by the client. NBD can use Unix-domain sockets instead of network sockets to eliminate the overhead of connection management. Furthermore, a multi-connect connection can be used to increase performance due to introduced parallelism in the server part [1]. High-performance server implementations with plugin support exist, such as nbdkit or nbd-server.

In addition to the earlier useful answer that mentions proto.md below are some more useful resources that can help to understand in more detail the functions of client and server.

References and Resources:

[1] BUSE: Block Device in Userspace

[2] The Network Block Device-Linux Journal

[3] BDUS: implementing block devices in user space

0
Vi. On

Found myself. Looks like here is the document: https://github.com/yoe/nbd/blob/master/doc/proto.md . Not so simple...

Additionally there is simple Python-based server: http://lists.canonical.org/pipermail/kragen-hacks/2004-May/000397.html