An RPI4 based file server

Since I can easily tolerate loss of new data (that is data created in the last 24 hours), RAID has never had high value for me. Using rsync on my QNAP servers, I get sufficient prevention of data loss from a failed drive, and 100% available data in the event of a failure, without rebuilding drives. Over the years I have lost 7 critical drives. Only one time I was in a position that it was necessary to have it recovered by a data recovery firm.
Performance, not backup. Mirroring, or Stripping+Mirroring (Raid 10) provides improved performance, which I find useful when dealing with physical spinning disks. Redundancy is secondary. Mirroring obviously only provides a performance boost on read, not write.

I use a raid configuration on my backup server to speed things up. rsync works OK, but I'm a fan of ocassionally using dd piped through gzip to capture a whole system image (the boot drive in particular). In this way I can restore a system quickly without having to spend a day doing software installs, especially on Windows machines (ugh).
 
Yeah. it takes me a whole week to prep a Windows 10 install these days. 100 apps, all needing to be *installed* - [plus] about 120 portable apps - which I prefer.
 
Software RAID is often firmware based, meaning some of the underlying parsing is done in the chipset on the motherboard. Not the CPU, but the I/O chipset, sometimes called the northbridge or various other names.
Technically, that is hardware RAID, sometimes called fake RAID.
I tend to prefer raid mirroring. The calculations for raid 5/6 can be pretty CPU intensive and slow down disk access.
No, I am afraid that is incorrect. On contemporary computers the CPU is so fast the burden for calculating RAID is insignificant even for software considerations, let alone I/O considerations. Mirroring is NEVER as fast as striping. A typical hard drive can write around 100 MB per second or so at peak. An SSD can manage about 5 or 6 times that. The ultimate limit is the speed of the drive interface, which may be on the order of 750 MBPS. RAID5 or even RAID6 arrays can possibly reach many times that if multiple drive controllers are employed. Remember, the seek time of and wtite time of a single drive is roughly the same amount of time as writing to several drives simultaneously.

I just copied a 1.4G file from a RAM drive to my 8 spindle RAID6 array in 1.486 seconds. That is about 1000 MBPS. Copying the same file from the RAID array to the RAM drive took 0.881 seconds. That's nearly 1600 MBPS. No single drive (or pair of mirrored drives) could come close, not even SSDs. The hard drives in my array are nothing special. They aren't even 7200 RPM.
 
Performance, not backup. Mirroring, or Stripping+Mirroring (Raid 10) provides improved performance, which I find useful when dealing with physical spinning disks. Redundancy is secondary. Mirroring obviously only provides a performance boost on read, not write.
It produces a performance hit on write, as opposed to the very large boost on writes for multiple striped drives. It only produces a boost on reads if the RAID implementation supports alternating spindle reads. While it does provide resiliency, it provides no increase in storage capacity at all. A RAID1 system is limited these days to about 22TB, and is quite expensive, comparatively speaking. A 22T, 2 drive RAID1 system will cost a little over $1000 for the drives alone. Replacing a single drive will cost about $500. Lose 2 drives and the system is gone. Compare that to a 5 spindle RAID 6 system with nearly 10% more capacity and 3 times the write performance, costing only about $650 - just a little over half. Losing one drive will only cost about $130, or two dead drives will run about $260, barely half of what a single 12T drive costs. Expanding the RAID1 system is problematical, at the very least, and quite expensive in general. Expanding the RAID6 is quite easy, and can cost as little as $130. RAID5+1 and RAID6+1 offer tremendous reliability and a very large performance boost at not much more cost than a RAID1 (mirrored) system of the same array size. RAID6 with triple parity is also possible, although I am not sure which implementations offer it.

The only time I use RAID1 is on very tiny, inexpensive, very fast (SSD) drives. I typically use them for booting. A failed SSD boot drive can be replaced in seconds and costs typically under $25. Although not as fast as a multi-spindle array, they are more than fast enough to handle booting the OS.
 
Last edited:
Technically, that is hardware RAID, sometimes called fake RAID.
Ironically, the term fakeraid was originally applied to software implemented RAID. The reality is that computers require both hardware and software, so differentiating between hardware raid and software raid requires a bit of work on definitions. This gets to be similar to looking into whether math operations are implemented in hardware, or software. I think the appropriate definitions applied here, relevant to the discussion of RAID accelerators failing, is that it does NOT require any hardware not already inherent to the computer. As I already said, that hardware is particular to PCs, so not applicable to the Raspberry PI. Sure, benchmarking multi-disk RAID 5/6 will write faster than a mirror, as long as you implement RAID 5/6 across at least 3 disks (which is a required minimum).

The rest of your comments ... I'm not disagreeing. But I think you missed my points and decided to get confrontational. I'm going to avoid that in favor of spending time in my shop having fun.
 
Last edited:
Update. Currently using the hardware platform as a git server to act as the ELS repository for my project. Seems to be fine for this use. RPI4 booting from a USB3/SATA adapter to 128GB SSD, no SD card.

