wiki/HowtoGlusterFS.md

96 lines
1.6 KiB
Markdown
Raw Normal View History

2016-11-11 13:20:23 +01:00
# 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
2016-11-11 13:20:23 +01:00
~~~
# gluster volume status all
# gluster volume status all clients
# gluster volume status all (mem|fd|inode|callpool)
~~~
2018-02-27 18:28:43 +01:00
2018-02-27 20:51:38 +01:00
# Lister les peers
~~~
# gluster peer status
~~~
2018-02-27 18:28:43 +01:00
# Lister les volumes
~~~
2018-02-27 20:52:01 +01:00
# gluster volume list
2018-02-27 18:28:43 +01:00
~~~
# Voir la santé du volume "foo"
~~~
# gluster volume heal foo info
~~~
2018-02-27 20:37:12 +01:00
# Forcer un 'heal' pour le volume "bar"
2018-02-27 18:28:43 +01:00
~~~
# gluster volume heal bar
~~~