summaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorDincer Celik <hello@dincercelik.com>2019-06-28 21:00:18 +0300
committerMark Goddard <mark@stackhpc.com>2019-07-04 08:35:14 +0000
commite930fb35ac603a148eb8fabd8684052d9c63e5f6 (patch)
tree8dacd68dc721a4c9853097e01a63c39800542487 /docker
parent6fd4b02178653b94ea87e085c1e4148d38e28494 (diff)
downloadkolla-e930fb35ac603a148eb8fabd8684052d9c63e5f6.tar.gz
kolla-e930fb35ac603a148eb8fabd8684052d9c63e5f6.zip
Fixes ceph-osd deploys with loop devices.
Change-Id: I98405e3fb32cbec2d9863817a913ed71c5597e15 Closes-Bug: #1834678 (cherry picked from commit f5ac80e332c2a057ee68d95983492bc7e1156b9a)
Diffstat (limited to 'docker')
-rw-r--r--docker/ceph/ceph-osd/extend_start.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/docker/ceph/ceph-osd/extend_start.sh b/docker/ceph/ceph-osd/extend_start.sh
index c6cd4535c..31c4a0ffb 100644
--- a/docker/ceph/ceph-osd/extend_start.sh
+++ b/docker/ceph/ceph-osd/extend_start.sh
@@ -39,7 +39,12 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
sgdisk --new=1:0:+100M --mbrtogpt -- "${OSD_BS_DEV}"
sgdisk --largest-new=2 --mbrtogpt -- "${OSD_BS_DEV}"
partprobe || true
- sgdisk --zap-all -- "${OSD_BS_DEV}"2
+
+ if [[ "${OSD_BS_DEV}" =~ "/dev/loop" ]]; then
+ sgdisk --zap-all -- "${OSD_BS_DEV}"p2
+ else
+ sgdisk --zap-all -- "${OSD_BS_DEV}"2
+ fi
fi
if [ -n "${OSD_BS_WAL_DEV}" ] && [ "${OSD_BS_BLK_DEV}" != "${OSD_BS_WAL_DEV}" ] && [ -n "${OSD_BS_WAL_PARTNUM}" ]; then