18
0
Fork 0

HowtoGlusterFS : ajout procédure d'installation

This commit is contained in:
Romain Dessort 2018-05-16 16:20:21 -04:00
parent 1fa7d2f62d
commit 1eba62ea06
1 changed files with 64 additions and 0 deletions

View File

@ -1,5 +1,69 @@
# Howto GlusterFS # Howto GlusterFS
## Configuration d'un nouveau cluster
### Installation
~~~
# apt install glusterfs-server
~~~
### Création du cluster
~~~
srv1# gluster peer probe <adresse IP srv2>
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 <IP srv1>:/srv/gluster/foovol <IP srv2>:/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
# gluster volume status all clients # gluster volume status all clients