SETTING UP RAID on ARGON EON

How to Create a RAID volume on my EON

Currently, as of Jan 2022, openmediavault doesn’t support the creation of the RAID via USB, so you need to use terminal commands:

A great link with all information can be found here.

Build a Raspberry Pi RAID NAS Server - [UPDATED 2020] - Ricmedia

  1. Connect to your EON / Raspberry Pi via your preferred SSH or locally with a keyboard and monitor.

  2. Login to your devices and be sure to be as Root. As you are using root commands, it’s easier to be a root user to start with.

sudo -i

  1. Update your system and install mdam to the latest build.

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

  1. Now you can check what devices are detected on the USB using the blkid command

blkid

  1. The first two entries below are the MicroSD Card system volumes (example only).

/dev/mmcblk0p1: LABEL_FATBOOT=“boot” LABEL=“boot” UUID=“E183-6233” BLOCK_SIZE=“512” TYPE=“vfat” PARTUUID=“f1b709c5-01” /dev/mmcblk0p2: LABEL=“rootfs” UUID=“1232a209-2596-48f0-a078-731d10b918ad” BLOCK_SIZE=“4096” TYPE=“ext4” PARTUUID=“f1b709c5-02” /dev/sda: UUID=“9a87989d-4416-418c-a4e1-519f7eee35ec” UUID_SUB=“bd60ae45-dc12-abb8-c9fa-86bc81889694” LABEL=“raspberrypi:vol1” TYPE=“linux_raid_member”
/dev/sdd: UUID=“9a87989d-4416-418c-a4e1-519f7eee35ec” UUID_SUB=“cfa06626-2185-0f75-ee37-0e6f530e89a5” LABEL=“raspberrypi:vol1” TYPE=“linux_raid_member”
/dev/sdb: UUID=“689ce03f-1702-4659-2a84-44945406b248” UUID_SUB=“a86057f4-f98a-2a07-c62b-38402b09af89” LABEL=“raspberrypi:vol2” TYPE=“linux_raid_member”
/dev/sdc: UUID=“689ce03f-1702-4659-2a84-44945406b248” UUID_SUB=“09d326e7-02fd-9e0b-2541-080064541fb5” LABEL=“raspberrypi:vol2” TYPE=“linux_raid_member”

(Note: if you are booting your RPI via the internal USB header, the results may differ slightly from the above)

  1. The EON has four connectors for HDDs, they should report to the system as /dev/sda, /dev/sdb, /dev/sdc & /dev/sdd So, this means /dev/sda /dev/sdd are the 3.5in HDD slots, and /dev/sdb & /dev/sdc are the 2.5in HDD slots.

Note: if you have no UUID or have some volumes present, it’s best to wipe the disk before trying to build an array.

  1. Created a mirror for both sets of drives, and used the following commands.

mdadm --create --verbose /dev/md/vol1 --level=1 --raid-devices=2 /dev/sda /dev/sdd mdadm --create --verbose /dev/md/vol2 --level=1 --raid-devices=2 /dev/sdb /dev/sdc

Note: You will be prompted for some confirmation prompts and even notice if the drives have existing data on them, then you need to clean the drives (see below)

mdadm: partition table exists on /dev/sdb
mdadm: partition table exists on /dev/sdb but will be lost or

meaningless after creating array
mdadm: Note: this array has metadata at the start and

may not be suitable as a boot device. If you plan to store ‘/boot’ on this device please ensure that
your boot-loader understands md/v1.x metadata, or use --metadata=0.90

mdadm: partition table exists on /dev/sdc
mdadm: partition table exists on /dev/sdc but will be lost or

meaningless after creating array mdadm: size set to 976630464K

mdadm: automatically enabling write-intent bitmap on large array
As soon as you create these, OpenVault media will pick up the volumes

Continue creating array? Y (you will be prompted here to accept the creation) mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md/vol2 started.

Check RAID Details via OMV
Screen Shot 2022-01-25 at 12.12.05 PM

Clean Drives which are not empty via OMV:
Screen Shot 2022-01-25 at 12.12.18 PM

10 Likes

Can’t wait to try this out!! :smile:

2 Likes

Ordering drives today, raid is first job

2 Likes

YES, thanks for this article. It was a big let down, after I realized the argon uses USB and OMV doesn´t support that (because it´s deemed too unreliable…) .

Thanks for the guide I would not have gotten anywhere without it.

How would I replace a drive if it failed? I gather I would have to replace it and then first update my setup via Terminal on the raspberry pi first?

Not really what I had in mind when I backed this. Defeats the point of OMV does it not?

RAID rebuild will be done using mdadm.

1 Like

I received my EON the other day and set it up today. My initial plan was to use OMV as I have in the past, to assimilate a handful of disks in a linear RAID. I just want JBOD.

Am I correct in reading that this workaround to create the RAID Array via CLI, does not work for a Linear RAID?

I’ve not tried it but I would assume that when building the raid you would use --level=linear rather than --level=1

