diff options
author | PMR <pmr@pmr-lander> | 2017-03-06 03:52:21 +0000 |
---|---|---|
committer | PMR <pmr@pmr-lander> | 2017-03-06 03:52:21 +0000 |
commit | dd00595cfafe76b4719bcdc79c509c40e854f3a7 (patch) | |
tree | 29c85520b6e1debd3f04c3b2fe70e052cfde576d | |
parent | 573fff67d94422a8b158859f4943881a0a7a2750 (diff) | |
parent | 68aaa79e797742ca87fb27ab844c16b107c24e94 (diff) |
Merge #318160 from ~bladernr/plainbox-provider-checkbox:1667488-don
-rwxr-xr-x | bin/disk_stress_ng | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/disk_stress_ng b/bin/disk_stress_ng index a47ab79..de96f46 100755 --- a/bin/disk_stress_ng +++ b/bin/disk_stress_ng @@ -151,9 +151,15 @@ mount_filesystem() { fi find_largest_partition - + if [ -n "$largest_part" ] ; then echo "Found largest partition: \"$largest_part\"" + # If largest partition is too small, just abort with a message + if [ $largest_size -lt 10000000000 ] ; then + echo "Warning: $largest_part is less than 10GiB in size" + echo "Disk is too small to test. Aborting test!" + exit 1 + fi mount_point=$(df | grep "$largest_part " | tr -s " " | cut -d " " -f 6) if [ "$mount_point" == "" ] && [ "$really_run" == "Y" ] ; then disk_device=$(echo $disk_device | sed "s/\/dev\/\/dev/\/dev/g") |