pandapi4
Posts: 2
Joined: Mon Nov 25, 2019 3:01 am

Pi 4 Dual USB drive Raid ZERO

Mon Nov 25, 2019 3:11 am

Hi, I was wondering if anyone can help me set up raid 0 between 2 8GB USB drives. I've tried countless times and it never seemed to work as it claimed to have set up as raid 0, but the speed is the same and it is still 16GB and not 8GB. I have tried this ( https://www.studiopieters.nl/raspberry-pi-raid-storage/ ) guide as it looks more promising than the others, and I have hit a brick wall. When I try to run a command to put drives sdb1 and sdc1 in raid 0, this it what is says:
root@raspberrypi:/home/pi# sudo mdadm --create --verbose /dev/md0 --level=stripe --raid-devices=2 /dev/sdb1 /dev/sdc1
mdadm: super1.x cannot open /dev/sdb1: Device or resource busy
mdadm: ddf: Cannot use /dev/sdb1: Device or resource busy
mdadm: Cannot use /dev/sdb1: It is busy
mdadm: cannot open /dev/sdb1: Device or resource busy


I am not using sda1 because that is used for something else. This has got to be the 100th time I'm trying and it never seems to work. The drives are literally no name, company bought with logo on it, and there r/w speed is about 4-5 MB/s. The reason I'm doing this is to run a Minecraft server and host the files on the two USB drives, because the server is being severely bottlenecked by the read speed. It crashes often due to not high RAM or high CPU usage, (running PaperMC), but when simply loading chunks? It seems as if that is the only reason why it suddenly hangs and crashes.

Much thanks :D
:D

dustnbone
Posts: 188
Joined: Tue Nov 05, 2019 2:49 am

Re: Pi 4 Dual USB drive Raid ZERO

Mon Nov 25, 2019 4:29 am

Looks like sdb1 is mounted somewhere.

Try

sudo umount /dev/sdb1

first.

Also I don't know if striping across 2 really slow USB sticks is going to help your case much, you'll probably see much better results using a cheap SSD or even a proper 2.5" hard drive.

LTolledo
Posts: 2780
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: Pi 4 Dual USB drive Raid ZERO

Mon Nov 25, 2019 9:07 am

RAID0 on RPi (even on RPi4B) is disaster waiting to happen.... good luck on your project.... you'll need lots of it! :mrgreen:
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

pandapi4
Posts: 2
Joined: Mon Nov 25, 2019 3:01 am

Re: Pi 4 Dual USB drive Raid ZERO

Mon Nov 25, 2019 8:32 pm

I tried to unmount it, but now it gives me this error:

Code: Select all

mdadm: chunk size defaults to 512K
mdadm: partition table exists on /dev/sdb1
mdadm: partition table exists on /dev/sdb1 but will be lost or
       meaningless after creating array
mdadm: super1.x cannot open /dev/sdc1: Device or resource busy
mdadm: /dev/sdc1 is not suitable for this array.
mdadm: create aborted
If this doesn't work like it usually does, I ordered a USB '3' to Sata + Power for a 3.5" 2 TB drive and was thinking of using that for plex and the Minecraft server. If the Chinese USB to Sata Cable isn't USB 2, then I think it will work along with plex beside it. The drive is more than capable of running a Minecraft server, as it has ~150 MB/s r/w. Also, by any chance do you know how I can use another phone charger to power the HDD and only pass through data to the Pi? I have the necessary(?) things to make it happen. Because since I am running a creative server, there will be a lot of flying around and reading more chunks from the USB drive, I don't think even 3 USB drives in Raid 0 will be sufficient enough when I bring more people on. Also, the drive will probably draw around 1.4 Amps 5v?
:D

Return to “Networking and servers”