- Linux Ubuntu 18.04
- Nodes
1. client-node : xxxxx
2. glusterfs-node1 : 10.130.15.87
3. glusterfs-node2 : 10.130.117.8
- Install
glusterfs-server
on Storage Server - Create Mount Point on Storage Server
- Set Storage Pool
- Create Volume
- Install
glusterfs-client
- Create Mount Point on Client
- Bind Mount Point from Client to Storage Volume
- edit hosts (map ip & hostname)
$ vi /etc/hosts
add configs
10.130.15.87 glusterfs-node1
10.130.117.8 glusterfs-node2
- install software-properties-common
$ sudo apt install software-properties-common -y
- download glusterfs public-key
see version on https://download.gluster.org/pub/gluster/glusterfs/
$ wget -O- https://download.gluster.org/pub/gluster/glusterfs/6/rsa.pub | apt-key add -
- add repository
$ sudo add-apt-repository ppa:gluster/glusterfs-6
- install glusterfs
$ sudo apt install glusterfs-server -y
- start glusterfs service
$ sudo systemctl start glusterd
- enabled run everytime at system boot
$ sudo systemctl enable glusterd
- show glusterfs status
$ systemctl status glusterd
- show glusterfs version
$ glusterfsd --version
- create directory for share in cluster
$ mkdir -p /storage
- add server to glusterfs storage pool
$ gluster peer probe glusterfs-node2
- check status
$ gluster peer status
- show list
$ gluster pool list
- create volume (select 4.1 or 4.2)
4.1) replica
$ gluster volume create volume-01 replica 2 transport tcp \
glusterfs-node1:/storage \
glusterfs-node2:/storage \
force
4.2) distribute
$ gluster volume create volume-01 transport tcp \
glusterfs-node1:/storage \
glusterfs-node2:/storage \
force
volume-01
is name of volume
- start volume
$ gluster volume start volume-01
- show volume info
$ gluster volume info volume-01
- edit hosts (map ip & hostname)
$ vi /etc/hosts
add configs
10.130.15.87 glusterfs-node1
10.130.117.8 glusterfs-node2
- download glusterfs public-key
see version on https://download.gluster.org/pub/gluster/glusterfs/
$ wget -O- https://download.gluster.org/pub/gluster/glusterfs/6/rsa.pub | apt-key add -
- add repository
$ sudo add-apt-repository ppa:gluster/glusterfs-6
- install glusterfs client
$ sudo apt install glusterfs-client -y
- create mount directory
$ mkdir -p /storage
- mount to volumn (glusterfs-node1:/volume-01)
$ sudo mount -t glusterfs glusterfs-node1:/volume-01 /storage
/storage
is directory onclient-node
- check available volume
$ df -h /storage
/storage
is directory onclient-node
- set permanent mount
$ vim /etc/fstab
add configuration
glusterfs-node1:/volume-01 /storage glusterfs defaults,_netdev 0 0
try create empty file file01, file02, file03
$ cd /storage
$ touch file01 file02 file03
show file on glusterfs node
$ cd /storage
$ ll
https://www.howtoforge.com/tutorial/high-availability-storage-with-glusterfs-on-ubuntu-1804/