서버 설정 · 4 min read · Feb 04, 2026

페도라 13에서 GlusterFS로 NFS와 유사한 독립형 스토리지 서버 만들기

이 튜토리얼은 페도라 13에서 독립형 스토리지 서버를 설정하는 방법을 보여줍니다. NFS 대신 여기서는 GlusterFS를 사용합니다. 클라이언트 시스템은 스토리지를 로컬 파일 시스템처럼 접근할 수 있습니다. GlusterFS는 여러 페타바이트로 확장할 수 있는 클러스터 파일 시스템입니다. Infiniband RDMA 또는 TCP/IP 상의 다양한 스토리지 브릭을 하나의 대규모 병렬 네트워크 파일 시스템으로 집계합니다. 스토리지 브릭은 SATA-II RAID와 Infiniband HBA가 장착된 x86_64 서버와 같은 일반 하드웨어로 구성될 수 있습니다.

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

1 사전 참고

이 튜토리얼에서는 서버와 클라이언트 두 시스템을 사용합니다:

  • server1.example.com: IP 주소 192.168.0.100 (서버)
  • client1.example.com: IP 주소 192.168.0.101 (클라이언트)

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

vi /etc/hosts

| [...] 192.168.0.100 server1.example.com server1 192.168.0.101 client1.example.com client1 [...] |

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

2 GlusterFS 서버 설정

server1.example.com:

GlusterFS 서버는 페도라 13의 패키지로 제공되므로 다음과 같이 설치할 수 있습니다:

yum install glusterfs-server

명령어

glusterfs --version

이제 방금 설치한 GlusterFS 버전(이 경우 2.0.9)이 표시되어야 합니다:

[root@server1 ~]# glusterfs --version  
glusterfs 2.0.9 built on Apr 11 2010 20:39:55  
Repository revision: v2.0.9  
Copyright (c) 2006-2009 Gluster Inc.   
GlusterFS comes with ABSOLUTELY NO WARRANTY.  
You may redistribute copies of GlusterFS under the terms of the GNU General Public License.  
[root@server1 ~]#

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

mkdir /data/  
mkdir /data/export  
mkdir /data/export-ns

이제 GlusterFS 서버 구성 파일 /etc/glusterfs/glusterfsd.vol를 생성합니다(먼저 원본 /etc/glusterfs/glusterfsd.vol 파일의 백업을 만듭니다). 이 파일은 어떤 디렉토리가 내보내질지(/data/export)와 어떤 클라이언트가 연결할 수 있는지를 정의합니다(192.168.0.101 = client1.example.com):

cp /etc/glusterfs/glusterfsd.vol /etc/glusterfs/glusterfsd.vol_orig  
cat /dev/null > /etc/glusterfs/glusterfsd.vol  
vi /etc/glusterfs/glusterfsd.vol

| volume posix type storage/posix option directory /data/export end-volume volume locks type features/locks option mandatory-locks on 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.101 # 허용된 클라이언트의 IP 주소(이름)를 쉼표로 구분하여 추가하세요 subvolumes brick end-volume |

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

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

chkconfig --levels 35 glusterfsd on  
/etc/init.d/glusterfsd start

3 GlusterFS 클라이언트 설정

client1.example.com:

페도라 13용 GlusterFS 클라이언트 rpm 패키지가 있지만, 문제는 GlusterFS 공유에 접근할 때 df: /mnt/glusterfs': Software caused connection abort 또는 df:/mnt/glusterfs’: Transport endpoint is not connected와 같은 오류가 발생한다는 것입니다. 그래서 이러한 문제를 피하기 위해 소스에서 GlusterFS 클라이언트를 빌드합니다.

GlusterFS 클라이언트를 빌드하기 전에 필수 패키지를 설치합니다:

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

그런 다음 GlusterFS 2.0.9 소스를 다운로드합니다(서버에 설치된 것과 동일한 버전임을 유의하세요!) 그리고 다음과 같이 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@client1 glusterfs-2.0.9]#
make && make install  
ldconfig

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

glusterfs --version
[root@client1 glusterfs-2.0.9]# glusterfs --version  
glusterfs 2.0.9 built on Sep 27 2010 19:20:46  
Repository revision: v2.0.9  
Copyright (c) 2006-2009 Gluster Inc.   
GlusterFS comes with ABSOLUTELY NO WARRANTY.  
You may redistribute copies of GlusterFS under the terms of the GNU General Public License.  
[root@client1 glusterfs-2.0.9]#

그런 다음 다음 두 디렉토리를 생성합니다:

mkdir /mnt/glusterfs  
mkdir /etc/glusterfs

다음으로 파일 /etc/glusterfs/glusterfs.vol를 생성합니다:

vi /etc/glusterfs/glusterfs.vol

| volume remote type protocol/client option transport-type tcp option remote-host server1.example.com # IP 또는 호스트 이름 가능 option remote-subvolume brick end-volume volume writebehind type performance/write-behind option window-size 4MB subvolumes remote end-volume volume cache type performance/io-cache option cache-size 512MB subvolumes writebehind end-volume |

옵션 remote-host 줄에 올바른 서버 호스트 이름 또는 IP 주소를 사용해야 합니다!

그게 전부입니다! 이제 다음 두 명령 중 하나를 사용하여 GlusterFS 파일 시스템을 /mnt/glusterfs에 마운트할 수 있습니다:

glusterfs -f /etc/glusterfs/glusterfs.vol /mnt/glusterfs

또는

mount -t glusterfs /etc/glusterfs/glusterfs.vol /mnt/glusterfs

이제…

mount

출력에서 새로운 공유를 볼 수 있어야 합니다:

[root@client1 glusterfs-2.0.9]# mount  
/dev/mapper/vg_client1-lv_root on / type ext4 (rw)  
proc on /proc type proc (rw)  
sysfs on /sys type sysfs (rw)  
devpts on /dev/pts type devpts (rw,gid=5,mode=620)  
tmpfs on /dev/shm type tmpfs (rw)  
/dev/sda1 on /boot type ext4 (rw)  
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)  
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)  
/etc/glusterfs/glusterfs.vol on /mnt/glusterfs type fuse.glusterfs (rw,allow_other,default_permissions,max_read=131072)  
[root@client1 glusterfs-2.0.9]#

… 그리고…

df -h
[root@client1 glusterfs-2.0.9]# df -h  
Filesystem            Size  Used Avail Use% Mounted on  
/dev/mapper/vg_client1-lv_root  
                       29G  2.6G   25G  10% /  
tmpfs                 185M     0  185M   0% /dev/shm  
/dev/sda1            194M   23M  161M  13% /boot  
/etc/glusterfs/glusterfs.vol  
                       29G  2.7G   25G  10% /mnt/glusterfs  
[root@client1 glusterfs-2.0.9]#

클라이언트에서 GlusterFS 공유를 수동으로 마운트하는 대신, /etc/fstab을 수정하여 클라이언트가 부팅할 때 공유가 자동으로 마운트되도록 할 수 있습니다.

/etc/fstab을 열고 다음 줄을 추가합니다:

vi /etc/fstab

| [...] /etc/glusterfs/glusterfs.vol /mnt/glusterfs glusterfs defaults 0 0 |

수정된 /etc/fstab이 작동하는지 테스트하려면 클라이언트를 재부팅합니다:

reboot

재부팅 후…

df -h

출력에서 공유를 찾을 수 있어야 합니다…

… 그리고…

mount

4 링크

Share: X/Twitter LinkedIn

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

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