Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HPCasCode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hpc-team
HPCasCode
Commits
04633c54
Commit
04633c54
authored
3 years ago
by
Andreas Hamacher
Browse files
Options
Downloads
Patches
Plain Diff
gluster changes
parent
8200243e
No related branches found
No related tags found
1 merge request
!481
gluster changes
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
roles/gluster_server/tasks/main.yml
+65
-23
65 additions, 23 deletions
roles/gluster_server/tasks/main.yml
with
65 additions
and
23 deletions
roles/gluster_server/tasks/main.yml
+
65
−
23
View file @
04633c54
---
#https://docs.gluster.org/en/latest/Administrator%20Guide/Storage%20Pools/
-
name
:
install gluster repository
yum
:
name
:
-
centos-release-gluster9
state
:
present
enablerepo
:
extras
update_cache
:
yes
when
:
ansible_os_family == 'RedHat'
become
:
true
become_user
:
root
register
:
glusterrepo_added
-
name
:
force refresh of the repository cache
shell
:
|
yum clean metadata
yum clean all
yum updateinfo
yum makecache
become
:
true
async
:
600
poll
:
5
check_mode
:
no
when
:
ansible_os_family == 'RedHat' and glusterrepo_added.changed
args
:
warn
:
False
-
name
:
install gluster
yum
:
name
:
-
glusterfs-
3.12.7-1.el7
-
glusterfs-server-
3.12.7-1.el7
-
glusterfs-
9.2
-
glusterfs-server-
9.2
state
:
present
#disablerepo: base
update_cache
:
yes
disablerepo
:
base,monashhpc_base,updates
when
:
ansible_os_family == 'RedHat'
become
:
true
become_user
:
root
register
:
gluster_installed
-
name
:
install gluster
apt
:
name=glusterfs-server state=present
when
:
ansible_os_family == 'Debian'
become
:
true
become_user
:
root
-
name
:
start daemon
service
:
name=glusterd enabled=yes state=started
become
:
true
become_user
:
root
when
:
ansible_os_family == 'RedHat'
-
name
:
start glusterfs
service
:
name=glusterfsd enabled=yes state=started
become
:
true
become_user
:
root
when
:
ansible_os_family == 'RedHat'
when
:
ansible_os_family == 'RedHat' and gluster_installed.changed
-
name
:
start daemon
service
:
name=glusterfs-server enabled=yes state=started
...
...
@@ -35,26 +59,44 @@
become_user
:
root
when
:
ansible_os_family == 'Debian'
-
name
:
make brick dir
file
:
state=directory path="{{ brickmnt }}/brick"
become
:
true
become_user
:
root
#- name: make brick dir
# file: state=directory path="{{ brickmnt }}/brick"
# become: true
# become_user: root
# when: gluster_installed.changed
-
name
:
set quorum ratio
command
:
"
gluster
volume
set
all
cluster.server-quorum-ratio
51%"
become
:
true
become_user
:
root
ignore_errors
:
yes
-
name
:
set quorum type
command
:
"
gluster
volume
set
all
cluster.server-quorum-type
server"
run_once
:
True
delegate_to
:
"
{{
groups['SQLNodes'][0]
}}"
when
:
gluster_installed.changed
-
name
:
enable bitrot
command
:
"
gluster
volume
bitrot
gv
enable"
become
:
true
become_user
:
root
ignore_errors
:
true
ignore_errors
:
yes
run_once
:
True
delegate_to
:
"
{{
groups['SQLNodes'][0]
}}"
when
:
gluster_installed.changed
#gluster volume bitrot <VOLNAME> enable
-
name
:
set quorum type
command
:
"
gluster
volume
set
all
cluster.quorum-type
auto"
become
:
true
become_user
:
root
ignore_errors
:
true
#not needed anymore or not supported
#- name: set quorum type
# command: "gluster volume set all cluster.server-quorum-type server"
# become: true
# become_user: root
# ignore_errors: true
#- name: set quorum type
# command: "gluster volume set all cluster.quorum-type auto"
# become: true
# become_user: root
# ignore_errors: true
#gluster volume heal <vol> info
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment