You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
486 B
Bash

#!/bin/bash
set -e
# root 440GiB
# boot 2GiB
# free 8GiB
parted /dev/nvme0n1 mklabel msdos
parted /dev/nvme0n1 mkpart primary 1 440GiB
parted /dev/nvme0n1 mkpart primary 440GiB 442GiB
parted /dev/nvme1n1 mklabel msdos
parted /dev/nvme1n1 mkpart primary 1 440GiB
parted /dev/nvme1n1 mkpart primary 440GiB 442GiB
sleep 1
# $1=hostname
echo 'yes' | mdadm -C /dev/md0 --homehost="$1" -l1 -n2 /dev/nvmen[01]n1p1
echo 'yes' | mdadm -C /dev/md1 --homehost="$1" -l1 -n2 /dev/nvmen[01]n1p2