aoe.txt 4.5 KB

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