raid_create
This commit is contained in:
parent
8d53e86bcd
commit
2722134a0f
1 changed files with 16 additions and 0 deletions
16
bash/fs.sh
16
bash/fs.sh
|
@ -103,3 +103,19 @@ luks_format() {
|
||||||
cryptsetup "${@}" luksFormat "${device}"
|
cryptsetup "${@}" luksFormat "${device}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
raid_create() {
|
||||||
|
if [ -n "${4}" ]; then
|
||||||
|
local name="${1}"
|
||||||
|
local uuid="${2}"
|
||||||
|
shift 2
|
||||||
|
mdadm \
|
||||||
|
--create "/dev/md/${name}" \
|
||||||
|
--level 0 \
|
||||||
|
--metadata 1 \
|
||||||
|
--name "md:${name}" \
|
||||||
|
--raid-devices ${#} \
|
||||||
|
--uuid "${uuid}" \
|
||||||
|
"${@}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue