HowtoGlusterFS : ajout procédure d'installation
Cette révision appartient à :
Parent
1fa7d2f62d
révision
1eba62ea06
|
@ -1,5 +1,69 @@
|
|||
# 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 clients
|
||||
|
|
Chargement…
Référencer dans un nouveau ticket