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
451 B
Bash

7 years ago
#!/bin/bash
set -e
# root 440GiB
# boot 2GiB
# free 5GiB
7 years ago
parted /dev/sda mklabel msdos
7 years ago
parted /dev/sda mkpart primary 1 440GiB
7 years ago
parted /dev/sda mkpart primary 440GiB 442GiB
parted /dev/sdb mklabel msdos
7 years ago
parted /dev/sdb mkpart primary 1 440GiB
7 years ago
parted /dev/sdb mkpart primary 440GiB 442GiB
7 years ago
7 years ago
sleep 1
# $1=hostname
echo 'yes' | mdadm -C /dev/md0 --homehost="$1" -l1 -n2 /dev/sd[ab]1
echo 'yes' | mdadm -C /dev/md1 --homehost="$1" -l1 -n2 /dev/sd[ab]2