informatique:glusterfs
Ceci est une ancienne révision du document !
GlusterFS
Install
- glusterfs-01: Scaleway DEV1-S, 2 x vCPU, 2 GB, 20 GB NVMe, 200 Mbit/s
- glusterfs-02: OVH B2-7, 2 x vCPU, 7 GB, 50 GB SSD, 250 Mbit/s
Debian 10 (Buster)
root@glusterfs-01:~# ping -c 6 glusterfs-02 --- glusterfs-02 ping statistics --- 6 packets transmitted, 6 received, 0% packet loss, time 13ms rtt min/avg/max/mdev = 6.097/6.221/6.390/0.122 ms debian@glusterfs-02:~$ ping -c 6 glusterfs-01 --- glusterfs-01 ping statistics --- 6 packets transmitted, 6 received, 0% packet loss, time 13ms rtt min/avg/max/mdev = 6.112/6.355/6.783/0.219 ms
À faire sur les 2 machines
Setup NTP
on each of these servers to get the proper functioning of many applications on top of filesystem. This is an important requirement.
# Mise à jour $ sudo apt update && sudo apt upgrade -y $ sudo apt install software-properties-common -y # Dépot GlusterFS # "LATEST" remplacé par "9" pour trouver "rsa.pub" $ wget -O - https://download.gluster.org/pub/gluster/glusterfs/9/rsa.pub | sudo apt-key add - $ DEBID=$(grep 'VERSION_ID=' /etc/os-release | cut -d '=' -f 2 | tr -d '"') $ DEBVER=$(grep 'VERSION=' /etc/os-release | grep -Eo '[a-z]+') $ DEBARCH=$(dpkg --print-architecture) $ echo deb https://download.gluster.org/pub/gluster/glusterfs/LATEST/Debian/${DEBID}/${DEBARCH}/apt ${DEBVER} main | sudo tee /etc/apt/sources.list.d/gluster.list # Install server & client $ sudo apt update $ sudo apt install glusterfs-server glusterfs-client # Démarrer et activer le service $ sudo systemctl start glusterd $ sudo systemctl enable glusterd $ sudo mkdir -p /glusterfs/distributed
Si le gluster-server est sur localhost il faut l'indiquer dans /etc/hosts
.
# Sur glusterfs-01 chez Scaleway 127.0.0.1 glusterfs-01 glusterfs-01 # glusterfs-02 chez Ovh xxx.xxx.xxx.xxx glusterfs-02 # Sur glusterfs-02 chez Ovh 127.0.1.1 glusterfs-02 glusterfs-02 # glusterfs-01 chez Scaleway xxx.xxx.xxx.xxx glusterfs-01
À faire sur une machine (ici glusterfs-01) as root
gluster peer probe glusterfs-02 gluster peer status gluster peer list # Create a "replica" volume "vol01" gluster volume create vol01 replica 2 transport tcp glusterfs-01:/glusterfs/distributed glusterfs-02:/glusterfs/distributed force
TODO
- firewall
- like
iptables -I INPUT -i eth0 -s 192.168.0.0/16 -j ACCEPT
- SSL transport
-
- Enabling TLS on the Management Path
sudo touch /var/lib/glusterd/secure-access
-
informatique/glusterfs.1629265662.txt.gz · Dernière modification : 18/08/2021 07:47 de cyrille