allow degraded raid

This commit is contained in:
Tobias Powalowski 2024-06-04 12:03:40 +02:00
parent e3a6ce5ade
commit dc3d024fef

View file

@ -460,8 +460,10 @@ _createmd()
echo "${_DEV}" >>/tmp/.raid echo "${_DEV}" >>/tmp/.raid
while true; do while true; do
_RAIDNUMBER=$((_RAIDNUMBER + 1)) _RAIDNUMBER=$((_RAIDNUMBER + 1))
# clean loop from used partition and options if [[ -n ${_DEV} ]]; then
_DEVS="$(echo "${_DEVS}" | sed -e "s#$(${_LSBLK} NAME,SIZE -d "${_DEV}" 2>"${_NO_LOG}")##g")" # clean loop from used partition and options
_DEVS="$(echo "${_DEVS}" | sed -e "s#$(${_LSBLK} NAME,SIZE -d "${_DEV}" 2>"${_NO_LOG}")##g")"
fi
# add more devices # add more devices
# raid0 doesn't support missing devices # raid0 doesn't support missing devices
if [[ "${_LEVEL}" == "raid0" || "${_LEVEL}" == "linear" ]]; then if [[ "${_LEVEL}" == "raid0" || "${_LEVEL}" == "linear" ]]; then