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