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
435 B
Bash
21 lines
435 B
Bash
6 years ago
|
#!/bin/bash
|
||
|
set -e
|
||
|
|
||
|
|
||
|
# root 10GB
|
||
|
# boot 5GB
|
||
|
# free 5GB
|
||
|
|
||
|
parted /dev/vda mklabel msdos
|
||
|
parted /dev/vda mkpart primary 1 10GB
|
||
|
parted /dev/vda mkpart primary 10GB 15GB
|
||
|
parted /dev/vdb mklabel msdos
|
||
|
parted /dev/vdb mkpart primary 1 10GB
|
||
|
parted /dev/vdb mkpart primary 10GB 15GB
|
||
|
|
||
|
sleep 1
|
||
|
|
||
|
# $1=hostname
|
||
|
echo 'yes' | mdadm -C /dev/md0 --homehost="$1" -l1 -n2 /dev/vd[ab]1
|
||
|
echo 'yes' | mdadm -C /dev/md1 --homehost="$1" -l1 -n2 /dev/vd[ab]2
|