Building A Budget NAS with TrueNAS Scale

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
if you're anything like me you probably have a lot of files such as video clips audio recordings and large creative projects that you would like to store securely you might even want to be able to access these files from multiple computers or servers on your network in this video we're going to convert this nearly 10 year old desktop into an impressive but affordable nas by making a few upgrades and then installing trunas stick around to see how [Music] if you've watched some of my other videos you've probably seen this hp pavilion 500-c60 as i feature this thing a ton on my channel it has a quad core amd a6 5200 apu which is clocked at 2 gigahertz and includes 8 gigabytes of ddr3 memory it's important to note that this motherboard doesn't support gigabit ethernet and instead only supports 100 megabit per second ethernet but we'll come back to that later because this board technically uses a mobile apu it barely sips any power from the wall using this external power supply and the minimal power draw is exactly why i chose the machine for building a 24 7 nas i picked this specific pc up for around 30 after having to buy a replacement power supply but these often go for under 100 on ebay there are plenty of other options for a build like this though and i'm really just making this video to demonstrate what you can do with an older desktop that you might have lying around the house or that you can find for a good deal used just know that your mileage may vary if you follow along with what i'm doing my goal with this machine is to actually match the performance of a synology nas that i use in my house it's the synology ds215 plus which is an older two-bay model that i bought refurbished it as well as some of the other models around this time period often go for well over 100 on the used market still to make our system comparable we're going to add these two four terabyte seagate nas drives now you might be thinking wait i thought this is going to be a budget system and that's fair because these two drives probably cost more than twice as much as what i spent on everything else in the system but the reason that i chose these is because these are actually two identical drives to what i'm running in the synology and so i wanted to have a pretty fair comparison you can use any size drives you want but you'll want to make sure they are the exact same capacity and it's even better if they're the same model in this hp pavilion there's only one space in the case to put a three and a half inch drive so i'm taking out the optical drive and using this five and a quarter to three and a half inch adapter to mount our second hard drive in the system i'm going to use this adata su-800 ssd as the boot drive to install trunas to but if you remember from any previous videos this motherboard only has two sata ports so this is where things start to get a bit janky i'm going to use this usb 3 to sata adapter to connect our ssd to one of the usb 3.0 ports on the back of the motherboard by feeding it through a slot on the back of the case truenas clearly doesn't recommend this but oh well if your board has three or more sata ports just use those another small issue is that because of our five and a quarter inch bay adapter our front panel cover just slightly doesn't fit anymore so we'll just have to leave that off for now and then remember that 100 megabit per second nick i mentioned earlier well that's going to be an issue because all of our transfers will be limited to a 10th of what they could be on a gigabit connection to combat this we're going to attempt to use a usb 3 to gigabit adapter on the other usb 3.0 port i considered adding eight more gigabytes of ram but i decided to try to keep costs down and adding more ram should be pretty simple to upgrade later on if we decide to do it now it's time to go ahead and install truenas and this is where i ran into some more issues when i tried testing this setup i was planning on using truenas core which is based on bsd not linux and i think it's because of this that i could never get my usb to ethernet adapter to work i never even got a flashing light on the port or anything because i had luck with this exact same adapter when using ubuntu i decided to try out trunas scale which is a bit newer and is actually built on debian linux i at least got a blinking light on the adapter this time but still couldn't get it to work i was persistent though and after trying not one not two but three different adapters i finally found one that actually worked so for this project i am using trunas scale rather than truenas core but you might still be able to use core and follow along but no guarantees now before we actually start with installing truenas i want to give a massive disclaimer i am by no means an expert when it comes to linux network attached storage or trunas this is actually my first venture into trunas and while it's been a lot of fun so far i'm bound to make plenty of mistakes or do something that might not be common practice if you work in it or have a lot of experience with this type of project please leave some helpful criticism in the comments i'll try to pin any helpful comments so that they're pretty easy to find to get started we're going to search for trunas and head to their website so that we can find a download link for trunas scale here you can either sign in or create an account or just go down to the bottom and hit the no thank you button and that should take you to the download link while this is downloading we can go ahead and get rufus installed which is what we're going to use to create our usb installer to do that just google rufus click on their website and then scroll down to where you can see the most recent download link okay so we're in our downloads folder here and we can go ahead and open up a rufus 3.17 but actually before we do that we need to plug in our flash drive so i have a 16 gig flash drive that i'm going to use here so i'm just going to plug this into my system okay so once we have our flash drive plugged in under device right here you should be able to see your flash drive and then here where it says boot selection we're going to say disk or iso image and then when we hit select we can find let me go to my downloads folder here and select truenas scale [Music] and then all of the rest of this should default to the correct or what we want to go with for this so we'll go ahead and hit start we should get a warning here we can just go with this recommended option it'll give us another warning that we're going to delete everything off of this flash drive and we'll hit yes and then this will take a while for it to delete everything off the flash drive and then create our installable media but after a few minutes we can come back to it and get drew nas installed okay now that we're done we can hit close and eject the drive right there now we can go ahead and unplug that drive from our computer and plug it into our soon to be nas [Music] after booting it up you should see this small screen where you can just select start installation after a little bit of gibberish we'll eventually get to another page where we can go ahead and start installing i'm also going to apologize now for using a camera because my capture card didn't really work well with this installer once we arrive at this screen we can go ahead and hit enter on install upgrade then here we'll need to select the drive that we want to install it to and so we can find our 128 ssd hit space bar to select it and then hit enter now i actually already had an installation on this when i was testing so i'm being prompted here to do a fresh install otherwise it might just take you past the screen but i'm going to hit fresh install and then i'm going to go ahead and hit format the boot device there will be a warning here that it's going to delete everything but we can just hit yes and then here we're going to set a password for the root user so i'm just going to type in a password but you can probably make it a much stronger password than what i just used here after that we hit enter now it's going to ask us if we want to create a 16 gig swap partition on the drive and since we only have eight gigs of ram i'm going to go ahead and hit enter to create this [Music] after a few minutes installation should complete and we can go ahead and hit enter to reboot and then we'll go ahead and unplug our flash drive as well when we reboot our system we should see quite a few minutes of just gibberish fly across the screen but eventually we should land at this screen which will show us our current ip address that's been assigned from our dhcp server and this is actually the last thing we have to do on the actual display of our nas itself everything else will actually do from a web browser so let's hop back over to google chrome really quick and if we actually go ahead and navigate to the ip address that true nas gave us we should come to this login screen here where we can log in using root and the password we set earlier and if everything went well we should land on this dashboard here and so far it looks like everything's working exactly as it should now because our ip address was assigned using dhcp it's actually possible that this ip address could change there are two ways we can fix that one we could set up a static ip address on this machine or we can just go to our router settings and set up this ip as an allocated dhcp ip address we'll start with how to allocate an ip address using dhcp because our nas already has an ip address given to it from our dhcp server now to do this you'll have to navigate to your dhcp server which is most likely your router i don't know exactly where your router is going to be so you'll have to figure out that ip address but once you do you can navigate to it for me it's 192.168.1.1 and i'm going to skip past my login here for obvious security reasons now every router control panel is a little bit different but basically you just need to navigate to the section where it says dhcp and there should be a list of all the devices that it's given ip addresses to and so hopefully you can scroll down and find the ip address of our nas and then there should be some option to save or allocate that ip address for me it's just this little save icon to the right and then after i click that if i go over to address reservation we can see that our nas's ip address is allocated instead of doing it with dhcp though i actually want to set this up as a static ip address so i'm going to go over to this network tab and then we can click on our interface here to bring up some options now i'm going to deselect dhcp so that we're not automatically getting assigned an ip address and we'll assign a static ip address here so we'll go to ip addresses and add and then i'm going to use 192.168.1.31 and then we'll leave this 24 here but it's important to select an ip address that you know isn't in your dhcp range and also isn't being used by another device if you're not sure maybe just check the dhcp but we're going to go ahead and hit apply here and then we can hit test changes hit confirm and then another tab i'm going to go to 192.168.1.31 and we should land back at our noz here we can sign in as root and we'll hit save changes so now our ip address for our nas is one dash or 1962.168.1.31 and that's great okay so this is future colton here um just need to fix a mistake when setting up our static ip address i forgot we actually have to make sure we have a gateway as well as a dns server so we can click on our global configuration here and then under ipv4 default gateway we can type in 192.168.1.1 or whatever your router is and then for name server we'll just do 1.1.1.1 really quick which is cloudflare's dns server then we can scroll down and hit save and now our static ip address should be correctly set up okay so we're back at the dashboard on our new static ip address and the next thing we're going to do is create a user group so let's go to credentials and then local groups and then from here we'll say add groups and we're going to call this group home so that way if you wanted to add some people some home users that all have similar access and we'll keep this gid or group id at 1 000. and i'm not sure if we need this samba authentication checked i can't remember we're gonna go and check it now just because why not hit save once again i am not an expert this is taking forever okay so finally we have our home group created let's create a user so we'll go to local users then we'll click add and we'll put our name as just haven our username is haven we'll skip email and we'll use a really strong password just kidding please use a much stronger password than this but for the sake of this video i'm just going to leave it as is and then user id we'll keep it 1000 instead of this new primary group let's go ahead and select under primary group let's look for our home group that we just created so we'll scroll down is it at the very bottom yep at the very bottom we have our home group we'll select that and then once again we'll leave everything as is and go ahead and hit save all right now that we have our user in group set up let's go ahead and start creating some storage so let's go to this storage tab here and the first thing we need to do is create a pool and so we're going to hit create pool and we'll just call this main i'm sure there's better practices than that but we're just going to call it main because it's the only pool we're going to have on our nas because we don't have a lot of drives and so down here we see our available disks and we have our two four terabyte nas drives that we put in earlier so we can select both of these and then we'll move these into this data v dev this v dev is where all of our actual data is going to be stored and you can create other v devs but for the sake of this setup we're just going to have a data v dev with both of our drives in it we're also going to select mirror here which means these drives are going to be identical which means if one of them fails we actually can replace it and still not lose any of our data and we can see our estimated rock capacity is at 3.64 tebi bytes i think i'm pronouncing that right i'm not really familiar with my tebubytes but 3.64 tabi bytes which is what we want and so we can go ahead and hit create this will delete everything off those disks which is a ok hit create pool all right so now we have our pool created we need to create a data set now that we can actually set up our share on so we can access from the computers so we'll go here to add data set and we're going to call this haven samba and then all these settings can stay the same except for down here at the bottom where it says share type we're going to change that from generic to smb now i guess you could encrypt this drive if you wanted to and you could maybe can play around with different compression level settings but i'm not an expert i'm just leaving it as default and we'll hit save okay so now we have our main pool and then under that we have our haven samba data set so now we're going to set up a share so we can go over here to shares and we're going to set up a samba share smb share because that's going to be the easiest thing and it's going to work a lot easier with windows computers so we can just hit add and then for path we're going to select our data set we selected earlier this haven samba we'll just keep it called haven samba and then everything else we could add a description if we wanted to but i'm just going to leave it blank we can leave default share parameters and then we're going to hit save okay now we have it created and we can hit enable service and this should change from stopped to running yet there we go so it is running but if we were to try to access this right now we actually couldn't because we don't have user access so what we're going to do is down here where it says view details we'll hit that and then on our share here we can go to this and click edit file system acl then down here we can click add item and we're going to add we're going to add a group so we can add our home group so now we can select this drop-down we're going to select our home group that we made earlier acl type allow and then we'll leave all these permissions as they already are and we will hit save access control list so now anyone in that home group should have access to our haven samba share so to test that we're actually going to go to our file explorer and then we'll navigate to this pc ignore some of this stuff down here but for now we're going to go to map network drive and i'm going to map this as do i have h available do i have h for haven oh i don't we're just going to map this as s for samba i guess and so we can do is we can put two backslashes and then our ip address another backslash and then the name of our share which is haven samba and then we can keep this reconnected sign in checked and we should be able to hit finish and then type in our haven username and our password we'll hit remember my credentials and if everything worked well ha ha we should now have access to our share so if i were to try to copy over a video look at that we've just transferred stuff to our haven samba share and i wonder if we can actually play this video back from it look at that i'm actually playing back a video from our nas that we just built how cool is that with trueness scale we can actually run a lot of cool things like virtual machines or containerized applications some of which are available by default such as plex or next cloud but my plan is to leave this server as purely a dedicated storage server so i'm not going to be running any other applications or virtual machines but that's definitely something to check out if you're interested something you should definitely do though is go to this data protection tab and make sure that scrub tasks are enabled and you can actually play around with the schedule to make sure this happens more frequently if you'd like to but basically this is going to check our file system to check for any integrity issues or corruption and then provide us an early warning if something does happen here you can also configure smart tests which essentially will monitor the health of your drives in your nas if the data on your nas is really important you probably want to have some sort of off-site backup such as backblaze or even dropbox here you can actually configure that by setting up a cloud sync task but i'm not going to go into that into this video i might do that sometime later on as i mentioned earlier in the video my goal with this build was to try and compete with my 2 bay synology ds215 plus so i copied a folder that was just under 7 gigabytes or so to and from each nas to see how they performed with write speeds the pavilion chunas is the clear winner here completing the transfer in almost half the time the ds215 plus only has one gigabyte of memory and i think our pavilion eight gigabytes is giving it a massive advantage here for the majority of the transfer the pavilion is able to nearly saturate our gigabit connection only dipping down a few times while the synology starts to really struggle after only a few seconds my guess is that the pavilion would have even better write performance over longer periods of time if we decided to upgrade to 16 gigs in the future [Music] read performance wasn't as impressive for the pavilion but it still managed a solid lead over the synology i'm sure the ram and 16 gigabyte swap are helpful here but not as much as during the write test so both servers are limited by the drive speed i think [Music] now it's great that we managed to beat this synology in raw performance but what does that actually look like when we take power draw into consideration well i measured each device using a watt meter at the wall and the pavilion 500-c60 really wasn't that much more power hungry at least at idle it drew around 30 watts on average with the synology pulling only around 20 watts to me this seems like a pretty worthwhile trade-off i'm only measuring and comparing power draw at idle here because i don't think the draw under load will really affect my power bill too much this nas will most likely be sitting at idle at least 90 of the time so that's what i'm much more concerned about and just to make sure this actually performed well in a real world environment i edited this entire video from this nas it wasn't flawless with a few hitches here and there but for the most part i forgot that i was editing off the nas i actually forgot to turn the navs back on a few times when i tried to pull this up to finish editing this truna server is not perfect and it took a whole lot of improvising to make it happen but it's pretty cool that an old desktop like this can actually outperform something name brand off the shelf like a synology ds215 plus now obviously synology products come with software features and support that isn't available with a trunas system like this so this isn't necessarily an apples-to-apples comparison but it's still helpful to see what can be done with an old pc lying around if you have any thoughts or questions about this build make sure to leave a comment below and also consider posting it on my discord server which you can find a link for that on my channel and as always if you like the video and want to support the channel the easiest way is to just hit the like button or maybe consider subscribing if you haven't already that's all for this one though so thanks for watching stay curious and i'll see you in the next one [Music] [Music] you
Info
Channel: Hardware Haven
Views: 319,591
Rating: undefined out of 5
Keywords: a6-5200 nas, amd nas, budget pc build, budget server, cheap nas, freenas budget, freenas old pc, how to build a cheap nas, is truenas free, is truenas good in 2022, linux, nas on a budget, optiplex nas, optiplex truenas, self hosting, truenas, truenas 2022, truenas home assistant, truenas old pc, truenas scale, truenas scale docker, truenas scale setup, truenas scale vs core, truenas share windows, turn pc into nas, turn pc into server, what to do with old computer
Id: iSpL9LnczVQ
Channel Id: undefined
Length: 21min 21sec (1281 seconds)
Published: Wed Feb 23 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.