aoe.txt 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. The EtherDrive (R) HOWTO for 2.6 and 3.x kernels is found at ...
  2. http://support.coraid.com/support/linux/EtherDrive-2.6-HOWTO.html
  3. It has many tips and hints! Please see, especially, recommended
  4. tunings for virtual memory:
  5. http://support.coraid.com/support/linux/EtherDrive-2.6-HOWTO-5.html#ss5.19
  6. The aoetools are userland programs that are designed to work with this
  7. driver. The aoetools are on sourceforge.
  8. http://aoetools.sourceforge.net/
  9. The scripts in this Documentation/aoe directory are intended to
  10. document the use of the driver and are not necessary if you install
  11. the aoetools.
  12. CREATING DEVICE NODES
  13. Users of udev should find the block device nodes created
  14. automatically, but to create all the necessary device nodes, use the
  15. udev configuration rules provided in udev.txt (in this directory).
  16. There is a udev-install.sh script that shows how to install these
  17. rules on your system.
  18. If you are not using udev, two scripts are provided in
  19. Documentation/aoe as examples of static device node creation for
  20. using the aoe driver.
  21. rm -rf /dev/etherd
  22. sh Documentation/aoe/mkdevs.sh /dev/etherd
  23. ... or to make just one shelf's worth of block device nodes ...
  24. sh Documentation/aoe/mkshelf.sh /dev/etherd 0
  25. There is also an autoload script that shows how to edit
  26. /etc/modprobe.d/aoe.conf to ensure that the aoe module is loaded when
  27. necessary.
  28. USING DEVICE NODES
  29. "cat /dev/etherd/err" blocks, waiting for error diagnostic output,
  30. like any retransmitted packets.
  31. "echo eth2 eth4 > /dev/etherd/interfaces" tells the aoe driver to
  32. limit ATA over Ethernet traffic to eth2 and eth4. AoE traffic from
  33. untrusted networks should be ignored as a matter of security. See
  34. also the aoe_iflist driver option described below.
  35. "echo > /dev/etherd/discover" tells the driver to find out what AoE
  36. devices are available.
  37. These character devices may disappear and be replaced by sysfs
  38. counterparts. Using the commands in aoetools insulates users from
  39. these implementation details.
  40. The block devices are named like this:
  41. e{shelf}.{slot}
  42. e{shelf}.{slot}p{part}
  43. ... so that "e0.2" is the third blade from the left (slot 2) in the
  44. first shelf (shelf address zero). That's the whole disk. The first
  45. partition on that disk would be "e0.2p1".
  46. USING SYSFS
  47. Each aoe block device in /sys/block has the extra attributes of
  48. state, mac, and netif. The state attribute is "up" when the device
  49. is ready for I/O and "down" if detected but unusable. The
  50. "down,closewait" state shows that the device is still open and
  51. cannot come up again until it has been closed.
  52. The mac attribute is the ethernet address of the remote AoE device.
  53. The netif attribute is the network interface on the localhost
  54. through which we are communicating with the remote AoE device.
  55. There is a script in this directory that formats this information
  56. in a convenient way. Users with aoetools can use the aoe-stat
  57. command.
  58. root@makki root# sh Documentation/aoe/status.sh
  59. e10.0 eth3 up
  60. e10.1 eth3 up
  61. e10.2 eth3 up
  62. e10.3 eth3 up
  63. e10.4 eth3 up
  64. e10.5 eth3 up
  65. e10.6 eth3 up
  66. e10.7 eth3 up
  67. e10.8 eth3 up
  68. e10.9 eth3 up
  69. e4.0 eth1 up
  70. e4.1 eth1 up
  71. e4.2 eth1 up
  72. e4.3 eth1 up
  73. e4.4 eth1 up
  74. e4.5 eth1 up
  75. e4.6 eth1 up
  76. e4.7 eth1 up
  77. e4.8 eth1 up
  78. e4.9 eth1 up
  79. Use /sys/module/aoe/parameters/aoe_iflist (or better, the driver
  80. option discussed below) instead of /dev/etherd/interfaces to limit
  81. AoE traffic to the network interfaces in the given
  82. whitespace-separated list. Unlike the old character device, the
  83. sysfs entry can be read from as well as written to.
  84. It's helpful to trigger discovery after setting the list of allowed
  85. interfaces. The aoetools package provides an aoe-discover script
  86. for this purpose. You can also directly use the
  87. /dev/etherd/discover special file described above.
  88. DRIVER OPTIONS
  89. There is a boot option for the built-in aoe driver and a
  90. corresponding module parameter, aoe_iflist. Without this option,
  91. all network interfaces may be used for ATA over Ethernet. Here is a
  92. usage example for the module parameter.
  93. modprobe aoe_iflist="eth1 eth3"