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