[ceph-osd] Allow lvcreate to wipe existing LV metadata

In some cases when OSD metadata disks are reused and redeployed,
lvcreate can fail to create a DB or WAL volume because it overlaps
an old, deleted volume on the same disk whose signature still
exists at the offsets that trigger detection and abort the LV
creation process when the user is asked whether or not to wipe to
old signature. Adding a --yes argument to the lvcreate command
automatically answers yes to the wipe question and allows lvcreate
to wipe the old signature.

Change-Id: I0d69bd920c8e62915853ecc3b22825fa98f7edf3
This commit is contained in:
Stephen Taylor 2024-03-04 13:32:10 -07:00
parent 3a2399c99f
commit 1e05f3151d
3 changed files with 3 additions and 2 deletions

View File

@ -15,6 +15,6 @@ apiVersion: v1
appVersion: v1.0.0 appVersion: v1.0.0
description: OpenStack-Helm Ceph OSD description: OpenStack-Helm Ceph OSD
name: ceph-osd name: ceph-osd
version: 0.1.49 version: 0.1.50
home: https://github.com/ceph/ceph home: https://github.com/ceph/ceph
... ...

View File

@ -123,7 +123,7 @@ function prep_device {
fi fi
udev_settle udev_settle
create_lv_if_needed "${block_device}" "${vg}" "-L ${block_device_size}" "${lv_name}" create_lv_if_needed "${block_device}" "${vg}" "--yes -L ${block_device_size}" "${lv_name}"
if [[ "${device_type}" == "db" ]]; then if [[ "${device_type}" == "db" ]]; then
BLOCK_DB=${RESULTING_LV} BLOCK_DB=${RESULTING_LV}
elif [[ "${device_type}" == "wal" ]]; then elif [[ "${device_type}" == "wal" ]]; then

View File

@ -50,4 +50,5 @@ ceph-osd:
- 0.1.47 Add disk zap to OSD init forced repair case - 0.1.47 Add disk zap to OSD init forced repair case
- 0.1.48 Update Rook to 1.12.5 and Ceph to 18.2.0 - 0.1.48 Update Rook to 1.12.5 and Ceph to 18.2.0
- 0.1.49 Update Ceph images to Jammy and Reef 18.2.1 - 0.1.49 Update Ceph images to Jammy and Reef 18.2.1
- 0.1.50 Allow lvcreate to wipe existing LV metadata
... ...