From: Jan Fajerski Date: Fri, 8 Nov 2019 16:54:00 +0000 (+0100) Subject: ceph-volume: add proper size attribute to partitions X-Git-Tag: v15.1.0~965^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F31492%2Fhead;p=ceph.git ceph-volume: add proper size attribute to partitions Fixes: https://tracker.ceph.com/issues/42710 Signed-off-by: Jan Fajerski --- diff --git a/src/ceph-volume/ceph_volume/util/disk.py b/src/ceph-volume/ceph_volume/util/disk.py index ab26359d9298..f81d23621e51 100644 --- a/src/ceph-volume/ceph_volume/util/disk.py +++ b/src/ceph-volume/ceph_volume/util/disk.py @@ -726,7 +726,8 @@ def get_partitions_facts(sys_block_path): if not part['sectorsize']: part['sectorsize'] = get_file_contents( part_sys_block_path + "/queue/hw_sector_size", 512) - part['size'] = human_readable_size(float(part['sectors']) * 512) + part['size'] = float(part['sectors']) * 512 + part['human_readable_size'] = human_readable_size(float(part['sectors']) * 512) part['holders'] = [] for holder in os.listdir(part_sys_block_path + '/holders'): part['holders'].append(holder)