diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2022-01-09 18:38:47 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2022-01-09 18:38:47 -0300 |
commit | 6be074848d001aeffd5136b0983f38df7f38de71 (patch) | |
tree | 384ccc6e02447f285f7847acaa6cbb5c012715b6 | |
parent | 26881a396d5d09f4877b343a8f0c6dd7c595567d (diff) | |
download | hydra-6be074848d001aeffd5136b0983f38df7f38de71.tar.gz hydra-6be074848d001aeffd5136b0983f38df7f38de71.tar.bz2 |
Fix: hydractl: provision: fix byte unit from megabyte to mebibyte
-rwxr-xr-x | share/hydractl/provision | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/share/hydractl/provision b/share/hydractl/provision index 35137ee..c219a0f 100755 --- a/share/hydractl/provision +++ b/share/hydractl/provision @@ -231,7 +231,7 @@ else # 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))" + mebibyte="$((1024*1024))" block="`echo $device | sed -e 's|^/dev/||'`" optimal_size="`cat /sys/block/$block/queue/optimal_io_size`" @@ -240,7 +240,7 @@ else # 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="$megabyte" + optimal_size="$mebibyte" fi alignment_offset="`cat /sys/block/$block/alignment_offset`" @@ -249,7 +249,7 @@ else optimal_sector_size="$(($optimal_size / $block_size))" # Sector size for a 1MB partition - bios_grub_size="$(($megabyte/$block_size))" + bios_grub_size="$(($mebibyte/$block_size))" bios_grub_end="$(($start + $bios_grub_size - 1))" # Regular disk partitioning. @@ -289,7 +289,7 @@ else #boot_start="$(($bios_grub_end + 1))" boot_size="1024" boot_start="`partition_sector_start $start $bios_grub_end $optimal_sector_size`" - boot_size="$(($boot_size * $megabyte / $block_size))" + boot_size="$(($boot_size * $mebibyte / $block_size))" boot_end="$(($boot_start + $boot_size -1))" #lvm_start="$($boot_end + 1))" lvm_start="`partition_sector_start $start $boot_end $optimal_sector_size`" |