Forge Home


GlusterFS module


100,058 latest version

4.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.0.3 (latest)
  • 0.0.2
released May 24th 2013

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'thias-glusterfs', '0.0.3'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add thias-glusterfs
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install thias-glusterfs --version 0.0.3

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



thias/glusterfs — version 0.0.3 May 24th 2013



Install, enable and configure GlusterFS.

  • glusterfs::server : Class to install and enable the server.
  • glusterfs::peer : Definition to add a server peer. Used by the server class' $peer parameter.
  • glusterfs::volume : Definition to create server volumes.
  • glusterfs::client : Class to install and enable the client. Included from the mount definition.
  • glusterfs::mount : Definition to create client mounts.

You will need to open TCP ports 24007:24009 and 38465:38466 on the servers.


Complete server with two redundant nodes, on top of existing kickstart created vg0 LVM VGs. Note that the first runs will fail since the volume creation won't work until the peers know each other, and that requires the service to be running :

file { [ '/export', '/export/gv0' ]:
  seltype => 'usr_t',
  ensure  => directory,
package { 'xfsprogs': ensure => installed }
exec { 'lvcreate /dev/vg0/gv0':
  command => '/sbin/lvcreate -L 256G -n gv0 vg0',
  creates => '/dev/vg0/gv0',
  notify  => Exec['mkfs /dev/vg0/gv0'],
exec { 'mkfs /dev/vg0/gv0':
  command     => '/sbin/mkfs.xfs -i size=512 /dev/vg0/gv0',
  require     => [ Package['xfsprogs'], Exec['lvcreate /dev/vg0/gv0'] ],
  refreshonly => true,
mount { '/export/gv0':
  device  => '/dev/vg0/gv0',
  fstype  => 'xfs',
  options => 'defaults',
  ensure  => mounted,
  require => [ Exec['mkfs /dev/vg0/gv0'], File['/export/gv0'] ],
class { 'glusterfs::server':
  peers => $::hostname ? {
    'server1' => '',
    'server2' => '',
glusterfs::volume { 'gv0':
  create_options => 'replica 2',
  require        => Mount['/export/gv0'],

Client mount (the client class is included automatically). Note that clients are virtual machines on the servers above, so make each of them use the replica on the same hardware for optimal performance and optimal fail-over :

file { '/var/www': ensure => directory }
glusterfs::mount { '/var/www':
  device => $::hostname ? {
    'client1' => '',
    'client2' => '',