Last active
August 11, 2024 01:27
-
-
Save joleeee/96e014529b7591edf490e9db7586f76f to your computer and use it in GitHub Desktop.
This file contains 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
apk add mdadm | |
echo path to disk A? | |
read a | |
echo path to disk B? | |
read b | |
mdadm --create --verbose /dev/md0 --level=raid0 --raid-devices=2 $a $b | |
cp /etc/mdadm.conf /tmp/mdadm.conf | |
mdadm --detail --scan /dev/md0 >> /tmp/mdadm.conf | |
cat /tmp/mdadm.conf | uniq > /etc/mdadm.conf | |
rm /tmp/mdadm.conf | |
mkinitfs | |
apk add xfsprogs | |
mkfs.xfs /dev/md0 | |
mkdir -p /array | |
u=`blkid | grep /dev/md0 | awk '{print $2}' | sed 's/"//g'` | |
cp /etc/fstab /tmp/fstab | |
echo "$u /array xfs defaults 0 0" >> /tmp/fstab | |
cat /tmp/fstab | uniq > /etc/fstab | |
rm /tmp/fstab |
Author
joleeee
commented
May 18, 2021
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment