서버 설정 · 6 min read · Jan 07, 2026

Debian 8에서 Ethernet을 통한 ATA(AoE) 설정하기 (Initiator 및 Target)

이 튜토리얼에서는 Debian 8 /Jessie에서 AoE 클라이언트(initiator)와 서버(target)를 설정하는 방법을 보여줍니다. AoE는 “Ethernet을 통한 ATA”를 의미하며, 이는 AoE 클라이언트가 일반 이더넷 네트워크를 통해 (원격) AoE 서버의 저장 장치를 사용할 수 있게 해주는 스토리지 영역 네트워크(SAN) 프로토콜입니다. 여기서 “원격”은 “같은 LAN 내부“를 의미합니다. 왜냐하면 AoE는 LAN 외부에서 라우팅할 수 없기 때문입니다(이는 iSCSI와 비교할 때 주요한 차이점입니다). AoE 클라이언트(initiator)에게 원격 저장소는 일반적으로 로컬에 연결된 하드 드라이브처럼 보입니다.

1 사전 참고

여기서는 두 개의 Debian 8 서버를 사용하고 있습니다:

  • server1.example.com (Initiator): IP 주소 192.168.1.100
  • server2.example.com (Target): IP 주소 192.168.1.101

2 두 시스템에서 AoE 커널 모듈 로드하기

server1/server2:

첫 번째 단계로, 서버의 커널이 Ethernet을 통한 ATA를 지원하는지 확인해야 합니다. 루트 사용자로 다음 명령어를 실행하세요.

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

이 명령어는 다음과 같은 결과를 보여줘야 합니다:

root@server1:/tmp# grep ATA_OVER /boot/config-`uname -r`  
CONFIG_ATA_OVER_ETH=m  
root@server1:/tmp#

이는 AoE가 커널 모듈로 내장되어 있음을 의미합니다. 이제 모듈이 로드되었는지 확인해 보겠습니다:

lsmod | grep aoe

아무 것도 반환되지 않으면, 이는 로드되지 않았음을 의미합니다. 이 경우, 다음과 같이 로드할 수 있습니다:

modprobe aoe

모듈이 로드되었는지 다시 확인해 보겠습니다:

lsmod | grep aoe
root@server1:/tmp# lsmod | grep aoe  
aoe 51917 0  
root@server1:/tmp#

시스템 부팅 시 모듈이 자동으로 로드되도록 하려면, aoe 모듈을 /etc/modules에 추가합니다:

nano /etc/modules
# /etc/modules: 부팅 시 로드할 커널 모듈.
#
# 이 파일에는 부팅 시 로드해야 하는 커널 모듈의 이름이 포함되어 있습니다.
# 한 줄에 하나씩. "#"로 시작하는 줄은 무시됩니다.
# 매개변수는 모듈 이름 뒤에 지정할 수 있습니다.

aoe

3 Target(server2) 설정하기

server2:

먼저, AoE 타겟(server2)을 설정합니다:

apt-get install vblade

사용하지 않는 논리 볼륨, 이미지 파일, 하드 드라이브(예: /dev/sdb), 하드 드라이브 파티션(예: /dev/sdb1) 또는 RAID 장치(예: /dev/md0)를 저장소로 사용할 수 있습니다. 이 예제에서는 /storage 폴더에 저장된 20GB의 이미지 파일을 사용하겠습니다.

mkdir /storage  
dd if=/dev/zero of=/storage/storage1.img bs=1024k count=20000

이 명령어는 크기가 20GB인 이미지 파일 /storage/storage1.img를 생성합니다.

대신 논리 볼륨을 사용하려면, 다음과 같이 vg0 볼륨 그룹에 storage1이라는 이름으로 20GB 크기의 볼륨을 생성할 수 있습니다:

lvcreate -L20G -n storage1 vg0

이제 저장 장치를 다음과 같이 내보냅니다:

vbladed 0 1 eth0 /storage/storage1.img

첫 번째 숫자(0)는 선반 번호(주), 두 번째(1)는 슬롯 번호(부), 이 숫자들은 원하는 대로 변경할 수 있습니다. 각 AoE 장치는 고유해야 하는 주/부 쌍으로 식별되며, 주는 0-65535 사이, 부는 0-255 사이여야 합니다. eth0 부분은 vbladed에 사용할 이더넷 장치를 알려줍니다(이더넷 장치가 eth1인 경우 eth1을 사용하세요 - 이더넷 장치에 대한 정보는 다음 명령어를 실행하여 확인할 수 있습니다:

ifconfig

).

