How to setup a Home Raid Lab using RPi Compute Module 4 (Part 2)

Want to learn how to create a raid0 on rpi?
Want to learn how to create a raid 1 array on rpi?
Want to see how to do this with RPI CM4?
Stay tuned and I will show you how to do this

⏱️TIMESTAMPS⏱️
0:00 – Intro
0:46 – What we will be covering
2:20 – creating SD card
2:43 – enable ssh on boot
3:04 – enable usb ports on IO card
3:26 – initial boot of CM4
4:10 – install OS updates
5:20 – checking USB ports being active
5:53 – install mdadm for raid
6:04 – checking mdadm
6:17 – checking USB drives
6:57 – partitioning drives
7:57 – checking partitions
8:58 – setting up raid 0
9:40 – setting up raid 1
10:33 – checking array build status

sudo apt-get update
sudo apt-get upgrade -y

Create zero bytes file named ssh in root of boot sd

Check for devices plugged in on usb
lsusb -t

Sudo nano /boot/config.txt
Add this line – dtoverlay=dwc2,dr_mode=host

Save and exit
Reboot pi and usb should be active

!! Install mdadm
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install mdadm -y

! Verifies mdadm is installed
sudo mdadm -V

!verify raid setup
sudo mdadm –examine /dev/sda /dev/sdb

! Show status of array building
cat /proc/mdstat

! For more detail in array building process
sudo mdadm –detail /dev/md0

! To stop array
sudo mdadm –stop –scan

! List drives current attached
lsblk -o NAME,SIZE,FSTYPE,TYPE,MOUNTPOINT

1. Identify mount point
lsblk -o NAME,SIZE,FSTYPE,TYPE,MOUNTPOINT

2. Raid 0
sudo mdadm –create –verbose /dev/md0 –level=0 –raid-devices=2 /dev/sda /dev/sdb

3. Raid 1
sudo mdadm –create –verbose /dev/md0 –level=1 –raid-devices=2 /dev/sda /dev/sdb

4. Create mount point
sudomkdir-p /mnt/md0

5. Save array layout
sudo mdadm –detail –scan |sudotee-a /etc/mdadm/mdadm.conf

6. Automounting at boot
echo’/dev/md0 /mnt/md0 ext4 defaults,nofail,discard 0 0’|sudotee-a /etc/fstab

How to Wipe a Hard Drive on Any Operating System

https://www.jeffgeerling.com/blog/2020/usb-20-ports-not-working-on-compute-module-4-check-your-overlays

https://www.digitalocean.com/community/tutorials/how-to-create-raid-arrays-with-mdadm-on-debian-9

Show how to do this on Linux as well
## These directions appear to be the way to go

Build a Raspberry Pi RAID NAS Server – [UPDATED 2020]


Good way to introduce compute module 4

Raid 0 – striping data across drives
• Lowest overhead in write speed
• Single Drive failure results in total data loss
Raid 1 – mirrored drives (50% overhead)
• Match set of drives
• Single drive failure tolerated
• Slow write performance
• Data is written to both drives

================================================
*** Show Notes, Links and Resources ****
USB hub 3.0,7-Port USB Hub
https://amzn.to/3qU1v4S

Raspberry Pi Compute Module 4 Lite w/ Wifi
https://amzn.to/3eXyMqZ

Raspberry Pi Compute Module 4 IO Board
https://amzn.to/3BFBfA9

12V 5A Power Supply, Waysse Power Supply Adapter
https://amzn.to/3BFRJsb

———————————–
Get Your SmartHome Device Checklist here –
http://eepurl.com/goDE49

➥➥➥ SUBSCRIBE FOR MORE VIDEOS ➥➥➥
Never miss a video about creating your own smart home
Subscribe ⇢ http://ronaldnutter.com/subscribe

To listen to an audio version of this episode while driving, TechBytes with Ron Nutter is available on iTunes, Google Podcasts, Stitcher and TuneIn. Go to TechByteswithRonNutter.com to subscribe today!

To subscribe to the TechbytesRN newsletter, click here – http://ronaldnutter.com/sample1
In return for subscribing to the newsletter, I will send you a chapter from my first DIY Smart Home Guide Book.

Visit http://www.ronaldnutter.com to see all the books Ron has written

DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This helps support the channel and allows me to continue to make videos like this. Thank you for the support!

*===============================*
Become a Patreon supporter
https://www.patreon.com/techbytesrn
*===============================*

