6f38d7036c
Often cephadm jobs fail with: Mar 30 13:01:21 primary bash[75459]: debug 2021-03-30T13:01:21.844+0000 7fa30431f700 -1 error: monitor data filesystem reached concerning levels of available storage space (available: 4% 1.8 GiB) Let's check if 5G OSD helps and also print df -h output for reference Change-Id: I6960fd0f378aea5a14a73d9228edf86fb86cac6c
38 lines
1009 B
Bash
38 lines
1009 B
Bash
#!/bin/bash
|
|
|
|
# $1: scenario / ceph store type
|
|
|
|
set -o xtrace
|
|
set -o errexit
|
|
|
|
mkdir -p /opt/data/kolla
|
|
|
|
if [ $1 = 'zun' ]; then
|
|
# create cinder-volumes volume group for cinder lvm backend
|
|
free_device=$(losetup -f)
|
|
fallocate -l 5G /var/lib/cinder_data.img
|
|
losetup $free_device /var/lib/cinder_data.img
|
|
pvcreate $free_device
|
|
vgcreate cinder-volumes $free_device
|
|
elif [ $1 = 'swift' ]; then
|
|
# swift partition
|
|
free_device=$(losetup -f)
|
|
fallocate -l 5G /var/lib/swift_data.img
|
|
losetup $free_device /var/lib/swift_data.img
|
|
parted $free_device -s -- mklabel gpt mkpart KOLLA_SWIFT_DATA 1 -1
|
|
free_partition=${free_device}p1
|
|
mkfs.xfs -L d0 $free_partition
|
|
elif [ $1 = 'ceph-lvm' ]; then
|
|
free_device=$(losetup -f)
|
|
fallocate -l 5G /var/lib/ceph-osd1.img
|
|
losetup $free_device /var/lib/ceph-osd1.img
|
|
pvcreate $free_device
|
|
vgcreate cephvg $free_device
|
|
lvcreate -l 100%FREE -n cephlv cephvg
|
|
else
|
|
echo "Unknown type" >&2
|
|
exit 1
|
|
fi
|
|
|
|
partprobe
|