요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Node creation
aoe.rst:28-44Udev rule과 module preload로 discovery 지연을 관리합니다.
Node controls and names
aoe.rst:45-71Error, interface, discovery control과 e{shelf}.{slot} 이름을 설명합니다.
sysfs status
aoe.rst:72-121state·mac·netif와 aoe_iflist, discovery trigger를 설명합니다.
Driver parameters
aoe.rst:122-150aoe_iflist, aoe_deadsecs, aoe_maxout, aoe_dyndevs 동작을 정리합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
Introduction
============
ATA over Ethernet is a network protocol that provides simple access to
block storage on the LAN.
http://support.coraid.com/documents/AoEr11.txt
The EtherDrive (R) HOWTO for 2.6 and 3.x kernels is found at ...
http://support.coraid.com/support/linux/EtherDrive-2.6-HOWTO.html
It has many tips and hints! Please see, especially, recommended
tunings for virtual memory:
http://support.coraid.com/support/linux/EtherDrive-2.6-HOWTO-5.html#ss5.19
The aoetools are userland programs that are designed to work with this
driver. The aoetools are on sourceforge.
http://aoetools.sourceforge.net/
The scripts in this Documentation/admin-guide/aoe directory are intended to
document the use of the driver and are not necessary if you install
the aoetools.
Creating Device Nodes
=====================
Users of udev should find the block device nodes created
automatically, but to create all the necessary device nodes, use the
udev configuration rules provided in udev.txt (in this directory).
There is a udev-install.sh script that shows how to install these
rules on your system.
There is also an autoload script that shows how to edit
/etc/modprobe.d/aoe.conf to ensure that the aoe module is loaded when
necessary. Preloading the aoe module is preferable to autoloading,
however, because AoE discovery takes a few seconds. It can be
confusing when an AoE device is not present the first time the a
command is run but appears a second later.
Using Device Nodes
==================
"cat /dev/etherd/err" blocks, waiting for error diagnostic output,
like any retransmitted packets.
"echo eth2 eth4 > /dev/etherd/interfaces" tells the aoe driver to
limit ATA over Ethernet traffic to eth2 and eth4. AoE traffic from
untrusted networks should be ignored as a matter of security. See
also the aoe_iflist driver option described below.
"echo > /dev/etherd/discover" tells the driver to find out what AoE
devices are available.
In the future these character devices may disappear and be replaced
by sysfs counterparts. Using the commands in aoetools insulates
users from these implementation details.
The block devices are named like this::
e{shelf}.{slot}
e{shelf}.{slot}p{part}
... so that "e0.2" is the third blade from the left (slot 2) in the
first shelf (shelf address zero). That's the whole disk. The first
partition on that disk would be "e0.2p1".
Using sysfs
===========
Each aoe block device in /sys/block has the extra attributes of
state, mac, and netif. The state attribute is "up" when the device
is ready for I/O and "down" if detected but unusable. The
"down,closewait" state shows that the device is still open and
cannot come up again until it has been closed.
The mac attribute is the ethernet address of the remote AoE device.
The netif attribute is the network interface on the localhost
through which we are communicating with the remote AoE device.
There is a script in this directory that formats this information in
a convenient way. Users with aoetools should use the aoe-stat
command::
root@makki root# sh Documentation/admin-guide/aoe/status.sh
e10.0 eth3 up
e10.1 eth3 up
e10.2 eth3 up
e10.3 eth3 up
e10.4 eth3 up
e10.5 eth3 up
e10.6 eth3 up
e10.7 eth3 up
e10.8 eth3 up
e10.9 eth3 up
e4.0 eth1 up
e4.1 eth1 up
e4.2 eth1 up
e4.3 eth1 up
e4.4 eth1 up
e4.5 eth1 up
e4.6 eth1 up
e4.7 eth1 up
e4.8 eth1 up
e4.9 eth1 up
Use /sys/module/aoe/parameters/aoe_iflist (or better, the driver
option discussed below) instead of /dev/etherd/interfaces to limit
AoE traffic to the network interfaces in the given
whitespace-separated list. Unlike the old character device, the
sysfs entry can be read from as well as written to.
It's helpful to trigger discovery after setting the list of allowed
interfaces. The aoetools package provides an aoe-discover script
for this purpose. You can also directly use the
/dev/etherd/discover special file described above.
Driver Options
==============
There is a boot option for the built-in aoe driver and a
corresponding module parameter, aoe_iflist. Without this option,
all network interfaces may be used for ATA over Ethernet. Here is a
usage example for the module parameter::
modprobe aoe_iflist="eth1 eth3"
The aoe_deadsecs module parameter determines the maximum number of
seconds that the driver will wait for an AoE device to provide a
response to an AoE command. After aoe_deadsecs seconds have
elapsed, the AoE device will be marked as "down". A value of zero
is supported for testing purposes and makes the aoe driver keep
trying AoE commands forever.
The aoe_maxout module parameter has a default of 128. This is the
maximum number of unresponded packets that will be sent to an AoE
target at one time.
The aoe_dyndevs module parameter defaults to 1, meaning that the
driver will assign a block device minor number to a discovered AoE
target based on the order of its discovery. With dynamic minor
device numbers in use, a greater range of AoE shelf and slot
addresses can be supported. Users with udev will never have to
think about minor numbers. Using aoe_dyndevs=0 allows device nodes
to be pre-created using a static minor-number scheme with the
aoe-mkshelf script in the aoetools.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
ATA over Ethernet 소개
1-27ATA over Ethernet(AoE)은 LAN의 block storage에 간단히 접근하게 하는 network protocol입니다. Protocol specification은 `http://support.coraid.com/documents/AoEr11.txt`에 있습니다.
2.6 및 3.x kernel용 EtherDrive HOWTO는 `http://support.coraid.com/support/linux/EtherDrive-2.6-HOWTO.html`에 있으며 여러 운용 tip을 제공합니다. 특히 `http://support.coraid.com/support/linux/EtherDrive-2.6-HOWTO-5.html#ss5.19`의 virtual memory tuning 권고를 참고합니다.
`aoetools`는 이 driver와 함께 쓰도록 설계된 userland program이며 `http://aoetools.sourceforge.net/`에서 제공합니다. `Documentation/admin-guide/aoe`의 script는 driver 사용법을 문서화하기 위한 것이므로 aoetools를 설치했다면 필수는 아닙니다.
Protocol, HOWTO, tuning과 userspace utility의 역할입니다.
AoE device node 생성
28-44Udev 사용자는 block device node가 자동으로 생성되는 것을 볼 수 있습니다. 필요한 모든 node를 만들려면 같은 directory의 `udev.txt`에 있는 udev configuration rule을 사용합니다. `udev-install.sh`는 이 rule을 system에 설치하는 방법을 보여 줍니다.
`autoload` script는 필요할 때 aoe module이 load되도록 `/etc/modprobe.d/aoe.conf`를 편집하는 방법을 보여 줍니다. 그러나 AoE discovery에는 몇 초가 걸리므로 autoload보다 module을 미리 load하는 편이 좋습니다. 첫 command에서는 device가 없고 1초 뒤 나타나는 상황이 혼란을 줄 수 있기 때문입니다.
Module load와 discovery 지연이 device-node 가시성에 미치는 흐름입니다.
AoE character·block device 사용
45-71`cat /dev/etherd/err`는 retransmitted packet 같은 error diagnostic output을 기다리며 block합니다. `echo eth2 eth4 > /dev/etherd/interfaces`는 AoE traffic을 `eth2`와 `eth4`로 제한합니다. 보안을 위해 신뢰하지 않는 network의 AoE traffic은 무시해야 하며 아래의 `aoe_iflist` option도 참고합니다.
`echo > /dev/etherd/discover`는 사용할 수 있는 AoE device를 찾도록 driver에 지시합니다. 향후 이 character device들은 sysfs counterpart로 대체되어 사라질 수 있습니다. Aoetools command를 사용하면 이런 구현 세부사항의 변화에서 사용자를 격리할 수 있습니다.
Block device 이름은 whole disk의 경우 `e{shelf}.{slot}`, partition은 `e{shelf}.{slot}p{part}` 형식입니다.
The block devices are named like this::
e{shelf}.{slot}
e{shelf}.{slot}p{part}
... so that "e0.2" is the third blade from the left (slot 2) in the
first shelf (shelf address zero). That's the whole disk. The first
partition on that disk would be "e0.2p1".
특수 file과 block-device 이름의 의미입니다.
AoE sysfs 상태와 interface 제한
72-121`/sys/block`의 각 AoE block device에는 `state`, `mac`, `netif` attribute가 추가됩니다. `state`가 `up`이면 I/O 준비가 됐고, `down`이면 감지됐지만 사용할 수 없습니다. `down,closewait`는 device가 아직 open되어 있어 close하기 전에는 다시 올라올 수 없음을 뜻합니다.
`mac`은 remote AoE device의 Ethernet address이고 `netif`는 localhost가 remote device와 통신하는 network interface입니다.
같은 directory의 status script는 이 정보를 보기 좋게 표시합니다. Aoetools 사용자는 `aoe-stat` command를 사용해야 합니다.
root@makki root# sh Documentation/admin-guide/aoe/status.sh
e10.0 eth3 up
e10.1 eth3 up
e10.2 eth3 up
e10.3 eth3 up
e10.4 eth3 up
e10.5 eth3 up
e10.6 eth3 up
e10.7 eth3 up
e10.8 eth3 up
e10.9 eth3 up
e4.0 eth1 up
e4.1 eth1 up
e4.2 eth1 up
e4.3 eth1 up
e4.4 eth1 up
e4.5 eth1 up
e4.6 eth1 up
e4.7 eth1 up
e4.8 eth1 up
e4.9 eth1 up
Block device별 remote endpoint와 local path 상태입니다.
AoE traffic을 whitespace-separated interface 목록으로 제한할 때 `/dev/etherd/interfaces`보다 `/sys/module/aoe/parameters/aoe_iflist`, 또는 아래 driver option을 쓰는 편이 좋습니다. Sysfs entry는 이전 character device와 달리 read와 write가 모두 가능합니다.
허용 interface 목록을 설정한 뒤 discovery를 trigger하면 유용합니다. `aoetools`의 `aoe-discover` script 또는 `/dev/etherd/discover` special file을 사용할 수 있습니다.
AoE driver option
122-150Built-in aoe driver용 boot option과 이에 대응하는 module parameter `aoe_iflist`가 있습니다. 지정하지 않으면 모든 network interface를 ATA over Ethernet에 사용할 수 있습니다.
usage example for the module parameter::
modprobe aoe_iflist="eth1 eth3"
Interface 선택, timeout, outstanding packet과 minor-number 정책입니다.
`aoe_deadsecs`는 driver가 AoE command에 대한 target response를 기다리는 최대 seconds입니다. 시간이 지나면 device를 `down`으로 표시합니다. Test를 위해 0도 지원하며, 이때 driver는 AoE command를 영원히 재시도합니다.
`aoe_maxout`의 기본값은 128이며 한 번에 AoE target 하나로 보낼 수 있는 미응답 packet의 최대 수입니다.
`aoe_dyndevs` 기본값은 1입니다. 발견 순서에 따라 AoE target에 block-device minor number를 할당하므로 더 넓은 shelf·slot address 범위를 지원합니다. Udev 사용자는 minor number를 신경 쓸 필요가 없습니다. `aoe_dyndevs=0`이면 static minor-number scheme을 사용하며 aoetools의 `aoe-mkshelf`로 device node를 미리 만들 수 있습니다.
Protocol and tools
aoe.rst:1-27LAN block storage protocol과 EtherDrive HOWTO, aoetools를 소개합니다.