Skip to content

Commit

Permalink
Merge pull request #148 from gluster-deploy/master
Browse files Browse the repository at this point in the history
Run wipefs before creating pv
  • Loading branch information
sac committed Aug 24, 2016
2 parents 4667337 + aed99f8 commit b36d268
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gdeploy.spec
Expand Up @@ -3,7 +3,7 @@
%define release 2
%define gdeploymod ansible/modules/extras/system/glusterfs
%define gdeploytemp /usr/share/ansible/gdeploy
%define gdeploydoc /usr/share/docs/gdeploy
%define gdeploydoc /usr/share/doc/gdeploy
%define gdeploysrc http://download.gluster.org/pub/gluster/gdeploy/LATEST

Name: %{name}
Expand Down
9 changes: 9 additions & 0 deletions playbooks/pvcreate.yml
Expand Up @@ -4,6 +4,15 @@
gather_facts: no

tasks:
# Remove the filesystem signature. pvcreate fails if signature is present.
# Safe to remove signatures, no harm done.
# TODO: add wipe_signature=yes/no in future.
- name: Clean up filesystem signature
command: wipefs -af {{ item }}
with_items: "{{ bricks | default([]) }}"
when: item is defined
ignore_errors: yes

# Create pv on all the disks
- name: Create Physical Volume
pv: action=create disks={{ item }}
Expand Down

0 comments on commit b36d268

Please sign in to comment.