서버 설정 · 2 min read · Feb 07, 2026
글러스터FS를 이용한 데비안 레니에서의 네 개의 저장 노드 간 분산 저장
이 튜토리얼에서는 네 개의 단일 저장 서버(데비안 레니 실행)를 하나의 대형 저장 서버(분산 저장)로 결합하는 방법을 보여줍니다. 클라이언트 시스템(데비안 레니 역시)은 저장소를 로컬 파일 시스템처럼 접근할 수 있습니다. GlusterFS는 여러 페타바이트로 확장할 수 있는 클러스터 파일 시스템입니다. 이는 다양한 저장 블록을 인피니밴드 RDMA 또는 TCP/IP 상호 연결을 통해 하나의 대형 병렬 네트워크 파일 시스템으로 집계합니다. 저장 블록은 SATA-II RAID 및 인피니밴드 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| 127.0.0.1 localhost.localdomain localhost 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 # 다음 줄은 IPv6 호환 호스트에 대해 바람직합니다 ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts |
(다음 설정에서 호스트 이름 대신 IP 주소를 사용하는 것도 가능합니다. IP 주소를 사용하려면 호스트 이름이 확인될 수 있는지 여부에 대해 걱정할 필요가 없습니다.)
2 GlusterFS 서버 설정
server1.example.com/server2.example.com/server3.example.com/server4.example.com:
GlusterFS는 데비안 레니에 대한 데비안 패키지로 제공되지 않으므로, 우리는 직접 빌드해야 합니다. 먼저 필수 패키지를 설치합니다:
aptitude install sshfs build-essential flex bison byacc libdb4.6 libdb4.6-dev그런 다음 http://www.gluster.org/download.php 에서 최신 GlusterFS 릴리스를 다운로드하고 다음과 같이 빌드합니다:
cd /tmp
wget http://ftp.gluster.com/pub/gluster/glusterfs/2.0/LATEST/glusterfs-2.0.1.tar.gz
tar xvfz glusterfs-2.0.1.tar.gz
cd glusterfs-2.0.1
./configure --prefix=/usr > /dev/nullserver1:/tmp/glusterfs-2.0.1# ./configure --prefix=/usr > /dev/null
GlusterFS configure summary
===========================
FUSE client : no
Infiniband verbs : no
epoll IO multiplex : yes
Berkeley-DB : yes
libglusterfsclient : yes
mod_glusterfs : no ()
argp-standalone : no
server1:/tmp/glusterfs-2.0.1#make && make install
ldconfig명령어
glusterfs --version이제 방금 컴파일한 GlusterFS 버전(이 경우 2.0.1)이 표시되어야 합니다:
server1:/tmp/glusterfs-2.0.1# glusterfs --version
glusterfs 2.0.1 built on May 29 2009 17:23:10
Repository revision: 5c1d9108c1529a1155963cb1911f8870a674ab5b
Copyright (c) 2006-2009 Z RESEARCH Inc.
GlusterFS comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GlusterFS under the terms of the GNU General Public License.
server1:/tmp/glusterfs-2.0.1# 다음으로 몇 개의 디렉토리를 생성합니다:
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).
그 후 glusterfsd init 스크립트의 시스템 시작 링크를 생성합니다…
update-rc.d glusterfsd defaults… 그리고 glusterfsd를 시작합니다:
/etc/init.d/glusterfsd start새 게시물을 받은 편지함에서 받기
스팸은 없습니다. 언제든지 구독 해지 가능합니다.