GlusterFS 설정 · 2 min read · Feb 04, 2026
Fedora 12에서 GlusterFS로 NFS 유사 독립형 스토리지 서버 만들기 - 2페이지
3 GlusterFS 클라이언트 설정
client1.example.com:
Fedora 12용 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 Feb 19 2010 19:20:46 Repository revision: v2.0.9 Copyright (c) 2006-2009 Gluster Inc.
그런 다음 다음 두 디렉토리를 생성합니다:
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 # can be IP or hostname 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_server2-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_server2-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 링크
- GlusterFS: http://www.gluster.org/
- Fedora: http://fedoraproject.org/
새 게시물을 받은 편지함에서 받기
스팸은 없습니다. 언제든지 구독 해지 가능합니다.