Merge "Add BlueStore OSDs support"

This commit is contained in:
Zuul 2024-09-12 16:11:46 +00:00 committed by Gerrit Code Review
commit 8e8279fd7e
2 changed files with 55 additions and 51 deletions

View File

@ -1458,12 +1458,12 @@ else
if [ ${WIPE_CEPH_OSDS} == "false" ] ; then
wipe_dev="true"
exec_no_fds "$STOR_DEV_FDS" "pvs" | grep -q "$dev *ceph"
if [ $? -eq 0 ] ; then
wlog "skip rook provisoned disk $dev"
continue
fi
# Check if the disk is Rook Ceph OSD
fs_type=$(blkid -o value -s TYPE "${dev}")
if [ "${fs_type}" == "ceph_bluestore" ]; then
wlog "BlueStore OSD found on $dev, skipping wipe"
wipe_dev="false"
else
part_numbers=( `parted -s $dev print | awk '$1 == "Number" {i=1; next}; i {print $1}'` )
# Scanning the partitions looking for CEPH OSDs and
# skipping any disk found with such partitions
@ -1475,15 +1475,8 @@ else
wipe_dev="false"
break
fi
dev_part_prefix=$(get_part_prefix "${dev}")
exec_no_fds "$STOR_DEV_FDS" "pvs" | grep -q -e "${dev_part_prefix}${part_number} *ceph" -e "${dev_part_prefix}p${part_number} *ceph"
if [ $? -eq 0 ]; then
wlog "Rook OSD found on $dev_part_prefix$part_number, skip wipe"
wipe_dev="false"
break
fi
done
fi
if [ "$wipe_dev" == "false" ] ; then
continue
@ -1513,6 +1506,15 @@ inst_dev=$(get_disk "${INSTDEV}")
for dev in ${WIPE_HDD//,/ } ; do
ilog "Wiping $dev"
# Check if the disk is Rook Ceph OSD
# see https://github.com/rook/rook/blob/master/Documentation/Storage-Configuration/ceph-teardown.md#zapping-devices
fs_type=$(blkid -o value -s TYPE "${dev}")
if [ "${fs_type}" == "ceph_bluestore" ]; then
sgdisk --zap-all "${dev}"
wipefs -a "${dev}"
continue
fi
# Clear previous GPT tables or LVM data on each disk.
#
# Rule: Exclude the persistent 'Platform backup' partition.

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2022-2023 Wind River Systems, Inc.
# Copyright (c) 2022-2024 Wind River Systems, Inc.
# SPDX-License-Identifier: Apache-2.0
#
############################################################################
@ -1361,12 +1361,12 @@ else
if [ ${WIPE_CEPH_OSDS} == "false" ]; then
wipe_dev="true"
exec_no_fds "$STOR_DEV_FDS" "pvs" | grep -q "$dev *ceph"
if [ $? -eq 0 ]; then
wlog "skip rook provisoned disk $dev"
continue
fi
# Check if the disk is Rook Ceph OSD
fs_type=$(blkid -o value -s TYPE "${dev}")
if [ "${fs_type}" == "ceph_bluestore" ]; then
wlog "BlueStore OSD found on $dev, skipping wipe"
wipe_dev="false"
else
part_numbers=( `parted -s $dev print | awk '$1 == "Number" {i=1; next}; i {print $1}'` )
# Scanning the partitions looking for CEPH OSDs and
# skipping any disk found with such partitions
@ -1378,15 +1378,8 @@ else
wipe_dev="false"
break
fi
dev_part_prefix=$(get_part_prefix "${dev}")
exec_no_fds "$STOR_DEV_FDS" "pvs" | grep -q -e "${dev_part_prefix}${part_number} *ceph" -e "${dev_part_prefix}p${part_number} *ceph"
if [ $? -eq 0 ]; then
wlog "Rook OSD found on $dev_part_prefix$part_number, skip wipe"
wipe_dev="false"
break
fi
done
fi
if [ "$wipe_dev" == "false" ]; then
continue
@ -1416,6 +1409,15 @@ inst_dev=$(get_disk "${INSTDEV}")
for dev in ${WIPE_HDD//,/ } ; do
ilog "Wiping $dev"
# Check if the disk is Rook Ceph OSD
# see https://github.com/rook/rook/blob/master/Documentation/Storage-Configuration/ceph-teardown.md#zapping-devices
fs_type=$(blkid -o value -s TYPE "${dev}")
if [ "${fs_type}" == "ceph_bluestore" ]; then
sgdisk --zap-all "${dev}"
wipefs -a "${dev}"
continue
fi
# Clear previous GPT tables or LVM data on each disk.
#
# Rule: Exclude the persistent 'Platform backup' partition.