]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
ceph-volume: use udev data instead of LVM subprocess in get_devices()
authorGuillaume Abrioux <gabrioux@ibm.com>
Wed, 1 Oct 2025 14:04:20 +0000 (16:04 +0200)
committerYuri Weinstein <yweinste@redhat.com>
Wed, 15 Oct 2025 17:32:38 +0000 (17:32 +0000)
commit85b5cdf1899dd47c9b1cd1459425225240027f10
tree6d8f7e2b061c073caa489cbc429103f24b048948
parent94a83a1bf5b707113d733abc8d6330768d076368
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>
(cherry picked from commit ea7aa27452f47f0808871abc366daa3bd7b6d2ab)
(cherry picked from commit 05e8672887d61a0fa3c4f78bbe5b1c9294607a60)
src/ceph-volume/ceph_volume/tests/util/test_disk.py
src/ceph-volume/ceph_volume/util/disk.py