]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
ceph-volume: use udev data instead of LVM subprocess in get_devices() 65745/head
authorGuillaume Abrioux <gabrioux@ibm.com>
Wed, 1 Oct 2025 14:04:20 +0000 (16:04 +0200)
committerGuillaume Abrioux <gabrioux@ibm.com>
Wed, 1 Oct 2025 14:28:24 +0000 (14:28 +0000)
commitea7aa27452f47f0808871abc366daa3bd7b6d2ab
tree0b321f23704d142799e66abf7a40f8b5fe987989
parentcfee77cb63307466cea68d0c96d7a4f98ef06a46
ceph-volume: use udev data instead of LVM subprocess in get_devices()

Replace the  check using `lvm.get_device_lvs(diskname)`, which
spawned a `pvs` subprocess, with a direct check on `/run/udev/data`
via `UdevData(diskname).is_lvm`.

This avoids spawning subprocesses while scanning devices. It improves
performance on systems with many disks, and keeps the device filtering
logic intact.

Fixes: https://tracker.ceph.com/issues/73334
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
src/ceph-volume/ceph_volume/tests/util/test_disk.py
src/ceph-volume/ceph_volume/util/disk.py