From e2ed854f9213e63345522a1891098d2e3b6fee03 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 12 May 2019 13:15:07 -0300 Subject: Provision: partition alignment: comments --- share/hydractl/provision | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'share/hydractl') 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))" -- cgit v1.2.3