Skip to content

Instantly share code, notes, and snippets.

@ratacibernetica
Last active June 19, 2020 03:49
Show Gist options
  • Save ratacibernetica/423e956ba6b221920aad9c97ce107e55 to your computer and use it in GitHub Desktop.
Save ratacibernetica/423e956ba6b221920aad9c97ce107e55 to your computer and use it in GitHub Desktop.
RAID in raspberry pi 4

assuming device is in /dev/sda1

sudo apt install mdadm
sudo mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=1 /dev/sda1
sudo mkdir -p /mnt/raid1
sudo mkfs.ext4 /dev/md0
sudo mount /dev/md0 /mnt/raid1/
ls -l /mnt/raid1/
sudo nano /etc/fstab
#add this -> /dev/md0 /mnt/raid1/ ext4 defaults,noatime 0 1
sudo mdadm --detail --scan | sudo tee -a /etc/mdadm/mdadm.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment