Skip to content

Commit

Permalink
Fix usage of GlusterFS variables stripes and replicas
Browse files Browse the repository at this point in the history
* Update glusterfs.yml:  the variables replicas and stripes were swapped.
* Update glusterfs.conf: Modified example according to variables in playbook elasticluster/share/playbooks/roles/glusterfs.yml
* Update playbooks.rst: Updated variables for glusterfs configuration according to playbook.
  • Loading branch information
julienperret authored and riccardomurri committed Jun 6, 2019
1 parent ef4b84b commit 3cbecc1
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
46 changes: 23 additions & 23 deletions docs/playbooks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -894,11 +894,11 @@ and any ``glusterfs_client`` to mount this filesystem over directory
``/glusterfs``.

To manage the GlusterFS filesystem you need to connect to a
``gluster_server`` node.
``glusterfs_server`` node.

Several versions of GlusterFS are concurrently maintained and packaged upstream;
the actual version of GlusterFS installed by ElastiCluster can be set using global
variable ``gluster_version`` in the ``[setup/...]`` section (see
variable ``glusterfs_version`` in the ``[setup/...]`` section (see
below).

.. note::
Expand All @@ -910,7 +910,7 @@ below).
.. note::

If GlusterFS is already installed on a cluster, changing the value
of ``gluster_version`` and running ``elasticluster setup`` may not
of ``glusterfs_version`` and running ``elasticluster setup`` may not
correctly upgrade the software. To upgrade GlusterFS to a more
recent version, you need to follow the procedure detailed at:
`<https://docs.gluster.org/en/latest/Upgrade-Guide/>`_
Expand All @@ -921,26 +921,26 @@ the data that resides there), and neither is the data replicated nor
striped, i.e., replica and stripe number is set to 1. This can be
changed by defining the following variables in the `setup/` section:

Note that setting ``gluster_redundancy`` to a non-zero value will
Note that setting ``glusterfs_redundancy`` to a non-zero value will
force the volume to be "dispersed", which is incompatible with
striping and replication. In other words, the ``gluster_redundancy``
option is incompatible with ``gluster_stripes`` and/or
``gluster_replicas``. You can read more about the GlusterFS volume
striping and replication. In other words, the ``glusterfs_redundancy``
option is incompatible with ``glusterfs_stripes`` and/or
``glusterfs_replicas``. You can read more about the GlusterFS volume
types and permitted combinations at
`<http://docs.gluster.org/en/latest/Administrator%20Guide/Setting%20Up%20Volumes/>`_.

+----------------------+------------+---------------------------------------------+
| variable name | default | description |
+======================+============+=============================================+
|``gluster_version`` | 6 | version of GlusterFS to be installed |
+----------------------+------------+---------------------------------------------+
|``gluster_stripes`` | no stripe | set the stripe value for default volume |
+----------------------+------------+---------------------------------------------+
|``gluster_replicas`` | no replica | set replica value for default volume |
+----------------------+------------+---------------------------------------------+
|``gluster_redundancy``| 0 | nr. of servers that can fail or be |
| | | offline without affecting data availability |
+----------------------+------------+---------------------------------------------+
+------------------------+------------+---------------------------------------------+
| variable name | default | description |
+========================+============+=============================================+
|``glusterfs_version`` | 6 | version of GlusterFS to be installed |
+------------------------+------------+---------------------------------------------+
|``glusterfs_stripes`` | no stripe | set the stripe value for default volume |
+------------------------+------------+---------------------------------------------+
|``glusterfs_replicas`` | no replica | set replica value for default volume |
+------------------------+------------+---------------------------------------------+
|``glusterfs_redundancy``| 0 | nr. of servers that can fail or be |
| | | offline without affecting data availability |
+------------------------+------------+---------------------------------------------+

The following example configuration sets up a GlusterFS cluster using 8 data nodes
and providing 2 replicas for each file::
Expand All @@ -960,8 +960,8 @@ and providing 2 replicas for each file::
server_groups=glusterfs_server,glusterfs_client

# set replica and stripe parameters
server_var_gluster_replicas=2
server_var_gluster_stripes=1
server_var_glusterfs_replicas=2
server_var_glusterfs_stripes=1

The following example configuration sets up a dispersed GlusterFS
volume using 6 data nodes with redundancy 2, i.e., two servers can be
Expand All @@ -982,7 +982,7 @@ offlined without impacting data availability::
server_groups=glusterfs_server,glusterfs_client

# set redundancy and force "dispersed" volume
server_var_gluster_redundancy=2
server_var_glusterfs_redundancy=2

The following example configuration sets up a pure distributed GlusterFS
volume over 3 server nodes, installing GlusterFS version 4.1:
Expand All @@ -1002,7 +1002,7 @@ volume over 3 server nodes, installing GlusterFS version 4.1:
server_groups=glusterfs_server,glusterfs_client

# set redundancy and force "dispersed" volume
global_var_gluster_version=4.1
global_var_glusterfs_version=4.1

The "GlusterFS" playbook depends on the following Ansible roles being
available:
Expand Down
4 changes: 2 additions & 2 deletions elasticluster/share/playbooks/roles/glusterfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
GLUSTERFS_VOLUMES:
- name: 'glusterfs'
path: '/srv/glusterfs'
replicas: '{{glusterfs_stripes|default(1)}}'
stripes: '{{glusterfs_replicas|default(1)}}'
stripes: '{{glusterfs_stripes|default(1)}}'
replicas: '{{glusterfs_replicas|default(1)}}'
transport: 'tcp'


Expand Down
4 changes: 2 additions & 2 deletions examples/glusterfs.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ server_groups=glusterfs_server,glusterfs_client

# set replica and stripe parameters,
# see: http://elasticluster.readthedocs.io/en/latest/playbooks.html#id9
server_var_gluster_replicas=2
server_var_gluster_stripes=1
server_var_glusterfs_replicas=2
server_var_glusterfs_stripes=1


# the `login` section collects information about how to log-in to VMs, including
Expand Down

0 comments on commit 3cbecc1

Please sign in to comment.