From 1eba62ea065b7d6209f2762ee88588dc0708d36c Mon Sep 17 00:00:00 2001 From: Romain Dessort Date: Wed, 16 May 2018 16:20:21 -0400 Subject: [PATCH] =?UTF-8?q?HowtoGlusterFS=20:=20ajout=20proc=C3=A9dure=20d?= =?UTF-8?q?'installation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HowtoGlusterFS.md | 64 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/HowtoGlusterFS.md b/HowtoGlusterFS.md index 217de8a2..7c5936df 100644 --- a/HowtoGlusterFS.md +++ b/HowtoGlusterFS.md @@ -1,5 +1,69 @@ # Howto GlusterFS +## Configuration d'un nouveau cluster + +### Installation + +~~~ +# apt install glusterfs-server +~~~ + +### Création du cluster + +~~~ +srv1# gluster peer probe +peer probe: success. +~~~ + +Note : srv1 et srv2 doivent pouvoir communiquer entre eux sans restriction au niveau réseau. + +Vérification : + +~~~ +# gluster peer status +Number of Peers: 1 + +Hostname: xxx +Uuid: xxxxx +State: Peer in Cluster (Connected) +~~~ + +### Création d'un volume + +Ici _/srv/gluster/_ est un montagne d'un volume dédié pour GlusterFS et le volume à créer se nomme _foovol_. + +Créer le répertoire sur chaque serveur : + +~~~ +# mkdir /srv/gluster/foovol +~~~ + +Puis sur un des serveurs, créer le volume GlusterFS + +~~~ +# gluster volume create foovol replica 2 :/srv/gluster/foovol :/srv/gluster/foovol +volume create: foovol: success: please start the volume to access data +# gluster volume start foovol +volume start: foovol: success +~~~ + +Vérification : + +~~~ +# gluster volume info +[…] +~~~ + +Sur la machine cliente, on peut maintenant monter le volume : + +~~~ +# echo "srv1:/foovol /mnt/foovol glusterfs defaults 0 0" >>/etc/fstab +# mkdir /mnt/foovol +# mount /mnt/foovol +~~~ + +## Administration + ~~~ # gluster volume status all # gluster volume status all clients