Below taken from mdadm man page

-l, --level=
       Set RAID level.  When used with --create, options are:
       linear, raid0, 0, stripe, raid1, 1, mirror, raid4, 4,
       raid5, 5, raid6, 6, raid10, 10, multipath, mp, faulty,
       container.  Obviously some of these are synonymous.

Hey All,

I understand the default /dev/sd* allocation for each HDD if a MicroSD card is used. However, if I used the internal USB header with a NVMe drive and two 3.5in HDD the blkid reports:

sda = 3.5in HDD
sdb = USB NVMe
sdc = 3.5in HDD

My questions are:

  1. Will this list order and current drives affect the mdadm raid mirror?
  2. In the future if I add two 2.5in drives will the boot USB NVMe be pushed to /dev/sde automatically?
  3. Alternatively, can I manually reorder the USB NVMe to /dev/sde to eliminate any future problems?

Sorry for all the questions, just wanted to make sure before I create my mdadm raid and configure OMV. Cheers.

I’m using the 64-bit lite version of Bullseye.

When I type blkid it’s not showing the two 3.5" drives I have installed, just the NVME drive I have installed on the internal connector (/dev/sbb1 and /dev/sbb2).
Is this a Bullseye issue or a 64-bit “feature”.

lsblk does show my pair of 2TB 3.5" drives on sda and sdc, so my drives are being seen.

@Mars I added a 2.5" HDD I had here just to see what would happen, and my boot NVME driver moved from sdb to sdc.
I’ve got the same question/concern as you.
If I add another set of drives later, is mdadm smart enough to detect that and adjust?

1 Like

What filesystem should I use? EXT4 or BTRFS or XFS?

What is the recommendations?

Mike

Got it. Thanks! Going to give this one a try and see what happens.

Still pretty disappointed in the software support. Especially since all the lead up and even the included materials were to use OMV. Knowing the devices were connected via USB and OMVs lack of support for USB RAID (understandably so), is disappointing.

2 Likes

Linux enumerates the devices in the order it sees them. There is no guaranteed order that the disks will show up.

1 Like

I had the same issue using the 32-bit version of Bullseye. “blkid” did not show the drives, but “lsblk” did. So ran the following “sudo mdadm --create /dev/md/mdX --level=0 --raid-devices=2 dev/sda dev/sdc”, now when I look with “blkid” I see the 2 disks with the following “TYPE=“linux_raid_member””.

This gave me a RAID 0 (JBOD), change to --level=1 if you want a mirror.

Hope that helps!

You command line has an error! Needs a “/” before the folder “dev”.

Example: “sudo mdadm --create /dev/md/mdX --level=0 --raid-devices=2 /dev/sda /dev/sdc”

I followed this video and it helped me tremendously.

You are correct, but since I copied what I used and I was already in dev, I didn’t need it.

here is a script I put together to monitor the CPU Temperature and USB HDD:

#!/usr/bin/env python3
import os
import sys
import subprocess
import platform
from datetime import date

def print_header():
today = date.today()
Date = today.strftime("%m/%d/%Y")
Hostname = platform.node()

print("\n")
print(f"Date: {Date}\t Hostname: {Hostname}")
print("===========================================\n")

def print_cpu_temperature():
temp = open(’/sys/class/thermal/thermal_zone0/temp’, ‘r’).read()
celsius = (int(temp)/1000)
#fahrenheit = (celsius * 9/5) + 32
fahrenheit = convert_celsius_to_fahrenheit(celsius)

print("CPU Temperature:")
print("----------------")
print("\tCPU Celsius\t => {:.2f}".format(celsius))
print("\tCPU Fahrenheit\t => {:.2f}".format(fahrenheit))

def check_root():
username = (os.getenv(“USER”))
if username != “root”:
sys.exit(“Script must run as root or via sudo”)

def disks():
diskFile = open("/tmp/disks.txt", “w”)

cmd = "lsblk -d -o name"

p = os.popen(cmd).read()
diskFile.write(p)
diskFile.close()

def convert_celsius_to_fahrenheit(celsius):
fahrenheit = (float(celsius) * 9 / 5 + 32)
return fahrenheit

def DiskTemp():
print("\n")
print(“HDD Temperature:”)
print("----------------")

disks = open("/tmp/disks.txt", "r")
for line in disks:
	(name)=line.strip()
	if name != 'NAME':
		cmd1 = "smartctl --all /dev/NAME -d sat|grep Temperature_Celsius|awk '{print $10}'"
		cmd1 = cmd1.replace("NAME", name)
		sp = os.popen(cmd1).read().strip()
		sp = float(sp)
		fahrenheit = convert_celsius_to_fahrenheit(sp)

		print(f"\t/dev/{name} Celcius\t => {sp:.2f}")
		print(f"\t/dev/{name} Farenheit\t => {fahrenheit:.2f}")
disks.close()

def main():
#check_root()
print_header()
print_cpu_temperature()
disks()
DiskTemp()

if name == “main”:
main()