aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2022-01-09 18:36:55 -0300
committerSilvio Rhatto <rhatto@riseup.net>2022-01-09 18:36:55 -0300
commit26881a396d5d09f4877b343a8f0c6dd7c595567d (patch)
treebf76e3f467ecadd43ff061df55c6f6f95e7c01f2
parent374b8b03eba384b4bd31cdec7d978b3d0dd4c7de (diff)
downloadhydra-26881a396d5d09f4877b343a8f0c6dd7c595567d.tar.gz
hydra-26881a396d5d09f4877b343a8f0c6dd7c595567d.tar.bz2
Fix: hydractl: provision: default optimal size should be 1 MiB
-rwxr-xr-xshare/hydractl/provision5
1 files changed, 4 insertions, 1 deletions
diff --git a/share/hydractl/provision b/share/hydractl/provision
index 3176f21..35137ee 100755
--- a/share/hydractl/provision
+++ b/share/hydractl/provision
@@ -235,9 +235,12 @@ else
block="`echo $device | sed -e 's|^/dev/||'`"
optimal_size="`cat /sys/block/$block/queue/optimal_io_size`"
+ # Use a default of 1 MiB for the optimal size
# See https://access.redhat.com/articles/3911611
+ # https://blog.hqcodeshop.fi/archives/273-GNU-Parted-Solving-the-dreaded-The-resulting-partition-is-not-properly-aligned-for-best-performance.html
+ # http://opensource.hqcodeshop.com/Parted%20calculator/parted_mkpart_calc.sh
if [ "$optimal_size" == "0" ]; then
- optimal_size="1024"
+ optimal_size="$megabyte"
fi
alignment_offset="`cat /sys/block/$block/alignment_offset`"