From 1e05f3151d84726f0c9c516dd14364fe88db0fe8 Mon Sep 17 00:00:00 2001 From: Stephen Taylor Date: Mon, 4 Mar 2024 13:32:10 -0700 Subject: [PATCH] [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 --- ceph-osd/Chart.yaml | 2 +- .../osd/ceph-volume/_init-ceph-volume-helper-bluestore.sh.tpl | 2 +- releasenotes/notes/ceph-osd.yaml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ceph-osd/Chart.yaml b/ceph-osd/Chart.yaml index 40da566d9..591442246 100644 --- a/ceph-osd/Chart.yaml +++ b/ceph-osd/Chart.yaml @@ -15,6 +15,6 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Ceph OSD name: ceph-osd -version: 0.1.49 +version: 0.1.50 home: https://github.com/ceph/ceph ... diff --git a/ceph-osd/templates/bin/osd/ceph-volume/_init-ceph-volume-helper-bluestore.sh.tpl b/ceph-osd/templates/bin/osd/ceph-volume/_init-ceph-volume-helper-bluestore.sh.tpl index b1ce29e4c..44f22284d 100644 --- a/ceph-osd/templates/bin/osd/ceph-volume/_init-ceph-volume-helper-bluestore.sh.tpl +++ b/ceph-osd/templates/bin/osd/ceph-volume/_init-ceph-volume-helper-bluestore.sh.tpl @@ -123,7 +123,7 @@ function prep_device { fi 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 BLOCK_DB=${RESULTING_LV} elif [[ "${device_type}" == "wal" ]]; then diff --git a/releasenotes/notes/ceph-osd.yaml b/releasenotes/notes/ceph-osd.yaml index cb4777bce..d04605d72 100644 --- a/releasenotes/notes/ceph-osd.yaml +++ b/releasenotes/notes/ceph-osd.yaml @@ -50,4 +50,5 @@ ceph-osd: - 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.49 Update Ceph images to Jammy and Reef 18.2.1 + - 0.1.50 Allow lvcreate to wipe existing LV metadata ...