]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_volume: Reporting nr_requests
authorErwan Velu <erwan@redhat.com>
Tue, 9 Oct 2018 20:28:19 +0000 (22:28 +0200)
committerAlfredo Deza <adeza@redhat.com>
Fri, 26 Oct 2018 20:23:48 +0000 (16:23 -0400)
We are already reporting the rotational & scheduler of a disk device.
Reporting the nr_requests could be useful to get how many concurrent IOs
the device supports/reports.

That could help detecting badly detected/configured devices.

Signed-off-by: Erwan Velu <erwan@redhat.com>
(cherry picked from commit e0ea3d475a85844afdcdf92cf638b8128c8e2d9e)

src/ceph-volume/ceph_volume/util/disk.py

index 641035813e374894b21b094fa5b16bec96c0aeaa..6b08e92b6167f929c06e94417b11a540ee4ba3fd 100644 (file)
@@ -710,7 +710,9 @@ def get_devices(_sys_block_path='/sys/block', _dev_path='/dev', _mapper_path='/d
 
         metadata['partitions'] = get_partitions_facts(sysdir)
 
-        metadata['rotational'] = get_file_contents(sysdir + "/queue/rotational")
+        for key in ['rotational', 'nr_requests']:
+            metadata[key] = get_file_contents(sysdir + "/queue/" + key)
+
         metadata['scheduler_mode'] = ""
         scheduler = get_file_contents(sysdir + "/queue/scheduler")
         if scheduler is not None: