Hi! It's Szmalu here.
I've got something extra for you.
I'm going to build a NAS server on Raspberry Pi 4 with 4GB RAM.
Let's continue with these "4" and I'm going to equip it with 4TB memory on two SSD disks
and the whole thing will only be powered by PoE HAT.
You're probably wondering if such a set has the right to work at all?
Check it out!
[intro]
Let me start off by saying that I've never recommended
Raspberry Pi for building the NAS server or even media center.
The reason was prosaic and a bit obvious to anyone who uses this type of solution,
so an unacceptable USB ports speed or network interface.
For the record, the previous versions were equipped with USB 2.0 ports,
which resulted in the actual transfer speed not more than 40 MB/s
and in fact, if we look at this realistically, not more than 30 MB/s,
then the slow network interface, because I remind you that up to Rapberry Pi 3B+,
Raspberry was equipped with the network interface of 100 MB speed,
so realistically we were able to submit data at 10MB/s.
As of today, most of the people watching my channel have internet at this speed or even more.
Unfortunately, I don't have.
And returning to Raspberry Pi 3B+,
we've got here a threefold increase in the LAN speed,
so we have the same speed of the USB 2.0 interface, which I mentioned before.
It means that, no matter what we do, the Raspberry's network transfer wont be more than about 30 MB/s.
It all changed with the arrival of Raspberry Pi 4, because we've got Gigabit Ethernet as well as the USB 3.0 interface,
so at least in theory we'll be able to achieve transfers at the level of budget NAS servers.
Speaking about the budget servers, I mean those without LAGs or 10 GB Ethernet,
not the Qnap that I have in the cellar, that you've seen in one of the episodes.
All right, that's all when it comes to the introduction and technical informations.
We're getting down to work.
First, a little bit about the system.
For this purpose, I have chosen OpenMediaVault because it's open-source, developed for a long time and
if we want to do something based on Raspberry Pi, there's no competition there.
We can't run a FreeNAS on Rasberry at all, and OMV has a ready image
that work probably on Raspberry Pi 4.
Probably because it's a port built on Debian Stretch instead of Buster, as I well remember.
So we'll see what comes out of it.
We download the version with number 4.
Once the download is over we run balenaEtcher and we flash the memory card.
You know what? No.
From a certain, date a OpenMediaVault 5 beta version is available
and we gonna use it as a base for our NAS server on Raspberry Pi 4.
Besides, we won't have to use the port of the official version of OMV4 for Raspberry,
so the base is Debian Stretch and we run everything on Raspbian Buster.
It's not that easy as it was in the case of OpenMediaVoult 4,
because we don't have a ready image which you just need to burn on SD card.
We need to take some steps on our own.
That's why I made a separate tutorial in which I show exactly what needs to be done
to install OpenMediaVoult 5 on Raspberry Pi 4.
Of course with the Raspbian Buster system and the movie is available in the link on the right side.
I'll put the link also in the description underneath the movie, so Anyone who wants to install
OpenMediaVoult 5 on Raspberry Pi 4 can click on the link and they will know everything what's what.
The software part is behind us.
Let's start now with the device which is needed to run the whole thing.
First of all, Raspberry Pi 4.
As you can see, I designed such a frame where in the next steps it'll be possible to put disks 
and everything will look pretty neat.
At least to me.
If you have a 3D printer, you know what you have to do.
If you don't have a 3D printer and you don't know anyone who has it as well,
watch the episode about the stand for DIN rail because I tell you where to look for a help in such case.
The next thing are of course SATA USB adapters, as well known as bridges.
I bought the cheapest ones, so with the JMicron JM578.
But I'll tell you now that there won't be any tremendous resultats because
because on this bridge we will not do more than a 200 MB/s.
But it's not that important because the speed of the LAN interface effectively restrict our transfer to 1 GB/s,
so theoretically we have a big reserve because we expect network transfers about 100 MB/s.
Of course, we can choose a better model of the SATA USB bridge.
In this case, it's a Orico VL716 transparent case bridge.
It's better because it has natively built-in the service of USB 3.1 gen 2,
so theoretically we can achieve on it transfers about 10GB/s.
What's more, both of these bridges should work on our system or at least, as they say, it works for me.
The next thing that we plug into Rasberry Pi 4 are 4TB SSD disks.
And I think that we are aiming to break the record.
And the SD card which I flashed before.
Here is a sad thing because we still have not a bootloader set up properly
which allows to start the USB without using the SD card. 
It means that we can't run Raspberry Pi 4 using only SSD disks.
In general, since my video about the problems with Raspberry Pi 4 not much has changed.
But I keep my fingers crossed for all those who do something in this area
and I hope that in the near future the majority of problems will be solved.
The screws to screw in disks.
4 or 5 mm M3 screws are perfect for it.
And of course the screws to screw in the whole construction of Raspberry Pi 4,
and if we'll be using PoE-HAT I'd recommend M2,5 because we're gonna screw them in to
the distances that we have in the kit and the dimensions should be about 8-10 mm.
PoE-HAT itself we can screw in by using screws included in the kit.
But as I have already these kind of screws, I'm gonna use them to screw everything with one key later.
That's how it looks but it's good to invest in these nylon pads,
so you can protect PCB from possible damage.
The next thing that is worth adding is a heatsink.
The one I'm using is 25x25x5 mm and I think these are the maximum dimensions that will fit under PoE.
The heatsink needs to be glued so a TermoGlue is necessary.
And now we have everything.
Let's take a look. Everything fits better than I thought.
We can slide disks as smooth as in professional constructions.
On the sides there are places for screws.
Here you can see a construction for two disks but in the nearest future I'll share to you a project for one disk
so keep an eye on things that I upload on Thingverse.
The disks are already in place and to a full happiness it needs only the power overlay for PoE.
But before that, the heatsink fixing.
First, we clean the surface.
To do this I'm using Isopropyl Alcohol and we add the glue.
It took me a bit of time to set the heatsink in position not to collide with the screws of the PoE overlay.
But it finally worked out, and it looks like this
[music]
Now just tighten everything up, the SD card and we can start.
We run it and we can see the IP address which was assigned to our Raspberry,
and we type it into the browser.
Alternatively we can use the host name, so Raspberry Pi if nobody changed anything.
It seems like a success. Let's see if the the drives have been detected correctly.
Can you see? It's only one. I'll plug it one more time and we have two drives now.
Let's see if after the reboot it will be the same.
And we have a problem, there's only one drive and we need to repeat the procedure once again.
And I'll tell you that I spent way too much with this problem.
The situation was the same on the official previous OpenMediaVoult 4 version from a Debian Stretch's image.
All right, how does the thing with the drives look like?
My first thought was, insufficient power but a few things came up that confused me very much.
First of all, and it was a crowning argument for me
when OpenMediaVoult didn't detect the drive,
logging onto Raspberry Pi through the terminal both drives were visible.
What's more, when we were doing the hocus-pocus stuff, so to first plug in one drive and the the second one,
he whole thing worked normally and steadily even under load.
Moreover, I connected such a drive to Multimeter to measure how it does look like.
I used the module that our collegue Jarek from Inteligentna Grupa is selling.
For sure, many of you has already met with products from his EasySwitch company.
I've checked the maximum current that the drive will use at the launch.
As you can see the Multimeter shows a little bit more than 0.5A.
During the normal working it's about 200mA.
As the specification shows, the Raspberry should downstream to USB port 1.2A.
Because of this and the fact that there wasn't any difference when I powered raspberry through PoE shield or 
USB C port I was sure that it's a software problem.
But nothing was helping and I tried almost everything including
change of the firmware or bootloader
and each time the result was exactly the same.
In OpenMediaVoult it was only one of the drives visible.
I decided to take maybe not so reasonable step, but I took off the case of the bridge and I plug it to another power source.
It turned out to solve the problem definitively. 
And here's a mystery.
My Multimeter is probably is not enough sensitive to record
the intensity of such a short spike in intensity during the start of SSD drive.
If we have two such drives starting at the same time they must have exceeded the possibilities of Raspberry Pi 4.
However, this does not change the fact that tricked me the most.
That is, every time you list devices connected to Raspberry's USB ports,
both USB drives were visible there.
This is a valuable lesson to me and a clue to you,
so that if any of you would have this problem in the future won't be driven into a corner.
Me instead, when I knew what the cause was, I focused on the rest,
so I plug the SATA bridge power supply directly under the 5V line in Raspberry Pi 4.
And it worked really well.
Of course there's a lot nicer way to do this than to solder the wire, 
but I'm doing here some kind of proof of concept and the whole thing works and looks impressive.
Well, how else can you call a NAS server that can be connected to any place on our network
by using a Ethernet wire. And for that it's small, shock resistant, reaches the declared data transmission values
and in my opinion making such a server from Raspberry Pi 4 is not such a bad idea.
And do you know what else is not a bad idea?
The subscription of Inteligentny Kanał.
So if you don't do it yet , click on the Subscribe button
and the bell not to miss any new updates on my channel.
More episodes about OpenMediaVoult and extensions to it surely will be made.
In the description underneath the video you'll find the link to Thingiverse
where you can find STL files to download
so everyone can print such a construction.
I'll upload also the STEP files if anyone wants to edit them to own purposes.
That's all for today. You can find me on Facebook and i invite you all to Inteligentna Grupa on Facebook.
Good bye and the link to a next episode you'll find as always on the left side.
