diff options
| -rw-r--r-- | Documentation/aoe/aoe.txt | 49 | ||||
| -rw-r--r-- | Documentation/aoe/mkdevs.sh | 41 | ||||
| -rw-r--r-- | Documentation/aoe/mkshelf.sh | 28 | ||||
| -rw-r--r-- | Documentation/aoe/status.sh | 3 |
4 files changed, 35 insertions, 86 deletions
diff --git a/Documentation/aoe/aoe.txt b/Documentation/aoe/aoe.txt index b3e47560346a..bfc9cb19abcd 100644 --- a/Documentation/aoe/aoe.txt +++ b/Documentation/aoe/aoe.txt | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | ATA over Ethernet is a network protocol that provides simple access to | ||
| 2 | block storage on the LAN. | ||
| 3 | |||
| 4 | http://support.coraid.com/documents/AoEr11.txt | ||
| 5 | |||
| 1 | The EtherDrive (R) HOWTO for 2.6 and 3.x kernels is found at ... | 6 | The EtherDrive (R) HOWTO for 2.6 and 3.x kernels is found at ... |
| 2 | 7 | ||
| 3 | http://support.coraid.com/support/linux/EtherDrive-2.6-HOWTO.html | 8 | http://support.coraid.com/support/linux/EtherDrive-2.6-HOWTO.html |
| @@ -26,20 +31,12 @@ CREATING DEVICE NODES | |||
| 26 | There is a udev-install.sh script that shows how to install these | 31 | There is a udev-install.sh script that shows how to install these |
| 27 | rules on your system. | 32 | rules on your system. |
| 28 | 33 | ||
| 29 | If you are not using udev, two scripts are provided in | ||
| 30 | Documentation/aoe as examples of static device node creation for | ||
| 31 | using the aoe driver. | ||
| 32 | |||
| 33 | rm -rf /dev/etherd | ||
| 34 | sh Documentation/aoe/mkdevs.sh /dev/etherd | ||
| 35 | |||
| 36 | ... or to make just one shelf's worth of block device nodes ... | ||
| 37 | |||
| 38 | sh Documentation/aoe/mkshelf.sh /dev/etherd 0 | ||
| 39 | |||
| 40 | There is also an autoload script that shows how to edit | 34 | There is also an autoload script that shows how to edit |
| 41 | /etc/modprobe.d/aoe.conf to ensure that the aoe module is loaded when | 35 | /etc/modprobe.d/aoe.conf to ensure that the aoe module is loaded when |
| 42 | necessary. | 36 | necessary. Preloading the aoe module is preferable to autoloading, |
| 37 | however, because AoE discovery takes a few seconds. It can be | ||
| 38 | confusing when an AoE device is not present the first time the a | ||
| 39 | command is run but appears a second later. | ||
| 43 | 40 | ||
| 44 | USING DEVICE NODES | 41 | USING DEVICE NODES |
| 45 | 42 | ||
| @@ -54,9 +51,9 @@ USING DEVICE NODES | |||
| 54 | "echo > /dev/etherd/discover" tells the driver to find out what AoE | 51 | "echo > /dev/etherd/discover" tells the driver to find out what AoE |
| 55 | devices are available. | 52 | devices are available. |
| 56 | 53 | ||
| 57 | These character devices may disappear and be replaced by sysfs | 54 | In the future these character devices may disappear and be replaced |
| 58 | counterparts. Using the commands in aoetools insulates users from | 55 | by sysfs counterparts. Using the commands in aoetools insulates |
| 59 | these implementation details. | 56 | users from these implementation details. |
| 60 | 57 | ||
| 61 | The block devices are named like this: | 58 | The block devices are named like this: |
| 62 | 59 | ||
| @@ -79,8 +76,8 @@ USING SYSFS | |||
| 79 | The netif attribute is the network interface on the localhost | 76 | The netif attribute is the network interface on the localhost |
| 80 | through which we are communicating with the remote AoE device. | 77 | through which we are communicating with the remote AoE device. |
| 81 | 78 | ||
| 82 | There is a script in this directory that formats this information | 79 | There is a script in this directory that formats this information in |
| 83 | in a convenient way. Users with aoetools can use the aoe-stat | 80 | a convenient way. Users with aoetools should use the aoe-stat |
| 84 | command. | 81 | command. |
| 85 | 82 | ||
| 86 | root@makki root# sh Documentation/aoe/status.sh | 83 | root@makki root# sh Documentation/aoe/status.sh |
| @@ -124,3 +121,21 @@ DRIVER OPTIONS | |||
| 124 | usage example for the module parameter. | 121 | usage example for the module parameter. |
| 125 | 122 | ||
| 126 | modprobe aoe_iflist="eth1 eth3" | 123 | modprobe aoe_iflist="eth1 eth3" |
| 124 | |||
| 125 | The aoe_deadsecs module parameter determines the maximum number of | ||
| 126 | seconds that the driver will wait for an AoE device to provide a | ||
| 127 | response to an AoE command. After aoe_deadsecs seconds have | ||
| 128 | elapsed, the AoE device will be marked as "down". | ||
| 129 | |||
| 130 | The aoe_maxout module parameter has a default of 128. This is the | ||
| 131 | maximum number of unresponded packets that will be sent to an AoE | ||
| 132 | target at one time. | ||
| 133 | |||
| 134 | The aoe_dyndevs module parameter defaults to 1, meaning that the | ||
| 135 | driver will assign a block device minor number to a discovered AoE | ||
| 136 | target based on the order of its discovery. With dynamic minor | ||
| 137 | device numbers in use, a greater range of AoE shelf and slot | ||
| 138 | addresses can be supported. Users with udev will never have to | ||
| 139 | think about minor numbers. Using aoe_dyndevs=0 allows device nodes | ||
| 140 | to be pre-created using a static minor-number scheme with the | ||
| 141 | aoe-mkshelf script in the aoetools. | ||
diff --git a/Documentation/aoe/mkdevs.sh b/Documentation/aoe/mkdevs.sh deleted file mode 100644 index 44c0ab702432..000000000000 --- a/Documentation/aoe/mkdevs.sh +++ /dev/null | |||
| @@ -1,41 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | n_shelves=${n_shelves:-10} | ||
| 4 | n_partitions=${n_partitions:-16} | ||
| 5 | |||
| 6 | if test "$#" != "1"; then | ||
| 7 | echo "Usage: sh `basename $0` {dir}" 1>&2 | ||
| 8 | echo " n_partitions=16 sh `basename $0` {dir}" 1>&2 | ||
| 9 | exit 1 | ||
| 10 | fi | ||
| 11 | dir=$1 | ||
| 12 | |||
| 13 | MAJOR=152 | ||
| 14 | |||
| 15 | echo "Creating AoE devnode files in $dir ..." | ||
| 16 | |||
| 17 | set -e | ||
| 18 | |||
| 19 | mkdir -p $dir | ||
| 20 | |||
| 21 | # (Status info is in sysfs. See status.sh.) | ||
| 22 | # rm -f $dir/stat | ||
| 23 | # mknod -m 0400 $dir/stat c $MAJOR 1 | ||
| 24 | rm -f $dir/err | ||
| 25 | mknod -m 0400 $dir/err c $MAJOR 2 | ||
| 26 | rm -f $dir/discover | ||
| 27 | mknod -m 0200 $dir/discover c $MAJOR 3 | ||
| 28 | rm -f $dir/interfaces | ||
| 29 | mknod -m 0200 $dir/interfaces c $MAJOR 4 | ||
| 30 | rm -f $dir/revalidate | ||
| 31 | mknod -m 0200 $dir/revalidate c $MAJOR 5 | ||
| 32 | rm -f $dir/flush | ||
| 33 | mknod -m 0200 $dir/flush c $MAJOR 6 | ||
| 34 | |||
| 35 | export n_partitions | ||
| 36 | mkshelf=`echo $0 | sed 's!mkdevs!mkshelf!'` | ||
| 37 | i=0 | ||
| 38 | while test $i -lt $n_shelves; do | ||
| 39 | sh -xc "sh $mkshelf $dir $i" | ||
| 40 | i=`expr $i + 1` | ||
| 41 | done | ||
diff --git a/Documentation/aoe/mkshelf.sh b/Documentation/aoe/mkshelf.sh deleted file mode 100644 index 32615814271c..000000000000 --- a/Documentation/aoe/mkshelf.sh +++ /dev/null | |||
| @@ -1,28 +0,0 @@ | |||
| 1 | #! /bin/sh | ||
| 2 | |||
| 3 | if test "$#" != "2"; then | ||
| 4 | echo "Usage: sh `basename $0` {dir} {shelfaddress}" 1>&2 | ||
| 5 | echo " n_partitions=16 sh `basename $0` {dir} {shelfaddress}" 1>&2 | ||
| 6 | exit 1 | ||
| 7 | fi | ||
| 8 | n_partitions=${n_partitions:-16} | ||
| 9 | dir=$1 | ||
| 10 | shelf=$2 | ||
| 11 | nslots=16 | ||
| 12 | maxslot=`echo $nslots 1 - p | dc` | ||
| 13 | MAJOR=152 | ||
| 14 | |||
| 15 | set -e | ||
| 16 | |||
| 17 | minor=`echo $nslots \* $shelf \* $n_partitions | bc` | ||
| 18 | endp=`echo $n_partitions - 1 | bc` | ||
| 19 | for slot in `seq 0 $maxslot`; do | ||
| 20 | for part in `seq 0 $endp`; do | ||
| 21 | name=e$shelf.$slot | ||
| 22 | test "$part" != "0" && name=${name}p$part | ||
| 23 | rm -f $dir/$name | ||
| 24 | mknod -m 0660 $dir/$name b $MAJOR $minor | ||
| 25 | |||
| 26 | minor=`expr $minor + 1` | ||
| 27 | done | ||
| 28 | done | ||
diff --git a/Documentation/aoe/status.sh b/Documentation/aoe/status.sh index 751f3be514b8..eeec7baae57a 100644 --- a/Documentation/aoe/status.sh +++ b/Documentation/aoe/status.sh | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | #! /bin/sh | 1 | #! /bin/sh |
| 2 | # collate and present sysfs information about AoE storage | 2 | # collate and present sysfs information about AoE storage |
| 3 | # | ||
| 4 | # A more complete version of this script is aoe-stat, in the | ||
| 5 | # aoetools. | ||
| 3 | 6 | ||
| 4 | set -e | 7 | set -e |
| 5 | format="%8s\t%8s\t%8s\n" | 8 | format="%8s\t%8s\t%8s\n" |
