ceph-volume: fix nvme preformat wiping VG on osds-per-device > 1
prepare_data_device() was calling nvme_utils.preformat() unconditionally for every OSD slot. With --osds-per-device N, this means the second osd reformats the device after the first OSD had already created its vg on it which makes vgcreate fail with "device has a signature". this commit fixes this issue by checking api.get_device_vgs() before preformatting: if a ceph VG already exists on the device, skip the format. This mirrors the logic create_lv() already uses to reuse an existing VG. Fixes: https://tracker.ceph.com/issues/78615 Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
G
Guillaume Abrioux committed
9020d1dccdd34d257bab837415761e53d4c7da93
Parent: 5f026f2