systemctl enable glusterd --now
# 자신말고 다른 node들 확인
gluster peer probe {host명}
$ gluster pool list
UUID Hostname State
***-***-***-***-*** *** Connected
***-***-***-***-*** *** Connected
- "GlusterFS Volume
- Volume Types
Distriubed
Replicated
Distributed Replicated
Dispersed
Distributed Dispersed
- 한 Brick에는 하나의 경로만 나온다.
- 데이터를 나눠서 저장한다. 실제 디스크 용량=사용 가능한 디스크 용량
- 파일 복제가 없으므로 노드 중 하나만 문제가 발생해도 데이터가 소실된다.
- 대상 디렉토리는 마운트 된 경로가 아닌 마운트 된 디렉토리의 하위 경로여야 한다.
gluster volume create ${Volume명} ${Host1명}:${HOST1_GlusterFS_DiR} ${Host2명}:${HOST2_GlusterFS_DiR} ...
# example
gluster volume create distributed_vol glusterfs:/mnt/xvdb/dist_vol gluster02:/mnt/xvdb/dist_vol gluster03:/mnt/xvdb/dist_vol
- 데이터를 복제한다. 실제 디스크용량 / 복제수 = 사용 가능한 디스크 용량
- 복제 수 = 노드 수로 지정하지 않으면 split brain 발생 가능 경고가 나온다.
- 최소 3개 이상은 되어야 함. 2개일 때도 split brain이 발생 가능 경고가 나온다.
gluster volume create ${Volume명} replica ${복제수} ${Host1명}:${HOST1_GlusterFS_DiR} ${Host2명}:${HOST2_GlusterFS_DiR} ...
# example
sudo gluster volume create replicated_vol replica 3 glusterfs:/mnt/xvdb/rep_vol gluster02:/mnt/xvdb/rep_vol gluster03:/mnt/xvdb/rep_vol
- Volume 생성하면 따로 Process를 생성해줘야 한다
- TCP 49152로 Process 생성, 다른 Brick에 있는 Volume Process와 통신
gluster volume start ${Volume명}
# example
gluster volume start distributed_vol
gluster volume start replicated_vol
$ df -h
/dev/***1 15T 3.8G 15T 1% /u01
***:/*** 15T 153G 15T 2% /u01/***/***