README 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. ********************************
  2. RDMA Network Block Device (RNBD)
  3. ********************************
  4. Introduction
  5. ------------
  6. RNBD (RDMA Network Block Device) is a pair of kernel modules
  7. (client and server) that allow for remote access of a block device on
  8. the server over RTRS protocol using the RDMA (InfiniBand, RoCE, iWARP)
  9. transport. After being mapped, the remote block devices can be accessed
  10. on the client side as local block devices.
  11. I/O is transferred between client and server by the RTRS transport
  12. modules. The administration of RNBD and RTRS modules is done via
  13. sysfs entries.
  14. Requirements
  15. ------------
  16. RTRS kernel modules
  17. Quick Start
  18. -----------
  19. Server side:
  20. # modprobe rnbd_server
  21. Client side:
  22. # modprobe rnbd_client
  23. # echo "sessname=blya path=ip:10.50.100.66 device_path=/dev/ram0" > \
  24. /sys/devices/virtual/rnbd-client/ctl/map_device
  25. Where "sessname=" is a session name, a string to identify the session
  26. on client and on server sides; "path=" is a destination IP address or
  27. a pair of a source and a destination IPs, separated by comma. Multiple
  28. "path=" options can be specified in order to use multipath (see RTRS
  29. description for details); "device_path=" is the block device to be
  30. mapped from the server side. After the session to the server machine is
  31. established, the mapped device will appear on the client side under
  32. /dev/rnbd<N>.
  33. RNBD-Server Module Parameters
  34. =============================
  35. dev_search_path
  36. ---------------
  37. When a device is mapped from the client, the server generates the path
  38. to the block device on the server side by concatenating dev_search_path
  39. and the "device_path" that was specified in the map_device operation.
  40. The default dev_search_path is: "/".
  41. dev_search_path option can also contain %SESSNAME% in order to provide
  42. different device namespaces for different sessions. See "device_path"
  43. option for details.
  44. ============================
  45. Protocol (rnbd/rnbd-proto.h)
  46. ============================
  47. 1. Before mapping first device from a given server, client sends an
  48. RNBD_MSG_SESS_INFO to the server. Server responds with
  49. RNBD_MSG_SESS_INFO_RSP. Currently the messages only contain the protocol
  50. version for backward compatibility.
  51. 2. Client requests to open a device by sending RNBD_MSG_OPEN message. This
  52. contains the path to the device and access mode (read-only or writable).
  53. Server responds to the message with RNBD_MSG_OPEN_RSP. This contains
  54. a 32 bit device id to be used for IOs and device "geometry" related
  55. information: side, max_hw_sectors, etc.
  56. 3. Client attaches RNBD_MSG_IO to each IO message send to a device. This
  57. message contains device id, provided by server in his rnbd_msg_open_rsp,
  58. sector to be accessed, read-write flags and bi_size.
  59. 4. Client closes a device by sending RNBD_MSG_CLOSE which contains only the
  60. device id provided by the server.
  61. =========================================
  62. Contributors List(in alphabetical order)
  63. =========================================
  64. Danil Kipnis <[email protected]>
  65. Fabian Holler <[email protected]>
  66. Guoqing Jiang <[email protected]>
  67. Jack Wang <[email protected]>
  68. Kleber Souza <[email protected]>
  69. Lutz Pogrell <[email protected]>
  70. Milind Dumbare <[email protected]>
  71. Roman Penyaev <[email protected]>
  72. Swapnil Ingle <[email protected]>