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?
Thanks in advance!