members
This commit is contained in:
parent
a5cf152c80
commit
f71653e290
1 changed files with 27 additions and 0 deletions
|
@ -136,6 +136,7 @@ function hetzner-rescue-wipe-12-10-10 {
|
||||||
'/dev/sda'
|
'/dev/sda'
|
||||||
'/dev/sdb'
|
'/dev/sdb'
|
||||||
)
|
)
|
||||||
|
local members
|
||||||
local number
|
local number
|
||||||
local unit='mib'
|
local unit='mib'
|
||||||
#
|
#
|
||||||
|
@ -192,6 +193,32 @@ function hetzner-rescue-wipe-12-10-10 {
|
||||||
# wipe boot
|
# wipe boot
|
||||||
dd if='/dev/zero' of="${device}2" bs='1G' status='progress'
|
dd if='/dev/zero' of="${device}2" bs='1G' status='progress'
|
||||||
done
|
done
|
||||||
|
#
|
||||||
|
members=()
|
||||||
|
for device in "${devices[@]}" ; do
|
||||||
|
members+=("${device}2")
|
||||||
|
done
|
||||||
|
mdadm \
|
||||||
|
--create '/dev/md/boot' \
|
||||||
|
--name 'boot' \
|
||||||
|
--uuid '6234a0eb:29a3a847:1dbd5ec4:bada5579' \
|
||||||
|
--metadata 1 \
|
||||||
|
--level 0 \
|
||||||
|
--raid-devices ${#devices[@]} \
|
||||||
|
"${members[@]}"
|
||||||
|
#
|
||||||
|
members=()
|
||||||
|
for device in "${devices[@]}" ; do
|
||||||
|
members+=("${device}1")
|
||||||
|
done
|
||||||
|
mdadm \
|
||||||
|
--create '/dev/md/crypt' \
|
||||||
|
--name 'crypt' \
|
||||||
|
--uuid '006234a0:eb29a3a8:471dbd5e:c4bada55' \
|
||||||
|
--metadata 1 \
|
||||||
|
--level 0 \
|
||||||
|
--raid-devices ${#devices[@]} \
|
||||||
|
"${members[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function hetzner-rescue-wipe-12-10-10-extra {
|
function hetzner-rescue-wipe-12-10-10-extra {
|
||||||
|
|
Loading…
Reference in a new issue