aoe.rst 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. Introduction
  2. ============
  3. ATA over Ethernet is a network protocol that provides simple access to
  4. block storage on the LAN.
  5. http://support.coraid.com/documents/AoEr11.txt
  6. The EtherDrive (R) HOWTO for 2.6 and 3.x kernels is found at ...
  7. http://support.coraid.com/support/linux/EtherDrive-2.6-HOWTO.html
  8. It has many tips and hints! Please see, especially, recommended
  9. tunings for virtual memory:
  10. http://support.coraid.com/support/linux/EtherDrive-2.6-HOWTO-5.html#ss5.19
  11. The aoetools are userland programs that are designed to work with this
  12. driver. The aoetools are on sourceforge.
  13. http://aoetools.sourceforge.net/
  14. The scripts in this Documentation/admin-guide/aoe directory are intended to
  15. document the use of the driver and are not necessary if you install
  16. the aoetools.
  17. Creating Device Nodes
  18. =====================
  19. Users of udev should find the block device nodes created
  20. automatically, but to create all the necessary device nodes, use the
  21. udev configuration rules provided in udev.txt (in this directory).
  22. There is a udev-install.sh script that shows how to install these
  23. rules on your system.
  24. There is also an autoload script that shows how to edit
  25. /etc/modprobe.d/aoe.conf to ensure that the aoe module is loaded when
  26. necessary. Preloading the aoe module is preferable to autoloading,
  27. however, because AoE discovery takes a few seconds. It can be
  28. confusing when an AoE device is not present the first time the a
  29. command is run but appears a second later.
  30. Using Device Nodes
  31. ==================
  32. "cat /dev/etherd/err" blocks, waiting for error diagnostic output,
  33. like any retransmitted packets.
  34. "echo eth2 eth4 > /dev/etherd/interfaces" tells the aoe driver to
  35. limit ATA over Ethernet traffic to eth2 and eth4. AoE traffic from
  36. untrusted networks should be ignored as a matter of security. See
  37. also the aoe_iflist driver option described below.
  38. "echo > /dev/etherd/discover" tells the driver to find out what AoE
  39. devices are available.
  40. In the future these character devices may disappear and be replaced
  41. by sysfs counterparts. Using the commands in aoetools insulates
  42. users from these implementation details.
  43. The block devices are named like this::
  44. e{shelf}.{slot}
  45. e{shelf}.{slot}p{part}
  46. ... so that "e0.2" is the third blade from the left (slot 2) in the
  47. first shelf (shelf address zero). That's the whole disk. The first
  48. partition on that disk would be "e0.2p1".
  49. Using sysfs
  50. ===========
  51. Each aoe block device in /sys/block has the extra attributes of
  52. state, mac, and netif. The state attribute is "up" when the device
  53. is ready for I/O and "down" if detected but unusable. The
  54. "down,closewait" state shows that the device is still open and
  55. cannot come up again until it has been closed.
  56. The mac attribute is the ethernet address of the remote AoE device.
  57. The netif attribute is the network interface on the localhost
  58. through which we are communicating with the remote AoE device.
  59. There is a script in this directory that formats this information in
  60. a convenient way. Users with aoetools should use the aoe-stat
  61. command::
  62. root@makki root# sh Documentation/admin-guide/aoe/status.sh
  63. e10.0 eth3 up
  64. e10.1 eth3 up
  65. e10.2 eth3 up
  66. e10.3 eth3 up
  67. e10.4 eth3 up
  68. e10.5 eth3 up
  69. e10.6 eth3 up
  70. e10.7 eth3 up
  71. e10.8 eth3 up
  72. e10.9 eth3 up
  73. e4.0 eth1 up
  74. e4.1 eth1 up
  75. e4.2 eth1 up
  76. e4.3 eth1 up
  77. e4.4 eth1 up
  78. e4.5 eth1 up
  79. e4.6 eth1 up
  80. e4.7 eth1 up
  81. e4.8 eth1 up
  82. e4.9 eth1 up
  83. Use /sys/module/aoe/parameters/aoe_iflist (or better, the driver
  84. option discussed below) instead of /dev/etherd/interfaces to limit
  85. AoE traffic to the network interfaces in the given
  86. whitespace-separated list. Unlike the old character device, the
  87. sysfs entry can be read from as well as written to.
  88. It's helpful to trigger discovery after setting the list of allowed
  89. interfaces. The aoetools package provides an aoe-discover script
  90. for this purpose. You can also directly use the
  91. /dev/etherd/discover special file described above.
  92. Driver Options
  93. ==============
  94. There is a boot option for the built-in aoe driver and a
  95. corresponding module parameter, aoe_iflist. Without this option,
  96. all network interfaces may be used for ATA over Ethernet. Here is a
  97. usage example for the module parameter::
  98. modprobe aoe_iflist="eth1 eth3"
  99. The aoe_deadsecs module parameter determines the maximum number of
  100. seconds that the driver will wait for an AoE device to provide a
  101. response to an AoE command. After aoe_deadsecs seconds have
  102. elapsed, the AoE device will be marked as "down". A value of zero
  103. is supported for testing purposes and makes the aoe driver keep
  104. trying AoE commands forever.
  105. The aoe_maxout module parameter has a default of 128. This is the
  106. maximum number of unresponded packets that will be sent to an AoE
  107. target at one time.
  108. The aoe_dyndevs module parameter defaults to 1, meaning that the
  109. driver will assign a block device minor number to a discovered AoE
  110. target based on the order of its discovery. With dynamic minor
  111. device numbers in use, a greater range of AoE shelf and slot
  112. addresses can be supported. Users with udev will never have to
  113. think about minor numbers. Using aoe_dyndevs=0 allows device nodes
  114. to be pre-created using a static minor-number scheme with the
  115. aoe-mkshelf script in the aoetools.