From: Guillaume Abrioux Date: Wed, 14 Jun 2023 14:08:07 +0000 (+0000) Subject: ceph-volume: set lvm membership for mpath type devices X-Git-Tag: v16.2.14~65^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=f41b55722eb0853349de2ff8f813c9744c13e296;p=ceph.git ceph-volume: set lvm membership for mpath type devices If any lvs is present, self.lvs should be set accordingly for mpath type devices as well. Otherwise, when re-running a command like following: ``` ceph-volume lvm batch --bluestore --no-auto /dev/mapper/mpatha /dev/mapper/mpathb ``` fails with error : "Device /dev/mapper/mpatha has a filesystem." where the expected behavior is: ``` --> passed data devices: 2 physical, 0 LVM --> relative data size: 1.0 --> All data devices are unavailable Total OSDs: 0 Type Path LV Size % of device ``` Fixes: https://tracker.ceph.com/issues/61673 Signed-off-by: Guillaume Abrioux (cherry picked from commit 27e39e172c79e490dec0570b39c84b2354b5266b) --- diff --git a/src/ceph-volume/ceph_volume/util/device.py b/src/ceph-volume/ceph_volume/util/device.py index 51605c65975f2..aaca104474fbb 100644 --- a/src/ceph-volume/ceph_volume/util/device.py +++ b/src/ceph-volume/ceph_volume/util/device.py @@ -229,7 +229,7 @@ class Device(object): self.disk_api = dev device_type = dev.get('TYPE', '') # always check is this is an lvm member - valid_types = ['part', 'disk'] + valid_types = ['part', 'disk', 'mpath'] if allow_loop_devices(): valid_types.append('loop') if device_type in valid_types: