How many external HDDs can you have in a Raspberry Pi 4 8gb?

Do you use crontab -e to prevent your drive from sleeping? I found out that the USB drive’s sleeping is unstable when using with USB hub. It crashed my drives and I had to use usb-reset to reset my hubs.

Another thing worth mentioning is that I use USB 3 hub while you use USB 2 hub. I have no experience with the hub you’re using but I can tell you that its controller chip is most likely outdated. I am not sure whether it’s designed to work with so many drives as the data transfer rate limit is capped at 480 Mbps instead of 5Gbps.

2 Likes

Rock Pi4 is different than Raspberry Pi4. I tried to find the information of how many device slots that the Rock Pi4 can support but I didn’t find any. Nonetheless, it seems to be usable with 32 drives connecting through 2x16 ports USB hubs.

However, I find that the setup with Rock Pi4 is expensive with the 2 powered hubs. I can buy 10-12 unpowered hubs (7 ports) with the same amount of money. Moreover, I didn’t see it mentioning where it installed the OS, i.e. microSD card, eMMC, or in the connected drives. Basically, you can just buy another Raspberry Pi4 + unpowered hubs with the same amount of money, play it on the card so your device won’t go down with the farming drives in case you need to reset the USB connection or your drive(that you installed the OS on) brakes for some reason.

2 Likes

Hello. Is your 7-Port USB USB 2.0 or USB 3.0. If it is USB 2.0, is the speed fast enough for chia farming. I have a Sabrent 16-Port USB 3.0 (powered) for raspberry Pi 4 8G, and the maximum number external HDD I can connect is 12. Additional HDD connect will crash the computer. Thanks

It’s the 3.0 hub. It uses 2 VL817 controller chips. I connect one of the hubs through a USB 2.0 port and see no impact on the farming.

I connect 20 HDDs with 3 hubs with zero issues. Many people have issues connecting with the powered hub. You can read through this thread for more details. Your Pi should supports 20 HDDs.

1 Like

Thanks @ kreaninw

Sorry for my late report

It turned out the root cause was my DC power jack to my SATA2USB converter, voltage drop causing not enough power to spin the disk. The OS can even recognize my usb device (Class=Mass Storage, Driver=usb-storage, 480M) without DC power, I think it pulls power from my powered hub.

90% of my problems so far end up with hardware root cause.

Could you guide me how to use crontab – e to prevent my drive from sleeping? Thanks

1 Like

what type of connector you are using?
usb 3 to sata with ext 12V power i suppose…
i cant find cheap cable.
any suggestions?

I’ve a script located in /root/keep_hdds_running.sh

#!/bin/sh

BASE="/mnt/farm"

for m in $(mount | grep "${BASE}" | cut -d" " -f 3)
do
  touch "${m}/.keep_hdd_running" >/dev/null 2>&1
done

Then do a crontab -e and add:
* * * * * /root/keep_hdds_running.sh >/dev/null 2>&1

This will update the modified date of the file .keep_hdd_running in the root dir of every mounted disk every minute. If the file doesn’t exist, it will be created.

Set BASE="/mnt/farm" to your root directory where all your hdds are mounted.

Don’t forget to do a chmod +x /root/keep_hdds_running.sh to make the script executable.

4 Likes

The solution provided by @juppin is quite neat.

Or if you prefer a GUI way, you can use Zeit.

Or if you are OK with a command line but want to adjust the crontab to your liking, you can use the web-based crontab generator here.

3 Likes

Checked everything,Raspberry pi 4 8gb ram can take up to 9 external HDD(16TB each).When you insert 10th one into USB hub port system hangs.Bought exactly the same USB hub you have and I also had Sabrent USB hub before so I have checked with both and limitation is same i.e. 9 external HDD(16tb each)

Also I am using a cooling fan of 5V for my raspberry pi

Looks like limitation is 12 if I put the fan on 3V port instead of 5V as mentioned here

1 Like

Have you tried the bigger USB hub?
There may be a better ratio of ‘consumed device per provided usb port’

