저장소 설정 · 2 min read · Feb 05, 2026

GlusterFS를 이용한 CentOS 5.4에서 네 개의 저장 노드에 분산 저장하기

이 튜토리얼은 네 개의 단일 저장 서버(CentOS 5.4 실행)를 하나의 대형 저장 서버(분산 저장)로 결합하는 방법을 보여줍니다. 클라이언트 시스템(CentOS 5.4 역시)은 저장소를 로컬 파일 시스템처럼 접근할 수 있습니다. GlusterFS는 여러 페타바이트로 확장할 수 있는 클러스터 파일 시스템입니다. Infiniband RDMA 또는 TCP/IP 상호 연결을 통해 다양한 저장 벽돌을 하나의 대형 병렬 네트워크 파일 시스템으로 집계합니다. 저장 벽돌은 SATA-II RAID 및 Infiniband HBA가 있는 x86_64 서버와 같은 일반 하드웨어로 구성될 수 있습니다.

이러한 종류의 저장소(분산 저장)는 복제 저장소의 경우와 같이 고가용성 기능을 제공하지 않음을 유의하시기 바랍니다.

이것이 귀하에게 작동할 것이라는 보장을 하지 않습니다!

1 사전 참고

이 튜토리얼에서는 다섯 개의 시스템, 네 개의 서버 및 하나의 클라이언트를 사용합니다:

  • server1.example.com: IP 주소 192.168.0.100 (서버)
  • server2.example.com: IP 주소 192.168.0.101 (서버)
  • server3.example.com: IP 주소 192.168.0.102 (서버)
  • server4.example.com: IP 주소 192.168.0.103 (서버)
  • client1.example.com: IP 주소 192.168.0.104 (클라이언트)

모든 다섯 시스템은 서로의 호스트 이름을 확인할 수 있어야 합니다. DNS를 통해 이를 수행할 수 없는 경우, /etc/hosts 파일을 편집하여 모든 다섯 시스템에 다음 줄이 포함되도록 해야 합니다:

vi /etc/hosts

| [...] 192.168.0.100 server1.example.com server1 192.168.0.101 server2.example.com server2 192.168.0.102 server3.example.com server3 192.168.0.103 server4.example.com server4 192.168.0.104 client1.example.com client1 [...] |

(다음 설정에서 호스트 이름 대신 IP 주소를 사용하는 것도 가능합니다. IP 주소를 사용하려는 경우, 호스트 이름이 확인될 수 있는지 여부에 대해 걱정할 필요가 없습니다.)

2 GlusterFS 서버 설정

server1.example.com/server2.example.com/server3.example.com/server4.example.com:

GlusterFS는 CentOS 5.4용 패키지로 제공되지 않으므로, 직접 빌드해야 합니다. 먼저 필수 패키지를 설치합니다:

yum groupinstall 'Development Tools'
yum groupinstall 'Development Libraries'
yum install libibverbs-devel fuse-devel

그런 다음 http://www.gluster.org/download.php 에서 최신 GlusterFS 릴리스를 다운로드하고 다음과 같이 빌드합니다:

cd /tmp  
wget http://ftp.gluster.com/pub/gluster/glusterfs/2.0/LATEST/glusterfs-2.0.9.tar.gz  
tar xvfz glusterfs-2.0.9.tar.gz  
cd glusterfs-2.0.9  
./configure

./configure 명령의 끝에서 다음과 같은 내용을 볼 수 있어야 합니다:

[...]  
GlusterFS configure summary  
===========================  
FUSE client        : yes  
Infiniband verbs   : yes  
epoll IO multiplex : yes  
Berkeley-DB        : yes  
libglusterfsclient : yes  
argp-standalone    : no  
  
[root@server1 glusterfs-2.0.9]#
make && make install  
ldconfig

그 후 GlusterFS 버전을 확인합니다(버전은 2.0.9이어야 함):

glusterfs --version
[root@server1 glusterfs-2.0.9]# glusterfs --version  
glusterfs 2.0.9 built on Mar 1 2010 15:34:50  
Repository revision: v2.0.9  
Copyright (c) 2006-2009 Gluster Inc.   
GlusterFS는 전혀 보증이 없습니다.  
GNU 일반 공공 라이센스의 조건에 따라 GlusterFS의 복사본을 재배포할 수 있습니다.  
[root@server1 glusterfs-2.0.9]#

다음으로 몇 개의 디렉터리를 생성합니다:

mkdir /data/  
mkdir /data/export  
mkdir /data/export-ns  
mkdir /etc/glusterfs

이제 GlusterFS 서버 구성 파일 /etc/glusterfs/glusterfsd.vol을 생성하여 어떤 디렉터리가 내보내질 것인지(/data/export)와 어떤 클라이언트가 연결할 수 있는지를 정의합니다(192.168.0.104 = client1.example.com):

vi /etc/glusterfs/glusterfsd.vol

| volume posix type storage/posix option directory /data/export end-volume volume locks type features/locks subvolumes posix end-volume volume brick type performance/io-threads option thread-count 8 subvolumes locks end-volume volume server type protocol/server option transport-type tcp option auth.addr.brick.allow 192.168.0.104 subvolumes brick end-volume |

IP 주소에 와일드카드를 사용할 수 있으며(예: 192.168.*), 여러 IP 주소를 쉼표로 구분하여 지정할 수 있습니다(예: 192.168.0.104,192.168.0.105).

그 후 다음 심볼릭 링크를 생성합니다…

ln -s /usr/local/sbin/glusterfsd /sbin/glusterfsd

… 그리고 GlusterFS 서버의 시스템 시작 링크를 생성하고 시작합니다:

chkconfig --levels 35 glusterfsd on  
/etc/init.d/glusterfsd start
Share: X/Twitter LinkedIn

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

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