Hi, I installed NCP on a Raspberry Pi 4 with 2 x HDD (WD 2TB USB 3.0) and ran into a couple of problems. My goal is to have one HDD for the NC data and the other for backup (or both as raid 1).
First, I connected both HDD directly to the RPi and installed NCP which worked well. However, I soon realized that both the https and ssh connection started disconnecting and the HDD made strange sounds. My guess was that the power provided by the RPi was not enough to supply the HDDs.
So I connected them to an active USB Hub with separate power supply. This worked much better.
I formatted the HDDs with btrfs (the first via NCP, the other manually) and used ncp btrfs auto snapshots. This also worked well.
[Actually, before using the auto snapshots I tried to add the second HDD as second RAID1 device to the first one, but as I don’t have much experience with btrfs yet I crashed the whole filesystem and started over again …]
Then I tried to use the btrfs auto sync feature to copy the snapshots to the second HDD. But nothing happened. [Should I report a bug about this?]
Therefore I tried rsync instead. And, again, the HDDs started making the strange sounds and during the initial rsync a lot of I/O error messages started to appear. And in the end, the filesystem of my main data HDD was corrupted again.
I now can mount the data HDD with -o recovery,ro, but the ncdata dir still shows an I/O error when I try to open it. However, the snapshots seems to be alright.
So … I think I need some suggestions before I go on running into issues.
Does someone have experiences with a similar setup?
How can I figure out if the power supply is really causing the issues I faced?
Does the raspberry or HDD provides information about low power (in the logs)?
I guess somewhere there are the technical specy how much power the RPi can provide via USB …?
As btrfs is the default FS suggested by NCP, I expect that it is kind of robust. And AFAI understood, btrfs should be quite robust against failures due to journaling and file chacksums etc.
So, I’m a bit surprised that the FS crashed in a way I cannot mount it normally, and with I/O errors in recovery mode (The error msg in the log is “BTRFS error (device sdb1): parent transid verify failed on 54788096 wanted 658 found 130”).
Any idea how to recover?
Or, would you recommend to use btrfs for this setup?
Should I generally take a different approach?
Any suggestion what I could try to make the really robust?
If your HDD’s are fine and your USB hub it doesn’t have enough power this or equivalent solves the problem.
Is better to test the disks in a laptop or desktop and if they work properly you have a low power USB Hub.
Also, you can see the low power symbol with a monitor attached.
The power led (red) on the pi sometimes goes out. Need to be always on.
You need to be sure the Pi power supply the correct one. This can also cause problems. I’m using the official power supply for Raspberrypi 4.
Good to hear that this setup works for you. I’ll give this USB hub a try. Both HDDs work fine when attached to my notebook. I tried to copy several GBs of data from one to the other without problems.
Currently, my Pi gets its power via an attached HifiBerry AMP; maybe not an ideal solution.
I guess I’ll change this as well.
Also good to hear that you have good experiences with a btrfs raid1. In fact, I think I followed this guide, but it might be that the power issues caused the crashing of the fs.
So, you never experienced issues that the FS was broken due to HW problems?
Yeah, sufficient power supply is mandatory, i use self powered 3,5" hdds, there it is no issue, also these ironwulf drives are built for 24/7 usage which most of the 2,5" drives are not…
The fans are a little noisy. Depends on the environment in which it will be installed or your preference.
Idle temperature: 30ÂşC to 35ÂşC
On a raspberrypi 4 Pi-hole I use this:
Passive cooling
Idle temperature: 40ÂşC to 45ÂşC
Cannot see the green and red led’s
I did not tested with heavy loads
I always prefer aluminum cases where the case is also the heat sink
There are many boxes and some better ones
If I bought a box today for Nextcloud I would opt for a passive one (the noise is low but you hear)
Exactly, the pi is not delivering enough power for two hdd’s you could however also use a powered usb hub to connect two 2.5" drives without their own power supply
Btw i use an aluminium case with a fan which should be connected to 12v but it was way too noisy for me so i connected it to 5v and it was still colling to arroud 35 to 38 degree during use…
I now have the Pi 4 running with the two HDD attached to the TP-Link USB hub that @vascocb mentioned and this seems to work fine for now. At least it worked to copy several 100GB from one HDD to the other.
As case I choose the Argon NEO case with just passive cooling and the CPU is at about 48°C when idle and up to 60°C when under load - and although it’s currently about 36°C room temperature …
Hello,
by first glance you seem to have a system running like that I want to set up. Different physical devices for system/program (USB-stick) and a RAID System for Cloud Data. How did you manage that. All my attempts lead to a system having both boot and cloud data on the same physical device.
my experiences with BTRFS on USB-powered, permanently-connected external 2,5"-HDDs have been so bad that i do not use this config anymore. in many cases the disks (cheap-ass, consumer-grade) were connected all the time to boxes with sufficient PSUs (2x 750 or 1000W RPSUs), only mounted for backups and regularly scrubbed and balanced. after some time (a couple of months) the filesystem became extremely slow, “full” for no apparent reason, subvols could not be deleted anymore and balance and scrub failed. a couple of times i salvaged the data, checked the disks with smartmontools and testdisk (no errors) and re-created the fs. then the cycle restarted. it happened so much that i do not use this config anymore.
you might want to pay attention to it. GOOD LUCK!