Skip to content

Commit e930fb3

Browse files
dincercelikmarkgoddard
authored andcommitted
Fixes ceph-osd deploys with loop devices.
Change-Id: I98405e3fb32cbec2d9863817a913ed71c5597e15 Closes-Bug: #1834678 (cherry picked from commit f5ac80e)
1 parent 6fd4b02 commit e930fb3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docker/ceph/ceph-osd/extend_start.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
3939
sgdisk --new=1:0:+100M --mbrtogpt -- "${OSD_BS_DEV}"
4040
sgdisk --largest-new=2 --mbrtogpt -- "${OSD_BS_DEV}"
4141
partprobe || true
42-
sgdisk --zap-all -- "${OSD_BS_DEV}"2
42+
43+
if [[ "${OSD_BS_DEV}" =~ "/dev/loop" ]]; then
44+
sgdisk --zap-all -- "${OSD_BS_DEV}"p2
45+
else
46+
sgdisk --zap-all -- "${OSD_BS_DEV}"2
47+
fi
4348
fi
4449

4550
if [ -n "${OSD_BS_WAL_DEV}" ] && [ "${OSD_BS_BLK_DEV}" != "${OSD_BS_WAL_DEV}" ] && [ -n "${OSD_BS_WAL_PARTNUM}" ]; then

0 commit comments

Comments
 (0)