summaryrefslogtreecommitdiffstats
path: root/vagrant/ansible/roles/glusterfs.setup/tasks/new_volume.yml
diff options
context:
space:
mode:
Diffstat (limited to 'vagrant/ansible/roles/glusterfs.setup/tasks/new_volume.yml')
-rw-r--r--vagrant/ansible/roles/glusterfs.setup/tasks/new_volume.yml30
1 files changed, 30 insertions, 0 deletions
diff --git a/vagrant/ansible/roles/glusterfs.setup/tasks/new_volume.yml b/vagrant/ansible/roles/glusterfs.setup/tasks/new_volume.yml
new file mode 100644
index 0000000..ec10897
--- /dev/null
+++ b/vagrant/ansible/roles/glusterfs.setup/tasks/new_volume.yml
@@ -0,0 +1,30 @@
+- name: Create Replicate Volumes
+ gluster_volume:
+ state: present
+ name: "{{ cluster_volume }}"
+ bricks: '{{ cluster_bricks }}'
+ cluster: "{{ cluster_hosts }}"
+ replicas: "{{ cluster_replica_count }}"
+ run_once: yes
+ when: cluster_type == 'replicate'
+
+- name: Set volume options
+ gluster_volume:
+ state: present
+ name: "{{ cluster_volume }}"
+ options:
+ {
+ features.cache-invalidation: 'on',
+ features.cache-invalidation-timeout: '600',
+ performance.cache-samba-metadata: 'on',
+ performance.stat-prefetch: 'on',
+ performance.cache-invalidation: 'on',
+ performance.md-cache-timeout: '600',
+ network.inode-lru-limit: '200000',
+ performance.nl-cache: 'on',
+ performance.nl-cache-timeout: '600',
+ performance.readdir-ahead: 'on',
+ performance.parallel-readdir: 'on',
+ }
+ run_once: true
+