diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2019-05-12 08:17:16 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2019-05-12 08:17:16 -0300 |
commit | b3f9f227a8f5ce20c64d87819f68775cc286d6a9 (patch) | |
tree | 7f4bdc74ac6693ce0946470e55e66637038a2a49 | |
parent | 02bb4f7c06c8beaf2cb599c70c9efd1c4e55d974 (diff) | |
download | hydra-b3f9f227a8f5ce20c64d87819f68775cc286d6a9.tar.gz hydra-b3f9f227a8f5ce20c64d87819f68775cc286d6a9.tar.bz2 |
Provision: try optimal partition alignment
-rwxr-xr-x | share/hydractl/provision | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/share/hydractl/provision b/share/hydractl/provision index 24fd614..3569cbf 100755 --- a/share/hydractl/provision +++ b/share/hydractl/provision @@ -173,9 +173,9 @@ if [ "$num_devices" != "1" ]; then device="/dev/md/$hostname" for dev in $physical_devices; do - hydra_sudo_run parted -s -- $dev mklabel gpt - hydra_sudo_run parted -s -- $dev mkpart ext4 1M 100% - hydra_sudo_run parted -s -- $dev set 1 raid on + hydra_sudo_run parted -s -- $dev mklabel gpt + hydra_sudo_run parted -s -a optimal -- $dev mkpart ext4 1M 100% + hydra_sudo_run parted -s -- $dev set 1 raid on done mdadm --create --verbose $device --level=1 --raid-devices=$num_devices $physical_devices @@ -187,20 +187,20 @@ if [ "$num_devices" != "1" ]; then syst_device="$device" else # Regular disk partitioning. - hydra_sudo_run parted -s -- $device mklabel gpt - hydra_sudo_run parted -s -- $device unit MB mkpart non-fs 2 3 - hydra_sudo_run parted -s -- $device set 1 bios_grub on + hydra_sudo_run parted -s -- $device mklabel gpt + hydra_sudo_run parted -s -a optimal -- $device unit MB mkpart non-fs 2 3 + hydra_sudo_run parted -s -- $device set 1 bios_grub on if [ "$encrypt" == "y" ]; then - hydra_sudo_run parted -s -- $device unit MB mkpart ext2 3 -1 - hydra_sudo_run parted -s -- $device set 2 lvm on + hydra_sudo_run parted -s -a optimal -- $device unit MB mkpart ext2 3 -1 + hydra_sudo_run parted -s -- $device set 2 lvm on boot_device="$device"2 syst_device="$device"2 else - hydra_sudo_run parted -s -- $device unit MB mkpart ext2 3 200 - hydra_sudo_run parted -s -- $device unit MB mkpart ext2 200 -1 - hydra_sudo_run parted -s -- $device set 3 lvm on + hydra_sudo_run parted -s -a optimal -- $device unit MB mkpart ext2 3 200 + hydra_sudo_run parted -s -a optimal -- $device unit MB mkpart ext2 200 -1 + hydra_sudo_run parted -s -- $device set 3 lvm on boot_device="$device"2 syst_device="$device"3 |