AoE

最後更新: 2016-05-18

介紹

 

AoE encapsulates those commands inside Ethernet frames

 * AoE runs on layer 2 Ethernet(fast and lightweight) <= No IP/TCP overhead, but non-routability
 * no password verification or encryption
 * ACL (allowing connections only from specific MAC addresses)

AoE Header Format:

 * EtherType 0x88A2
 * 24 byte

Initiator --> Target-(Disk)

 


AoE "config string" feature

record who is using the device (防止 simultaneously)

 

Check Target Support AOE (Linux)

Target:

grep ATA_OVER /boot/config-`uname -r`

CONFIG_ATA_OVER_ETH=m

modprobe aoe

Auto load module at startup

# Ubuntu

echo aoe >> /etc/modules

# Centos6

echo aoe > /etc/sysconfig/modules/aoe.modules
chmod +x /etc/sysconfig/modules/aoe.modules

安裝

apt-get install vblade

獲得

 - vblade - process that uses raw sockets to perform ATA over Ethernet (foreground)

    * Dæmonized version: vbladed

 - kvblade - script to daemonize the vblade process

設定

/etc/vblade.conf

# network_device shelf slot file/disk/partition mac[,mac[,mac]]
#eth0 0 0 /dev/sdb 00:11:22:33:44:55

 * 限制了 MAC 後, 直頂 discover 唔到

Start Service

/etc/init.d/vblade

 

Usage

vblade [ -m mac[,mac...] ] shelf slot netif filename

  -m MAC    # MAC addresses permitted access to the vblade
  -r             # read-only
  -d             # O_DIRECT
  -s             # O_SYNC (writes  are  committed  to  disk before returning to the client)

i.e.

(server)# dd if=/dev/zero of=vblade0.img count=1 bs=1M
(server)# vblade 1 1 eth0 vblade0.img

pid 22588: e0.0, 2097152 sectors O_RDWR

shelf: major
slot: minor

 



Initiator

 

 * mapped it as a Logical Unit (LU)

安裝 Tools:

# C6

yum install aoetools

# U14

apt-get install aoetools

獲得:

/sbin/aoe-version
/sbin/aoe-discover        # AoE config query broadcast
/sbin/aoe-stat
/sbin/aoe-interfaces
/sbin/aoe-revalidate
/sbin/aoe-flush         # flush the "down" devices out of the aoe driver
                               # Default: remember all devices it has seen until the module is unloaded
                               # rmmod aoe
/sbin/aoecfg             # manipulate AoE configuration strings    
/sbin/aoeping           # simple communication with AoE device                    
/sbin/aoe-mkshelf
/sbin/aoe-mkdevs
/sbin/coraid-update

Usage

# version

aoe-version

              aoetools: 30
  installed aoe driver: 85
    running aoe driver: 85

# tell aoe driver to discover AoE devices

aoe-discover

# load module

if the dæmon on the Target server is interrupted or exits, pending requests to the Initiator's AoE block devices will hang at least until the dæmon is restarted.

modprobe aoe aoe_deadsecs=10

# only eth0 allowable for AoE traffic

# restrict aoe driver to specified network interfaces

modprobe aoe aoe_iflist="eth1 eth2"

查看

aoe-interfaces

再設定

aoe-interfaces eth1 [eth2]

-c    # clear the interface access list, permitting any interface to be used.

 

# print aoe device status report

aoe-stat

# format 及 mount 一個 AOE Device

/dev/etherd/e0.1

parted /dev/etherd/e0.1

mkfs.ext4 /dev/etherd/e0.1p1

mount /dev/etherd/e0.1p1 /mnt

revalidate

# tells the aoe driver to revalidate the disk (AoE device disappears(down) or changes size)

aoe-revalidate e1.1

# Auto mount aoe partition

udev

cat > /etc/udev/rules.d/60-aoe.rules << EOM
SUBSYSTEM=="aoe", NAME="etherd/%k", GROUP="disk", MODE="0220"
SUBSYSTEM=="aoe", KERNEL=="err", MODE="0440"
EOM

/etc/rc.local

# 引發 udev event
aoe-discover
mount /dev/etherd/e0.1p1 /mnt

 



進階工具 (Centos6 無此工具)

 

vblade-persist - show and manipulate persistently-exported ATA-over-Ethernet devices.

SYNOPSIS

    vblade-persist ls [--no-header]
    vblade-persist setup shelf slot netif blockdev
    vblade-persist destroy shelf slot
    vblade-persist { start | stop | restart | auto | noauto } shelf slot
    vblade-persist { start | stop | restart | auto | noauto } all
    vblade-persist mac shelf slot { ls | clear }
    vblade-persist mac shelf slot { add | del } [ addr ... ]

# AoE device should be started automatically ( auto ) or not ( noauto ) at system  boot  time.

auto shelf slot

noauto shelf slot

 



Window Client (WinAoE)

 

[1] winaoe

License: GPL

Homepage: http://winaoe.org/

C:\Windows\system32\drivers\aoe32/64.sys
C:\Windows\system32\aoe.exe

How to use WinAoE

For general AoE access it is sufficient to just install the driver (using "Control Panel", "Add Hardware", until I make an installer).

After installing you can use the "aoe" command in a command prompt window to mount and unmount AoE drives (type "aoe" for a help screen).

[2] StarWind AoE Initiator

License: free / paid version

https://www.starwindsoftware.com/aoe-ataoverethernet-initiator

options:
        -i      do ATA device identify dump as raw hex
        -I      do ATA device identify print fields
        -v      be verbose

options taking arguments:

        -s      timeout in seconds
        -S      perform SMART command
        -t      specify number for starting AoE tag

A SAN allows the physical hard drive to be removed from the server that uses it, and placed on the network.

 


qaoed

 

Mulithreaded ATA over Ethernet storage target qaoed(8)

https://github.com/inste/qaoed

 

 

Creative Commons license icon Creative Commons license icon