Created
February 4, 2020 01:44
-
-
Save noslin005/16cfbb522ee8febfdba99384540f1767 to your computer and use it in GitHub Desktop.
Fix mdadm RAID after OS Reinstall
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
# reassemble the raid | |
sudo mdadm --assemble --scan | |
sudo mdadm --detail --scan | sudo tee -a /etc/mdadm.conf | |
# Rebuild kernel to include the raid configuration | |
sudo dracut -f /boot/initramfs-$(uname -r).img $(uname -r) | |
sudo grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg | |
# Remake the file system | |
sudo sfdik --delete /dev/md0 | |
sudo mkfs.xfs -f /dev/md0 | |
# Add to fstab | |
sudo echo "UUID=$(blkid -o value -s UUID /dev/md0) /mnt/data0 xfs defaults,nofail 0 0" | tee -a /etc/fstab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment