From 895949d6c463c227da3dd7250c2ae228ee269872 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Tue, 19 Dec 2017 10:55:02 +0100 Subject: [PATCH] osd: fix check gpt the gpt label creation doesn't work even with parted module. This commit fixes the gpt label creation by using parted command instead. Signed-off-by: Guillaume Abrioux --- roles/ceph-osd/tasks/check_gpt.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/roles/ceph-osd/tasks/check_gpt.yml b/roles/ceph-osd/tasks/check_gpt.yml index 79371eb1e..8f72fd3ee 100644 --- a/roles/ceph-osd/tasks/check_gpt.yml +++ b/roles/ceph-osd/tasks/check_gpt.yml @@ -1,6 +1,6 @@ --- - name: check the partition status of the osd disks - command: "parted --script {{ item }} print" + command: "blkid -t PTTYPE=\"gpt\" {{ item }}" with_items: - "{{ devices }}" changed_when: false @@ -9,9 +9,7 @@ register: osd_partition_status_results - name: create gpt disk label - parted: - device: "{{ item.1 }}" - label: gpt + command: "parted -s {{ item.1 }} mklabel gpt" with_together: - "{{ osd_partition_status_results.results }}" - "{{ devices }}" -- 2.39.5