Skip to content

Commit

Permalink
ceph-volume util.disk capture real size when inspecting disks
Browse files Browse the repository at this point in the history
Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit 165b944)
  • Loading branch information
Alfredo Deza authored and andrewschoen committed Aug 28, 2018
1 parent e2a23a7 commit ec2e493
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ceph-volume/ceph_volume/util/disk.py
Expand Up @@ -645,7 +645,8 @@ def get_devices(_sys_block_path='/sys/block', _dev_path='/dev', _mapper_path='/d
if not metadata['sectorsize']:
metadata['sectorsize'] = get_file_contents(sysdir + "/queue/hw_sector_size", 512)
metadata['human_readable_size'] = human_readable_size(float(size) * 512)
metadata['size'] = human_readable_size(float(size) * 512)
metadata['size'] = float(size) * 512
metadata['path'] = diskname

device_facts[diskname] = metadata
return device_facts

0 comments on commit ec2e493

Please sign in to comment.