summaryrefslogtreecommitdiff
diff options
authorPMR <pmr@pmr-lander>2018-04-16 21:45:28 +0000
committerPMR <pmr@pmr-lander>2018-04-16 21:45:28 +0000
commitb32f8969ebc48364c545db94d0eef02e299150e0 (patch)
treec1ea0d7aef17ebc356fd4596a8da2b6b257153a1
parent95433369845bc2eaa3d0bc4e1f774d03ca75c810 (diff)
parent1fe530f05431dc04efe020bafac84e6124d0a9cf (diff)
Merge #343124 from ~bladernr/plainbox-provider-checkbox:fix-disk_stress_ng
-rwxr-xr-xbin/disk_stress_ng4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/disk_stress_ng b/bin/disk_stress_ng
index df5694e..3668f63 100755
--- a/bin/disk_stress_ng
+++ b/bin/disk_stress_ng
@@ -103,7 +103,7 @@ find_largest_partition() {
largest_size=0
mapper_string="dm-"
if [ "${disk_device#*$mapper_string}" = "$disk_device" ]; then
- partitions=$(lsblk -b -l -n -o NAME,SIZE,TYPE,MOUNTPOINT $disk_device | grep part | tr -s " ")
+ partitions=$(lsblk -b -l -n -o NAME,SIZE,TYPE,MOUNTPOINT $disk_device | grep -E 'part|lvm' | tr -s " ")
else
partitions=$(lsblk -b -l -n -o NAME,SIZE,TYPE,MOUNTPOINT $disk_device)
fi
@@ -113,7 +113,7 @@ find_largest_partition() {
part_size=$(echo "$partitions" | grep "$partition " | cut -d " " -f 2)
part_location="/dev/$partition"
elif [ -b "/dev/mapper/$partition" ]; then
- part_size=$(echo "$partitions" | grep "$partition " | cut -d " " -f 3)
+ part_size=$(echo "$partitions" | grep "$partition " | cut -d " " -f 2)
part_location="/dev/mapper/$partition"
else
echo "$partition not found!"