타겟을 부팅할 때마다 내보내기를 자동으로 시작하려면, /etc/rc.local을 열고…

nano /etc/rc.local

… 다음 줄을 추가합니다(종료 0 줄 앞에):

[...]  
/usr/sbin/vbladed 0 1 eth0 /storage/storage1.img  
[...]  

4 AoE 클라이언트 / Initiator(server1) 설정하기

server1:

server1에서 initiator를 설치합니다:

apt-get install aoetools

이제 사용 가능한 AoE 저장 장치가 무엇인지 확인합니다:

aoe-discover

걱정하지 마세요, 이 명령어는 아무 출력도 보여주지 않을 것입니다. 다음 명령어는:

aoe-stat

이제 저장 장치를 보여줘야 합니다:

root@server1:/tmp# aoe-stat  
e0.1 20.971GB eth0 1024 up  
root@server1:/tmp#

이 시점에서 클라이언트 박스에 /dev/etherd/e0.1이라는 이름의 새로운 블록 장치가 사용 가능해졌습니다. /dev 트리를 살펴보면 새로운 노드가 나타납니다:

ls -la /dev/etherd/
root@server1:/tmp# ls -la /dev/etherd/  
total 0  
drwxr-xr-x 2 root root 160 Mar 22 08:46 .  
drwxr-xr-x 19 root root 3160 Mar 22 08:34 ..  
c-w--w---- 1 root disk 152, 3 Mar 22 08:34 discover  
brw-rw---- 1 root disk 152, 0 Mar 22 08:46 e0.1  
cr--r----- 1 root disk 152, 2 Mar 22 08:34 err  
c-w--w---- 1 root disk 152, 6 Mar 22 08:34 flush  
c-w--w---- 1 root disk 152, 4 Mar 22 08:34 interfaces  
c-w--w---- 1 root disk 152, 5 Mar 22 08:34 revalidate  
root@server1:/tmp#

/dev/etherd/e0.1 장치를 사용하려면, 포맷해야 합니다:

fdisk /dev/etherd/e0.1
root@server1:/tmp# fdisk /dev/etherd/e0.1
fdisk에 오신 것을 환영합니다 (util-linux 2.25.2).  
변경 사항은 작성하기로 결정할 때까지 메모리에만 남습니다.  
쓰기 명령어를 사용하기 전에 주의하세요.
장치에 인식된 파티션 테이블이 없습니다.  
새로운 DOS 디스크 레이블이 디스크 식별자 0x2922f0be로 생성되었습니다.
명령어 (도움말은 m): <-- n  
파티션 유형  
p 기본 (0 기본, 0 확장, 4 무료)  
e 확장 (논리 파티션을 위한 컨테이너)  
선택 (기본값 p): <-- p  
파티션 번호 (1-4, 기본값 1): <-- 1  
첫 번째 섹터 (2048-40959999, 기본값 2048): <-- ENTER  
마지막 섹터, +섹터 또는 +크기{K,M,G,T,P} (2048-40959999, 기본값 40959999): <-- ENTER
새로운 'Linux' 유형의 파티션 1이 생성되었으며 크기는 19.5 GiB입니다.
명령어 (도움말은 m): <-- w
파티션 테이블이 변경되었습니다.  
ioctl()를 호출하여 파티션 테이블을 다시 읽습니다.  
디스크 동기화 중.

이제 /dev/etherd/e0.1p1에 파일 시스템을 생성합니다…

mkfs.ext4 /dev/etherd/e0.1p1
root@server1:/tmp# mkfs.ext4 /dev/etherd/e0.1p1  
mke2fs 1.42.12 (29-Aug-2014)  
5119744 4k 블록과 1281120 inode로 파일 시스템 생성  
파일 시스템 UUID: 2342cd83-bd45-4975-96c0-b0f366b73778  
슈퍼블록 백업이 다음 블록에 저장되었습니다:  
 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,  
 4096000
