From 7f3c3598491e556ec1b93ea0a54f52144202fab6 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Tue, 27 Nov 2018 09:31:58 -0500 Subject: [PATCH] ceph-volume util.disk include partitions as top level devices in get_devices Signed-off-by: Alfredo Deza --- src/ceph-volume/ceph_volume/util/disk.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ceph-volume/ceph_volume/util/disk.py b/src/ceph-volume/ceph_volume/util/disk.py index 40b2408d3bf..995a9685649 100644 --- a/src/ceph-volume/ceph_volume/util/disk.py +++ b/src/ceph-volume/ceph_volume/util/disk.py @@ -798,5 +798,9 @@ def get_devices(_sys_block_path='/sys/block', _dev_path='/dev', _mapper_path='/d metadata['path'] = diskname metadata['locked'] = is_locked_raw_device(metadata['path']) + for part_name, part_metadata in metadata['partitions'].items(): + part_abspath = '/dev/%s' % part_name + device_facts[part_abspath] = part_metadata + device_facts[diskname] = metadata return device_facts