aoe.txt 5.7 KB

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