Examples are
20 port USB 2.0 hub: ORICO Industrial 20 Ports USB2.0 Hub
30 port USB 2.0 hub: ORICO Industrial 30 Ports USB2.0 Hub (IH30P)

Not sure whether usb 2.0 and 3.0 controller consumes the same number of device

If you can connect more drives when using a 3V fan instead of a 5V fan, it seems you hit the system’s electrical power limitation, not the actual device slots available in the controller host.

However, I don’t understand why the electrical power would be the issue. Since you have the same hub as mine, it means you should connect to the powered external HDDs. Therefore the electrical power that the Pi can provide shouldn’t matter.

*whispers* powered usb hubs…

Ahaha, im just joking :joy:. I dont really know what the issue is here.

But it does seem like ur running into a power issue here judging by the fan mod. Which is weird because powered external USB drives should be providing their own 5v power.

I recommend powered desktop drives and powered USB hubs. There will still be a limit of how many drives you can have per physical USB host interface controller. I am not sure if you can use the GPIO pins on the Pi to add an additional USB host controller/USB interface or not, something to look into.

I am using this one: Amazon.com: SATA to USB 3.0 Adapter Cable with 12V Power Adapter, USB to SATA 22 pin Hard Drive Connector for 2.5" 3.5" SSD/HDD Drives : Electronics

But its failure rate has been quite high so far. Need more time to verify if it can sustain 24x7 operation.

1 Like

do you take your Dog to the horse races?
what happens when u get multiple challenges…
and one little pie to find proofs in a timely order… among hundreds of tb…

I wip a tesla

yal stuck in a Prius.

its chias biggest lie told… wining on a pie…
can I get a show of hands of a successful block won with a pie please?

why not try 100 machines… that only uses the power of one…

figure out that ridle and you to would wip a Tesla

efficiency is not about what uses the very least amount of power to accomplish a job

its how much can you accomplish with just one.

starting to feel like the only person who drives one. and its still 2001.

cmon

8gb ^ in the title… like that matters :rofl: :rofl: :rofl:

Farming on a Pi in a pool works just fine thanks, them payouts and rewards don’t care what I farm on. Works even better with flexpool’s flexfarmer too. :metal:

As far as I can tell @drjones you don’t even have a farm. You just like to talk. :blue_car: :laughing:

3 Likes

@drjones actually I also did not thought 8 GB would matter, but I was wrong.

I only have 3 USB hard drives and about 13 GB of plots and I had to change my installation/setup. I had ubuntu 20.4 LTS and used No Machine (https://www.nomachine.com/) to have access to the GUI. After 2 days of farming the system run out of memory, having “only” 4 GB of RAM…

To fix it now I use ubuntu server 20.4 LTS so no GUI (xorg), only the terminal is available. Then I use Machinaris (GitHub - guydavis/machinaris: An easy-to-use WebUI for Chia plotting and farming. Includes Chia, Plot) since it has a web interface to check my farm.

This new setup if enough to overcome the memory problem. However, if I had more memory I could run other chia forks to maximize my potential income…

Another possible workaround is to use the FlexFarmer (https://www.reddit.com/r/chia/comments/oxbh3g/announcing_flexpools_flexfarmer_open_beta_the/).

Anyway more memory will help, if you ever want to farm several chia forks in a Raspberry Pi or any other PC :slight_smile:

2 Likes

Please guys, dont feed the troll.

4 Likes

It’s not trollin if it’s just facts. I’m genuinely has anyone won a solo block with a pie?

I just got my daughter one for her bday to remote game. From dads servers.

Each with 128gb ram.

Top box is stacked full of externals.

Around 200tb total space playin with

Each server brought back from junkyard and rebuilt to perfection for thier year.
Each at least 11 years old.
Incredibly fuel efficient when not plotting that is.

Full virtulization enterprise servers
Literally Hundreds of containers and vms.

Don’t have to ask me twice to show off.
My Tesla

image
image
image

image