그룹 테이블 할당: 완료  
inode 테이블 작성: 완료  
저널 생성 (32768 블록): 완료  
슈퍼블록 및 파일 시스템 회계 정보 작성: 완료

… 그리고 테스트 목적으로 마운트합니다:

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

이제 다음 명령어의 출력에서 새로운 장치를 볼 수 있어야 합니다…

mount
root@server1:/tmp# mount  
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)  
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)  
odev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=125556,mode=755)  
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)  
tmpfs on /run type tmpfs (rw,nosuid,relatime,size=204220k,mode=755)  
/dev/sda1 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)  
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)  
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)  
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)  
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)  
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)  
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)  
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)  
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)  
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)  
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)  
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)  
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)  
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)  
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)  
mqueue on /dev/mqueue type mqueue (rw,relatime)  
debugfs on /sys/kernel/debug type debugfs (rw,relatime)  
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)  
rpc_pipefs on /run/rpc_pipefs type rpc_pipefs (rw,relatime)  
/dev/etherd/e0.1p1 on /mnt type ext4 (rw,relatime,data=ordered)  
root@server1:/tmp#

… 및

df -h
root@server1:/tmp# df -h  
파일 시스템 크기 사용 가능 사용% 마운트 위치  
/dev/sda1 57G 1.1G 54G 2% /  
udev 10M 0 10M 0% /dev  
tmpfs 200M 4.6M 195M 3% /run  
tmpfs 499M 0 499M 0% /dev/shm  
tmpfs 5.0M 0 5.0M 0% /run/lock  
tmpfs 499M 0 499M 0% /sys/fs/cgroup  
/dev/etherd/e0.1p1 20G 44M 19G 1% /mnt  
root@server1:/tmp#

이제 다음과 같이 언마운트할 수 있습니다:

umount /mnt

부팅 시 자동으로 장치가 마운트되도록 하려면, 예를 들어 /storage 디렉토리에, 해당 디렉토리를 생성합니다…

mkdir /storage

… 그리고 /etc/fstab에 다음 줄을 추가합니다:

nano /etc/fstab
[...]  
/dev/etherd/e0.1p1       /storage        ext4    defaults,auto,_netdev 0 0

이것만으로는 부팅 시 장치가 마운트되지 않습니다. 왜냐하면 AoE 관련 내용이 /etc/fstab이 읽힌 후에 로드되기 때문입니다. 따라서 /etc/rc.local을 열고…

nano /etc/rc.local

… 다음 줄을 추가합니다(종료 0 줄 앞에):

[...]  
aoe-discover  
sleep 5  
mount -a  
[...]  

테스트 목적으로 시스템을 재부팅할 수 있습니다:

reboot

재부팅 후, 장치가 마운트되어야 합니다:

mount
root@server1:/tmp# mount  
[...snip...]  
/dev/etherd/e0.1p1 on /storage type ext4 (rw,relatime,data=ordered)  
[...snip...]
df -h
root@server1:/tmp# df -h  
파일 시스템 크기 사용 가능 사용% 마운트 위치  
/dev/sda1 57G 1.1G 54G 2% /  
udev 10M 0 10M 0% /dev  
tmpfs 200M 4.6M 195M 3% /run  
tmpfs 499M 0 499M 0% /dev/shm  
tmpfs 5.0M 0 5.0M 0% /run/lock  
tmpfs 499M 0 499M 0% /sys/fs/cgroup  
/dev/etherd/e0.1p1 20G 44M 19G 1% /storage

이제 마운트된 파티션에서 테스트 쓰기를 할 수 있습니다:

touch /storage/test.txt

ls 명령어로 파일이 작성되었는지 확인합니다:

ls -la /storage
root@server1:/tmp# ls -la /storage  
total 24  
drwxr-xr-x 3 root root 4096 Mar 22 09:06 .  
drwxr-xr-x 23 root root 4096 Mar 22 09:05 ..  
drwx------ 2 root root 16384 Mar 22 09:00 lost+found  
-rw-r--r-- 1 root root 0 Mar 22 09:06 test.txt  
root@server1:/tmp#

test.txt 파일이 server2에서 마운트한 볼륨에 성공적으로 작성되었습니다.

5 링크

Share: X/Twitter LinkedIn

새 게시물을 받은 편지함에서 받기

스팸은 없습니다. 언제든지 구독 해지 가능합니다.