Merge "[ceph-osd] Search for complete logical volume name for OSD data volumes"
This commit is contained in:
commit
5576b3644f
@ -15,6 +15,6 @@ apiVersion: v1
|
||||
appVersion: v1.0.0
|
||||
description: OpenStack-Helm Ceph OSD
|
||||
name: ceph-osd
|
||||
version: 0.1.2
|
||||
version: 0.1.3
|
||||
home: https://github.com/ceph/ceph
|
||||
...
|
||||
|
@ -199,7 +199,7 @@ function prep_device {
|
||||
fi
|
||||
fi
|
||||
else
|
||||
logical_devices=$(get_lvm_path_from_device "pv_name=~${BLOCK_DEVICE},lv_name=~dev-${osd_dev_split}")
|
||||
logical_devices=$(get_lvm_path_from_device "pv_name=~${BLOCK_DEVICE},lv_name=~${lv_name}")
|
||||
if [[ -n "$logical_devices" ]]; then
|
||||
dmsetup remove $logical_devices
|
||||
disk_zap "${OSD_DEVICE}"
|
||||
@ -241,7 +241,6 @@ function osd_disk_prepare {
|
||||
#search for some ceph metadata on the disk based on the status of the disk/lvm in filestore
|
||||
CEPH_DISK_USED=0
|
||||
CEPH_LVM_PREPARE=1
|
||||
osd_dev_split=$(basename "${OSD_DEVICE}")
|
||||
udev_settle
|
||||
OSD_ID=$(get_osd_id_from_device ${OSD_DEVICE})
|
||||
OSD_FSID=$(get_cluster_fsid_from_device ${OSD_DEVICE})
|
||||
@ -288,7 +287,8 @@ function osd_disk_prepare {
|
||||
DM_DEV=${OSD_DEVICE}$(sgdisk --print ${OSD_DEVICE} | grep "F800" | awk '{print $1}')
|
||||
CEPH_DISK_USED=1
|
||||
else
|
||||
if dmsetup ls |grep -i ${osd_dev_split}|grep -v "db--dev\|wal--dev"; then
|
||||
dm_lv_name="$(get_lv_name_from_device ${OSD_DEVICE} lv | sed 's/-/--/g')"
|
||||
if [[ ! -z "${dm_lv_name}" ]] && [[ ! -z "$(dmsetup ls | grep ${dm_lv_name})" ]]; then
|
||||
CEPH_DISK_USED=1
|
||||
fi
|
||||
if [[ ${OSD_FORCE_REPAIR} -eq 1 ]] && [ ${CEPH_DISK_USED} -ne 1 ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user