Building a Raspberry-Pi Storage Server with OpenMediaVault

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello again everyone you know I have some stuff in front of me here I have a brown box another brown box and an old SSD so what the heck am i up to well if you've seen the title of the video then you already know in today's video I'm going to show you guys how to set up your very own Raspberry Pi based Mass this is part of a home lab experiment that I'm currently running to see how much of my server stack I can actually do on the Raspberry Pi platform which of course is a lot more efficient when it comes to energy usage so what I'm going to do is I'm going to unbox this box in this box right here I'll show you what's in these boxes and then we'll go ahead and get started in building a Raspberry Pi Mass [Music] okay well in front of me is all of my stuff so I'll show you what I'm working with now first of all I have the Raspberry Pi 4 this is the 4 gigabyte model right here you don't need the 4 gigabyte model but I mean if you're gonna buy a pie you might as well buy the best right so you're gonna need this obviously then I also have an SD card right here this is a hundred and twenty eight gigabytes right here which is you know overkill but I think it'll be fine I only buy large SD cards anyway so I think we'll be ok with this one so go ahead put that aside now I have this old hard drive it's a PNY SSD and it's only about 240 Giga bytes I believe so really not anything that amazing this is all I had lying around so maybe you'll have a bigger or better harddrive than I have but I think this will be good enough for this experiment in this box right here from geek worm I have the X 8 to 8 this board is actually what's going to allow us to plug in our SSD to the PI or hard drive whatever you have and obviously you could put a hard drive in an external enclosure and just use USB 3 and then you wouldn't even need this but I thought that this would be probably a lot cooler and allows us to basically mount everything in place now you can actually stack more than one hard drive I only have one of these modules but one important thing to mention is when you buy this it doesn't come with this and this is the actual power cord right here I saw some negative comments on Amazon and people are angry that they didn't get a power cord with the board but I don't think it advertises that you do so just keep in mind if you want to buy this board you're going to need a power cord as well and it is specific to this so I'll put this aside and let's go ahead and get this stuff on box now this isn't going to be particularly exciting or anything but we may as well show it off so we'll go ahead and open this and of course we have some instructions right here but you know I'm going to show you the entire process in this video so I'll go ahead and put this aside and we have the actual board itself open this up so this is the actual board this is what's going to allow us to attach our hard drive and this is going to allow us to mount everything together in one unit so I'll go ahead and flip it over so obviously right here is where you actually insert the hard drive so that's pretty cool now also in the Box you have some standoffs and some screws which are going to allow us to mount everything in place we have this USB adapter right here and then we also have this cable and I'll show you what all of this is in just a moment but you know basically this is the board for the hard drive then here we have the actual power cord so I don't really think this is anything too exciting I mean if you've seen one power cord you've seen them all it has a barrel connector and then has some attachments here depending on what country you are in you might need to use one of these and you know I'm going to use this one because I'm in the United States but we also have this one right here so we have some options so power cord put this aside and basically what's going to happen is the power cord will plug into this board right here that's how you're gonna get some power to your apparatus and you are not going to use the Raspberry Pi power cord in addition to this this here should be the only one that you actually use you could cause a problem if you try to have two power cords attached because this power cord should power not only the board but also the Raspberry Pi itself this should be the only one that you need so let's go ahead and get started on building it okay so I have my screwdriver then I have a bunch of screws right here and we should have everything we need to get this thing built on the underside of the board we have icons which resemble screws I'll try to focus the camera on this right here and these four are where we're actually going to start so we'll grab one of these flat screws right here and push it through the hole and hold it in place then we'll get one of these standoffs female on both sides and then we'll just using our fingers just go ahead and tighten that on there we could just make it hand tight for now and then we just repeat for each one of those same labelled screw holes here and so far our device should look like this we should have four standoffs screw it out to the board so next we're going to attach the hard drive so here on the underside of the board we have the SATA connector right there so pretty simple we're just going to slide this in place and here it is it's nice and snug on the board now we need to screw in these two screws right here where my thumb's are we have two so I'll go ahead and set the screws in place and we'll need to use a screwdriver for this because these screws are kind of a pain kind of annoying so basically what you'll do is you'll screw them in just give them a little bit more started here now what you have to do is actually be somewhat firm you don't want to squeeze too tight but you want to squeeze the hard drive to the board otherwise this isn't gonna go in so I'll go ahead and just pinch it with my fingers and then just go ahead and screw this down into the hard drive you can see the hard drive really wants to lift you have to make sure that it's in place and then go ahead and miss make sure you get a nice and firm attachment here and we can see that the hard drive is now well it's secure now again it I did have to put a little bit of force I didn't want to put too much on here to get these two screw into the drive this is an old hard drive so it's possible that there could have been something wrong with it but the instructions do say you have to press firmly as you screw these down but anyway the hard drive is attached to the board it's not going anywhere it's not going to run away on us it's permanently attached to this board well not permanently but it's definitely secure okay so next I'm going to attach the Raspberry Pi here to the top and hold it in place and I have one of these really short standoffs right here I'm going to basically just screw that right here to hold that in place it'll make sense why we need that stand off in just a moment and then we go ahead and screw in the board by just attaching the Related screws here so next I'm going to attach this cable right here this fits down right here just go ahead and take a look at it make sure that everything is lined up and it appears to be attach another screw you and then we attach this to the board and there you go so far so good so next we have this USB cable right here so and rip it open because I'm way too impatient and here's the cable next we basically just attached the USB cable pretty self-explanatory and I attached it to this USB port here only because if you try to put it under here just puts a lot of pressure between the boards and I don't think that's actually going to be healthy so I think it's actually better to have it over here but maybe it doesn't matter now as an option you know we have all these extra standoffs here well what do we do with these well actually what you can do is just use these screws right here and then just attach them to the board because if you want to attach multiple hard drives these standoffs will basically allow you to do that so I'm going to go ahead and attach them and there we go now you might want to basically omit these standoffs right here on the bottom if you don't plan on stacking these hard drives but I probably will so I'll just go ahead and leave that on there but that is optional you do want to probably keep them aside in case you do actually decide to stack additional drives one day but keep in mind you're going to need another power cord for each one of these boards it's recommended so you don't have an under voltage situation but anyway this is actually all set and ready to go at least from a hardware perspective and then basically all I'm going to do is just you know obviously plug it in attach this header right here and you know what we should be good to go but there's one thing that we're missing and you've probably guessed it I have this SD card but I don't actually have any operating system on this right now we do need to insert this into the pie and power it on but we're going to need to actually flash some sort of operating system onto this SD card and I'm going to show you how to do that right now so now that the hardware is all assembled the next step is to set up the SD card with the required software in my case I have to put my SD card in this extender I'll go ahead and slide it into the laptop and I'll show you the process so the first thing we're going to want to do is to open up a browser and we need to download the required image so I'll paste the URL in here it'll also be in the description down below then when you get to the downloads page you go ahead and scroll down and the version that I'm going to download is this one right here raspbian Buster Lite and the difference with this one is that it doesn't contain a graphical user environment it's just a lot smaller and there's less getting in the way now if you go with a different version of raspbian that's totally fine but this is the version that I'm going to download so I'll just download the zip file couldn't save it and then I'll let that finish in addition to that we should also download etcher so I'll go to etch IO then I'll click on the download button and now we should have everything that we need so basically I have to zip files one for sure and the other for raspbian so I'll unzip both of those you and then what I'll do is open up a chair right here I'll select the image and in the Downloads directory it's going to be at dot IMG file so it's this one right here open select the target disk and here's my SD card again it's 128 gigabytes definitely overkill but I'll click on it then click continue you definitely want to make sure that you do choose the right device because this will erase everything on it but I'll click flash and then continue to ignore this warning I sudo password we should be good to go you and it's all done so now what I'll do is just eat checked the SD card and then I'm going to put it right back into the computer again and you can see on the file manager in my case I have boot and route FS I'm going to click on boot so what I'm going to do is create an empty file this is optional but highly recommended but the known file manager has this really stupid problem where you you know you can right-click to create a new file but how are you going to right-click when you know basically there's no empty space here so I'll try to change the view type then I should be able to right-click I'll do new document and then empty file and then I'm going to call it simply SSH and what that will do is actually trigger the SSH daemon to be enabled at first login which is very useful for us to go ahead and configure this in case we do intend on using SSH so in addition to that if you do plan on using Wi-Fi for your Nath's then there's another file that you can create here that's going to automate the setup of your Wi-Fi network so I'll show you how to do that right now in case you need to so you'll just right-click again do a new document we'll create an empty file and I'm going to name it WPA supplicant conf then we can go ahead and open it up and I'll paste the contents in here but you could check the wiki article for this video so you can copy and paste it essentially what we're doing is we're adding Wi-Fi config right here but what you're going to need to do is change this right here to be whatever the name of your Wi-Fi network happens to be then this section right here will be for your Wi-Fi password and then you save the file and then close out in my case I'm going to remove this because I don't plan on using Wi-Fi I'm going to connect an actual Ethernet cable but there's one more thing that we probably should do if we click on root FS and then go to Etsy we should be able to right click and then open in terminal we're going to need root privileges for this which is why I did open a terminal and we're going to do sudo nano hostname enter password the default name is raspberry pi so I'm going to call mine PI - NASA just like that then I'll save the file and then next we're going to edit one more file and the file is again in the Etsy directory and the SD card under hosts and then on the last line here we can go ahead and just change the name to match control o to save and then control X to exit out close the terminal window then we can unmount the SD card partitions and then you'll eject the SD card put it into your PI power it on and we should be good to go just keep in mind that because we are using an expansion board for the hard drive the power cord for that board is the only one will plug in we will not plug in any power cord to the PI itself okay so off-camera I inserted the SD card into the PI I plugged in an Ethernet cable and then I connected the power cable and turned it on in fact there it is right there so what I'm going to do right now is show you how to install open media vault so I think enough time has passed to give the PI and opportunity to startup so I will open up a terminal go ahead make this full screen and I should be able to get to it via SSH so I should be able to SSH PI at PI - Nast that's the hostname that I did give it and that's why I decided to give it a name before I started it up because I wanted it to be available on my network under that name and I should be able to connect to it by name because my router actually configures DNS with newly attached devices so let's see if it works then the default password is raspberry and enter and there we go I have successfully connected to this device via SSH but I hate these terminal colors so I'm going to go ahead and correct that real quick you let's see if that's a little bit easier to see so if you had any trouble connecting to your PI TAS via the host name then another thing you can do is log into your router check out the DHCP client list and you might find it there it should show an IP address and then you should be able to SSH into the machine via its IP address you just replace the hostname in my example with the IP address if everything goes well you basically should have an SSH session open to that device like I have right here next what you'll need to do is run a very specific command to install open media vault I'll paste the command in this window right here and then you can go ahead and pause the video if you need time to copy that down or you could copy it from the wiki article that I will have linked in the description below this video and that's the command right there so I'll press ENTER and I'll let it run you all right so the Raspberry Pi has been set up with open media vault so now it's time to reboot the unit and see if it was successful so here I am on a web browser I'm going to go ahead and type in the host name of the nest let's see what happens well this certainly looks promising so I'll login with admin and open media vault for the password and would you look at that we actually have the open media vault interface on our screen right now so so far everything has been successful the next thing that we're gonna need to do is set up the hard drive because well without a hard drive what good is a Nass so I'll go here to disks and you can see right here we have slash dev slash SDA in my case that is my SSD the one that I attached to the board PNY is the vendor so everything does check out so I'm going to go ahead and wipe that drive I'll choose quick let's close that so at this point if you go to file systems and then create now that I've wiped the drive they'll show up as an option here then ext4 is fine I'll click OK and I'll confirm and despite all these really strange characters it appears to have been successful so I'll click close so next I'll click on mount and then I'll go to shared folders click add my shared folder not feeling very creative today and then for the device I'll select the drive that I just wiped I'll accept the default path and then I'll click Save and then I'll go to SMB right here I'm going to go ahead and enable this this is useful if you want to share files between Windows and Linux machines I'll click Save I'll go to shares I'll click Add then I'll choose the shared folder I'll go ahead and make it public and then I'll save and to make sure that we can definitely get back to the NAS we need to go to network and then interfaces click Add in my case I'll add Ethernet because that's what I have select the device we only have one and then for ipv4 we'll go ahead and choose static and this is how we can add a static IP address so that it'll never change I'll give you some example values but you do want to make sure that this matches your network environment so again I'm just making up some very random things here but the numbers might look very similar to yours depending on how you have you are set up again this is to make sure that the IP address of your pine ass doesn't change now in my case I have dhcp reservations on my router so i don't actually need to configure this so i'm going to cancel in your case that might be something that you'll need to do okay so with all that done i'm going to click apply up here to basically make the changes take effect and then yes and then I'll give it some time to complete so next I'll open a file manager window I'll go to other locations and right here we see pine s that's the unit that we set up so I'll go into that and there's the shared folder so I'll double-click I'll connect anonymous and there you go I was successfully able to connect to the shared folder on the NASS so everything looks like it's set up properly so there you go it looks like our project was all set we were able to create our very own Raspberry Pi based nest server how awesome is that so let me know what you think in the comments below I love doing projects like these so if there's anything else you would like me to add or work on let me know in the comments and then you never know maybe I'll do a video on that but anyway thank you so much for watching go ahead and subscribe if you haven't already done so and I will see you in the next video you
Info
Channel: LearnLinuxTV
Views: 87,383
Rating: undefined out of 5
Keywords: LearnLinux, Linux, Tutorial, Review, Howto, Guide, Distribution, Distro, Learn Linux, os, open-source, open source, nas, storage, pi, pi 4, openmediavault, file server, low energy, raspberry pi 4, media server, openmediavault raspberry pi, openmediavault raspberry pi 4, raspberry pi nas media server, cloud server, raspberry pi network storage, raspberry pi 4 nas, network attatched storage, openmediavault setup, raspberry pi nas openmediavault, open media vault raspberry pi 4, sata, usb 3
Id: U2w5PgJ4uhE
Channel Id: undefined
Length: 24min 33sec (1473 seconds)
Published: Wed Mar 18 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.