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