Fixes ceph-osd deploys with loop devices.

Change-Id: I98405e3fb32cbec2d9863817a913ed71c5597e15
Closes-Bug: #1834678
This commit is contained in:
Dincer Celik 2019-06-28 21:00:18 +03:00
parent 5ecb9107ea
commit f5ac80e332
1 changed files with 6 additions and 1 deletions

View File

@ -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