aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/scenarios/storage/fio.py
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/benchmark/scenarios/storage/fio.py')
-rw-r--r--yardstick/benchmark/scenarios/storage/fio.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/yardstick/benchmark/scenarios/storage/fio.py b/yardstick/benchmark/scenarios/storage/fio.py
index 125bc7ed4..c57c6edf2 100644
--- a/yardstick/benchmark/scenarios/storage/fio.py
+++ b/yardstick/benchmark/scenarios/storage/fio.py
@@ -124,12 +124,16 @@ class Fio(base.Scenario):
if mount_dir:
LOG.debug("Formating volume...")
- self.client.execute("sudo mkfs.ext4 /dev/vdb")
- cmd = "sudo mkdir %s" % mount_dir
- self.client.execute(cmd)
- LOG.debug("Mounting volume at: %s", mount_dir)
- cmd = "sudo mount /dev/vdb %s" % mount_dir
- self.client.execute(cmd)
+ _, stdout, _ = self.client.execute(
+ "lsblk -dps | grep -m 1 disk | awk '{print $1}'")
+ block_device = stdout.strip()
+ if block_device:
+ self.client.execute("sudo mkfs.ext4 %s" % block_device)
+ cmd = "sudo mkdir %s" % mount_dir
+ self.client.execute(cmd)
+ LOG.debug("Mounting volume at: %s", mount_dir)
+ cmd = "sudo mount %s %s" % (block_device, mount_dir)
+ self.client.execute(cmd)
self.setup_done = True
@@ -219,7 +223,7 @@ class Fio(base.Scenario):
sla_error += "%s %d < " \
"sla:%s(%d); " % (k, v, k, min_v)
- assert sla_error == "", sla_error
+ self.verify_SLA(sla_error == "", sla_error)
def _test():