Last active
September 11, 2018 23:08
-
-
Save omgjlk/5ca35182443bb7d6fd15ec335b1f18f2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mdadm_assemble() { | |
# mdadm will return '2' if the arrays already exist | |
set +e | |
mdadm --assemble --scan | |
ret="${?}" | |
set -e | |
if ! [[ "${ret}" == "0" || "${ret}" == "2" ]]; then | |
echo "Error assembling raid" >&2 | |
exit "${ret}" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment