aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xshare/hydractl/provision7
1 files changed, 3 insertions, 4 deletions
diff --git a/share/hydractl/provision b/share/hydractl/provision
index ac78699..50c689a 100755
--- a/share/hydractl/provision
+++ b/share/hydractl/provision
@@ -201,6 +201,9 @@ if [ "$num_devices" != "1" ]; then
syst_device="$device"
else
# Partition alignment
+ # See https://rainbow.chard.org/2013/01/30/how-to-align-partitions-for-best-performance-using-parted/
+ # https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-block
+ # https://people.redhat.com/msnitzer/docs/io-limits.txt
megabyte="$((1024*1024))"
block="`echo $device | sed -e 's|^/dev/||'`"
optimal_size="`cat /sys/block/$block/queue/optimal_io_size`"
@@ -209,10 +212,6 @@ else
start="$((($optimal_size + $alignment_offset) / $block_size))"
optimal_sector_size="$(($optimal_size / $block_size))"
- #start="`awk -v x=$(cat /sys/block/$block/queue/optimal_io_size) \
- # -v y=$(cat /sys/block/$block/alignment_offset) \
- # -v z=$(cat /sys/block/$block/queue/physical_block_size) 'BEGIN { print ( x + y ) / z }'`"
-
# Sector size for a 1MB partition
bios_grub_size="$(($megabyte/$block_size))"
bios_grub_end="$(($start + $bios_grub_size - 1))"