Had issues getting the thing going, because I had disconnected the RAID array completely. The OS consulted fstab and failed to find the array, which made the OS fail the boot up procedure. I commented the line in the fstab file about the RAID array, and the system came right up. I have the RPI4 connected to ethernet, so the remote nodes can push and pull to their heart's content. This is working very well. I'm lucky that I bought the RPI4's when I did, since they have been unobtainium for quite a while now. Even RPI2's are ridiculously priced.

Sometime, when the price of SSD's take another dive (rumored to be 2023) I will get a pair of vanilla SATA SSD's in a decent size. Then I will give RAID another go...
 
This weekend I got an email that some Pi compute module 4's were available (at normal price), but I didn't see it until it was four hours old. I was expecting them to be gone but they were still available. They did sell out, but in any case the compute modules are more available than the regular Pi boards. There are various carriers available for the CM4's that optimize the I/O connections for specific purposes. It does raise the cost a bit over a stock Pi4 (not nearly as much as the scalpers), but for example some of the carrier boards have SATA connections directly onboard that are better for servers. The CM4's come in many flavors with regard to wifi, ram memory, EMMC so you can choose more precisely what your project needs, and you can avoid being dependent on the slow microSD if you want to.

For disk servers there are boards other than Pi4's that are well suited to the task, so Pi's aren't the only game in town. For many hardware I/O related projects the Pi's have better software support but for server purposes the Pi doesn't have much advantage over many other boards running Linux. For example the Mini PCs start at about double the cost of a fully equipped but offer about five times the performance.

I heard that the Pi backlog may get significantly better in the first half of 2023. They are producing 400,000 boards per month, but they are mostly going to OEMs, hobbyists are not a priority, unfortunately.

Adafruit has a batch of Pi's most every wednesday morning, get signed up with them for two factor authentication (required for Pi orders) and get on their notifications for the boards you are interested in. Log in tuesday night so you are ready and see what comes the next morning. They only allow one Pi per lifetime right now, or at least one in recent months, so be ready to move quickly but only order the one you really want. They generally only have one type available, and it is all sold out in a half hour or so on the Wednesday morning.

It is not a replacement for everything a Pi does, but the Pico's are adequate for many of the smaller projects. I've been using them for a variety of clock projects with internet time and with GPS time. They cost $4 without network, and $6 with wifi and are much easier to come by than Pi4's. They program with Arduino, Platform I/O or MicroPython. Since Pi's are hard to get, I've been doing more Pico projects lately. Pretty amazing to get a 133 mhz dual core microcontroller with wifi for $6. My Pi Zero W ($10 module) clocks take about 60 seconds to boot and get time, whereas the Pico W boots and gets time from the internet in about 3 seconds. They aren't equivalent for all projects but for many smaller projects the Pico's are excellent and when they are in stock you can buy several at a time so the shipping gets spread out. :)

Alan B
 
Last edited:
RPI4's are not awesome but they are pretty good at their (former) price point. You could say that for all of the RPI's. They have been somewhat slow, but they are perfectly good for lots of home automation tasks. 'Tis a pity that the brand is taking such a hit, due to shortages. The RPIs have operating systems which made it easy to do things that are harder on bare metal. I've gotten a lot of mileage out of mine. 24 zone sprinkler controller (RPI2), print server (RPI2), Pi-Hole Ad blocker (RPI3B+), git server (RPI4), remote Teensy development platforms (RPI4).

I have two RPI's left, an RPI2 and an RPI3. Need to find something they can do in the house.

Have a Pico, and a Pico W, but haven't found a project for them. Too busy right now with my ELS.
 
I can provide some clock code for a Pico W, all you need to add is a display. Four wires to an Adafruit LED and Yahtzee. :)
 
RPI4's are not awesome but they are pretty good at their (former) price point. You could say that for all of the RPI's. They have been somewhat slow, but they are perfectly good for lots of home automation tasks. 'Tis a pity that the brand is taking such a hit, due to shortages. The RPIs have operating systems which made it easy to do things that are harder on bare metal. I've gotten a lot of mileage out of mine. 24 zone sprinkler controller (RPI2), print server (RPI2), Pi-Hole Ad blocker (RPI3B+), git server (RPI4), remote Teensy development platforms (RPI4).

I have two RPI's left, an RPI2 and an RPI3. Need to find something they can do in the house.

Have a Pico, and a Pico W, but haven't found a project for them. Too busy right now with my ELS.

Some are more awesome than others. The Pi Zero 2 W is $15 and has a quadcore CPU at a gigzhertz with half a megabyte of RAM and the usual camera and HDMI and I/O, it's pretty amazing for the price and footprint. It would be a killer solution for a lot of projects, if we could just get them. :)

At the high end they really need to get on with the Pi 5 (the Pi 4 is getting rather old), but the chip shortage derailed their ability to produce a new board in sufficient quantity. Unlike other brands, Pi's cannot be produced in small numbers, it's either large runs or don't bother.
 
Back
Top