#TechBytesRN #smarthome #cm4 #rpi #RaidWant to learn how to create a raid0 on rpi?
Want to learn how to create a raid 1 array on rpi?
Want to see how to do this with RPI CM4?
Stay tuned and I will show you how to do this

⏱️TIMESTAMPS⏱️
0:00 – Intro
0:46 – What we will be covering
2:20 – creating SD card
2:43 – enable ssh on boot
3:04 – enable usb ports on IO card
3:26 – initial boot of CM4
4:10 – install OS updates
5:20 – checking USB ports being active
5:53 – install mdadm for raid
6:04 – checking mdadm
6:17 – checking USB drives
6:57 – partitioning drives
7:57 – checking partitions
8:58 – setting up raid 0
9:40 – setting up raid 1
10:33 – checking array build status

sudo apt-get update
sudo apt-get upgrade -y

Create zero bytes file named ssh in root of boot sd

Check for devices plugged in on usb
lsusb -t

Sudo nano /boot/config.txt
Add this line – dtoverlay=dwc2,dr_mode=host

Save and exit
Reboot pi and usb should be active

!! Install mdadm
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install mdadm -y

! Verifies mdadm is installed
sudo mdadm -V

!verify raid setup
sudo mdadm –examine /dev/sda /dev/sdb

! Show status of array building
cat /proc/mdstat

! For more detail in array building process
sudo mdadm –detail /dev/md0

! To stop array
sudo mdadm –stop –scan

! List drives current attached
lsblk -o NAME,SIZE,FSTYPE,TYPE,MOUNTPOINT

1. Identify mount point
lsblk -o NAME,SIZE,FSTYPE,TYPE,MOUNTPOINT

2. Raid 0
sudo mdadm –create –verbose /dev/md0 –level=0 –raid-devices=2 /dev/sda /dev/sdb

3. Raid 1
sudo mdadm –create –verbose /dev/md0 –level=1 –raid-devices=2 /dev/sda /dev/sdb

4. Create mount point
sudomkdir-p /mnt/md0

5. Save array layout
sudo mdadm –detail –scan |sudotee-a /etc/mdadm/mdadm.conf

6. Automounting at boot
echo’/dev/md0 /mnt/md0 ext4 defaults,nofail,discard 0 0’|sudotee-a /etc/fstab

How to Wipe a Hard Drive on Any Operating System

https://www.jeffgeerling.com/blog/2020/usb-20-ports-not-working-on-compute-module-4-check-your-overlays

https://www.digitalocean.com/community/tutorials/how-to-create-raid-arrays-with-mdadm-on-debian-9

Show how to do this on Linux as well
## These directions appear to be the way to go

Build a Raspberry Pi RAID NAS Server – [UPDATED 2020]


Good way to introduce compute module 4

Raid 0 – striping data across drives
• Lowest overhead in write speed
• Single Drive failure results in total data loss
Raid 1 – mirrored drives (50% overhead)
• Match set of drives
• Single drive failure tolerated
• Slow write performance
• Data is written to both drives

================================================
*** Show Notes, Links and Resources ****
USB hub 3.0,7-Port USB Hub
https://amzn.to/3qU1v4S

Raspberry Pi Compute Module 4 Lite w/ Wifi
https://amzn.to/3eXyMqZ

Raspberry Pi Compute Module 4 IO Board
https://amzn.to/3BFBfA9

12V 5A Power Supply, Waysse Power Supply Adapter
https://amzn.to/3BFRJsb

———————————–
Get Your SmartHome Device Checklist here –
http://eepurl.com/goDE49

➥➥➥ SUBSCRIBE FOR MORE VIDEOS ➥➥➥
Never miss a video about creating your own smart home
Subscribe ⇢ http://ronaldnutter.com/subscribe

To listen to an audio version of this episode while driving, TechBytes with Ron Nutter is available on iTunes, Google Podcasts, Stitcher and TuneIn. Go to TechByteswithRonNutter.com to subscribe today!

To subscribe to the TechbytesRN newsletter, click here – http://ronaldnutter.com/sample1
In return for subscribing to the newsletter, I will send you a chapter from my first DIY Smart Home Guide Book.

Visit http://www.ronaldnutter.com to see all the books Ron has written

DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This helps support the channel and allows me to continue to make videos like this. Thank you for the support!

*===============================*
Become a Patreon supporter
https://www.patreon.com/techbytesrn
*===============================*

#TechBytesRN #smarthome #cm4 #rpi #Raid