prepare bcachefs raid options

This commit is contained in:
Tobias Powalowski 2024-05-21 21:29:21 +02:00
parent c42f27a872
commit 2467ab367f

View file

@ -65,7 +65,6 @@ _bcfs_select_raid_devices () {
_BCFS_DEV=$(cat "${_ANSWER}")
[[ "${_BCFS_DEV}" == "DONE" ]] && break
_bcfs_raid_options || return 1
echo "${_DURABILITY}" "${_BCFS_LABEL}" "${_BCFS_DEV}" >>/tmp/.bcfs-raid-device
echo "${_BCFS_SSD_OPTIONS}" >>/tmp/.bcfs-raid-device
echo "${_BCFS_HDD_OPTIONS}" >>/tmp/.bcfs-raid-device
@ -87,13 +86,11 @@ _bcfs_raid_level() {
_DUR_COUNT="0"
_BCFS_HDD_COUNT="0"
_BCFS_SSD_COUNT="0"
while [[ "${_BCFS_RAID_FINISH}" != "DONE" ]]; do
#shellcheck disable=SC2086
_dialog --no-cancel --title " Raid Data Level " --menu "" 11 30 7 ${_BCFS_RAIDLEVELS} 2>"${_ANSWER}" || return 1
_BCFS_LEVEL=$(cat "${_ANSWER}")
if [[ "${_BCFS_LEVEL}" == "NONE" ]]; then
echo "${_BCFS_DEV}" >>/tmp/.bcfs-device
break
else
# replicas
_BCFS_REPLICATION="2 - 3 - Custom _"
@ -104,10 +101,11 @@ _bcfs_raid_level() {
"4" 2>"${_ANSWER}" || return 1
_BCFS_REP_COUNT="$(cat "${_ANSWER}")"
fi
while [[ "${_BCFS_RAID_FINISH}" != "DONE" ]]; do
_bcfs_raid_options
_bcfs_select_raid_devices
fi
done
fi
}
# ask for bcfs compress option