From 6a7ba1cef1d9fb92e1b32f46754665af7b1ef4c2 Mon Sep 17 00:00:00 2001 From: Chinasubbareddy Mallavarapu Date: Tue, 15 Oct 2019 10:11:05 -0500 Subject: [PATCH] [ceph-osd] fix partprobe issue after deleing the partitions This is to fix partprobe issues after deleing the repsective partitions. Change-Id: If9e9ffaf1a2610f86356e02f5f12cb691e66c756 --- ceph-osd/templates/bin/osd/_common.sh.tpl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ceph-osd/templates/bin/osd/_common.sh.tpl b/ceph-osd/templates/bin/osd/_common.sh.tpl index bcf77f2e4..bf095ebf4 100644 --- a/ceph-osd/templates/bin/osd/_common.sh.tpl +++ b/ceph-osd/templates/bin/osd/_common.sh.tpl @@ -178,12 +178,21 @@ function zap_extra_partitions { # Delete any discovered journal, block.db, and block.wal partitions if [ ! -z "${journal_disk}" ]; then sgdisk -d ${journal_part} ${journal_disk} + /sbin/udevadm settle --timeout=600 + /usr/bin/flock -s ${journal_disk} /sbin/partprobe ${journal_disk} + /sbin/udevadm settle --timeout=600 fi if [ ! -z "${block_db_disk}" ]; then sgdisk -d ${block_db_part} ${block_db_disk} + /sbin/udevadm settle --timeout=600 + /usr/bin/flock -s ${block_db_disk} /sbin/partprobe ${block_db_disk} + /sbin/udevadm settle --timeout=600 fi if [ ! -z "${block_wal_disk}" ]; then sgdisk -d ${block_wal_part} ${block_wal_disk} + /sbin/udevadm settle --timeout=600 + /usr/bin/flock -s ${block_wal_disk} /sbin/partprobe ${block_wal_disk} + /sbin/udevadm settle --timeout=600 fi }