summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbaigk <baiguoku@huawei.com>2015-09-22 23:39:17 +0800
committerbaigk <baiguoku@huawei.com>2015-09-22 23:39:17 +0800
commitf9854576df59837f12440048159a2d91e8078467 (patch)
tree7c85221affb0e583165e4de5a06a4bb611f45600
parenta2ea6270efc928dfb062cb32065162df4396b6a4 (diff)
destroy GPT label befroe lvm create PV
JIRA: COMPASS-64 Change-Id: I21ef97689444a7509f09394d6f0a3d4956074f06 Signed-off-by: baigk <baiguoku@huawei.com>
-rw-r--r--deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml4
1 files changed, 4 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml b/deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml
index 3700bcdd..b64024da 100644
--- a/deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml
@@ -43,6 +43,10 @@
shell: losetup {{ first_lo.stdout }} /mnt/cinder-volumes
when: cindervolumes.stdout != 'cinder-volumes'
+- name: destroy GPT lable
+ shell: dd if=/dev/urandom of=/dev/sdb bs=4M count=1
+ ignore_errors: True
+
- name: create physical and group volumes
lvg: vg=cinder-volumes pvs={{ physical_device }}
vg_options=--force