Truenas as a VM under Hyper-V...but why?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
well greetings people of the internet hunky joe here hunky joe's playhouse today i've crossed over to the dark side again and we're going to look at true naz and zfs but i'm going to explain to you why i'm looking at trunas and zfs again so let me make a little clarification when i say the dark side i know you all have heard me go on endlessly about why i don't think zfs is a big deal or why i don't use it and you know i've used it before etc but i'm still curious about it right and what peak my curiosity about zfs is their deduplication i noticed as i was moving data around on my network that i have a lot of data that is replicated in other places especially if you're doing a lot of virtual machine files you can you can you can use a lot less disk space if you have deduplication enabled on your nas if it's capable of doing it now if you've been watching my live streams you'll also notice that or you'll also know that i've been very curious about getting my hands on a qnap nas with the ear with the hero operating system on it because it has zfs built into it the plan is to sell my ds918 plus my synology because it doesn't support 10 gig and then i i was looking for a replacement so i could i could diy build my own right and you know i'm the king of cheap so i'd love to do that i could get another synology say like a 1621 synology which has which supports 10 gig and nvme and gives me six drives of storage as opposed to four or i could go some would like the q nap but you know beauty is in the ivy beholder and until i get my hands on one i can't very well judge qnap as harshly as others there's a youtuber i watch called it's my natural color and tom has a channel over in the uk and he just did a series of videos all about his qnap navs now mind you they were pa paid advertisements basically because qnap sent them a unit to evaluate but what this boils down to is do i need zfs am i going to gain any benefit by it and can i utilize deduplication that's the question so what i've decided to do is nothing's better than personal experience right so i have decided to build a uh truenav's nas but i'm going to do things a little bit differently now i'm installing trunaz but i'm you know me you know on kicho i'm gonna do things a little bit differently so does everyone remember my unraid machine it's got the gigabyte daz77ds h3 or ds3h motherboard in it it's got an i7 3770 it's got 24 gig of ram it's got multiple uh pci express slots i think it's got three on there two or three um it has usb 3. it's a good motherboard for its time i've used it for unraid i've used it for a lot of other projects well today what i'm going to do is i've put hyper-v windows server 2019 running hyper-v on there now originally i was going to do it with vmware but vmware 6.7 and 7 do not support the network card that's in there i know they can vmware can be adapted to support the network card but i frankly didn't want to go through the headache i know server 2019 i know hyper-v and i know i can pass my heart my hard drives through through hyper-v so that's what we've done today i've got server 2019 up and running here and i'm going to show you start to finish on how i installed truenas and configured it so that you know exactly what i'm talking about so let's waste no more time let's get to that video right now so the first thing i'm going to do is go out and get my hard drives prepped and this is the unit that has the four two terabyte drives so i'm going to come over here to disk management and what we need to do is we need to wipe out everything on these drives and then take them offline in order for them to be passed through to a virtual machine under hyper-v so we could pass the controller through but i find this way works just as well um and actually i don't know how to pass the controller through on hyper-v plus i have a another hard drive or an ssd running on that controller so we'll just do this the the way i know how so right click on the drive and we're just going to delete the volumes on these four drives so now that i have all four volumes deleted i'll just right click and take these drives offline okay so we get the drives offline so now i'm done with disk manager now i'm going to go into hyper v manager and since this is a new install of hyper-v the first thing i like to do is rename my is rename my uh switch so i'm going to call this uh gigabit one for one gigabit and vert dash vert and that'll be connected to the qualcomm this is what it created when it installed hyper-v now the other thing is on the hyper-v settings this is where it's going to store since i don't have any shared storage setup on this i'm just going to run this virtual machine it's only going to be about 20 20 or 30 gigabytes in size for the virtual machine file and the virtual hard drive for truenas so i'm just going to run it off the fast ssd storage so we'll leave these two settings to default we can come back later and move that over to shared storage if we want to but for the purpose of this demonstration i'm just going to leave it where it is now what i'm going to do is create a new virtual machine now what we're going to do we'll click on next here and i'm going to call this truenas and we'll call it trunas12 click on next to make your life easy make this a gen 1 machine gen 2 machines are basically for computers that need the yuffie uefi bios you're not going to benefit anything by doing gen 2 i don't even know that truenas will work under a gen2 so i'm just going to set it for a gen 1 machine now i'm going to start it out with 8 gig of ram i have 24 gig on this machine i'm not going to use dynamic memory click on next we're going to connect it to that gigabit one vert switch that's why i renamed that switch under here so it'd be easy to identify click on next and then i'm just going to set up a i'm going to do a 30 now i'll do a 20 gig hard drive that should be more than enough and it's going to store it in its default location click on next now i'm not going to install an operating system right now i'm just going to click next through this and then finish and the reason i did it that way is because i want to come up here and right click on the machine go to settings and i want to give this thing four virtual processors and apply now and then i want to come down here to the ide controller click on image file now i've already copied the trunas image over to my iso folder on my c drive and there it is so i'm going to have it boot off of that now i haven't connected the other hard drives yet what i like to do is get truenas installed make sure it's up and running get it assigned an ip address and then come back and add the hard drives later so i'm going to click on ok then i'm going to right click on the virtual machine connect and then we'll go ahead and we will start the virtual machine and that should start the install cd which it does so i'm going to hit enter here now the beauty of true navs is it knows it's running on hyper-v as you can see there it's loading the hyper-v drivers uh for the operating system so i'm going to choose option one install upgrade click on ok i'm going to install it to the microsoft virtual 20 gig hard drive click ok and i'm going to proceed with the installation then we need to enter a super secret password [Music] click ok and we're going to boot via bios because remember we set this up as a gen 1 machine so hit enter let the install run do the installation is complete it says please reboot and remove the installation media i'm going to click ok and then i'm going to go ahead and shut down the system all right so now it's turned off so now i'm going to come back to file and settings and i'm going to remove that cd-rom drive it doesn't need to boot off of that and then we can go ahead and start the virtual machine gonna hit enter and let it boot now the first time it boots up it's got to generate that ssh or the uh it's got to generate a key file which takes a few minutes so it sees our network card here we go so it's generating our dh what is it generating uh dh the the key which takes a few minutes okay so the ip address is at 5.55 so we're going to leave that alone and we're going to go out and we're going to connect via a browser and do the rest of the configuration all right so i've opened a browser window under edge and i'm a login as root and then using our super secret password go ahead and click on login and get started and we should see our four cpus we should see eight gig of ram we should see that is truenas 12.0 u2.1 so that was the current version as of 11 as of today which is april fool's day all right so a couple of things i like to do first um trying to remember where they are let's go to let's see is it network network summary global configuration there we go so i like to change i'm going to leave the host name at trunas but i'm going to change it to mid earth dot local and click on save i just like to do that so that my the name on the dashboard is something that i understand what it is so you'll see it still says truenas.local but if i refresh it should say true nas.mit mid-earth.local so now we've got it booted up so the next thing we need to do is attach the hard drives to it which as you can see if we go to storage there are no there are no pools and there are no drives to add at all so the next thing we're gonna do is we're gonna shut down the virtual machine confirm click on shutdown so it shut down cleanly i didn't have to install anything under uh hyper-v to get it to shut down i didn't have to add any drivers or anything but the next thing i want to do now is connect the hard drives and this is where it could get a little confusing so i'm going to go to file settings i'm still on the virtual machine and i'm going to come under here under the scuzzy controller because we're going to add these drives as scuzzy drives or as my friend victor bart likes to say scusi drives so we come over here scuzzy controller we're going to add a hard drive click on add and then we'll just add each hard drive there should be a total of four of them so we add the first one apply we're going to come back up here add another one physical disk 2 and apply same way with this 3 apply and then disk 4 and apply so now all four hard drives are passed through via that scuzzy controller to truenav so click on ok so now we can go ahead and start the vm again and we should see that it'll start seeing that the hard drives in here it should see the serial numbers and the drives you can see 512 bytes sectors it sees the drives and then once it comes up and gives us the ip address then we'll be able to go back out to the web browser and there it is so 5.55 so let's go back to a web browser so we'll log in as root now and our super secret password now mind you i'm not going to do a detailed setup of true navs what i'm going to do is i'm going to take you through show you how to set up the drive pool we're going to add a couple of users maybe a group and then we're going to uh add a share on here so i can show you how to do that so the first thing we need to do is get our storage set up so we'll come over here to storage and go to pools and i'm gonna go to add a pool and i'm gonna create a new pool and i'm just going to have it suggest a layout so the layout is it wants all four of those drives and it wants to put them in a raid z2 but i don't need two drives of redundancy i'm looking for more storage so i'm going to do a raid z and you'll see that'll give me 5.45 terabytes of storage and i'm just going to call this test so if i've done everything right selected all four drives i should be able to click on create confirm and i should be able to create the pool and there we are we have a test pool it's available i can click on it i can uh let's see that's it i can view it i can go to the disks and as you can see it sees each individual disk it sees a serial number it knows what model of hard drive it is the smart is enabled and it can communicate with the drive and we can set up even smart tests if we want to if we come back here to the dashboard as you can see we now have our test pool available for disks pool status is online so now we're back on our windows uh server 2019 and you can see here it is here's the status with the virtual machine loaded here's how much ram is in use and then we have our ethernet controller on here so the next thing we want to do is go create some users and groups under true navs and then we'll uh move on from there so i'm going to go ahead and create a couple of accounts so i'm just going to come here under users and i'm going to uh it's giving me a warning so i'm going to click on add and i'm going to type in bill adama and adama is our supervisor you know our admin user type in his super secret password now it's very important if you have a windows network that you click on this microsoft account if you click on the help one thing i like about the new version of of truenas is they have the context sensitive help it's very helpful so you set this to allow additional username authentication methods when the user is connecting from a windows 8 or newer operating system which i will be and it's just a way of tying in the windows login or the active directory login with uh your trunas server just makes your life easier and i'm gonna go ahead and submit that user now you notice it's i didn't do anything else except enter the username and password etc i'm going to do the same thing for my account [Music] if i can learn to spell my own last name and i'm making my password in here the same as it is on my windows active directory or my windows login so that it's consistent and i don't have to enter that when we go to the network browser so i'm going to go ahead and submit now the next thing i'm going to do is i'm going to come here to groups and i'm going to create a new group and we're just going to call it uh ujp for unki joe's playhouse and click on submit so there's an old adage you add users and then you add users to groups and groups get permissions so that's what we're going to do under linux as well so i'm going to come here to the group now and i'm going to add members and i'm going to come all the way down here to the bottom and i'm going to add adama and jstraley to that group okay so now we have our users and now we have our groups and we come back to dashboard and we see our drives are still online seven percent cpu we're not really going to be using the cpu much because we're not doing anything on it now keep in mind we're not going to be using plug-ins jails or virtual machines we are strictly using truenas to give us access to a zfs file system to test it so the next thing i want to do is come here to storage and it's really it's not intuitive how truenas does their sharing so i'm teaching you the way i was taught what i want to do is come here to the pool and i want to add a data set okay and i'm just going to call this data set test okay and i'm going to click on submit and then under this i can go to edit permissions there we go and then what i'm going to do is use acl manager and this is basically for windows shares so i'm going to use acl manager and i'm going to select a preset acl and that is i'm going to create an open acl and continue now the user i'm going to leave is root but on the group i'm going to change that to ujp the group i created earlier and i'm going to click on apply group so according to the access control list let's see basic full control group allow basic full control so by by setting this and clicking this box i'm going to apply these permissions to the to this data set okay and if i click on this one if i for say for example i already had this data set created it would apply the permissions recursively so any files and folders i already had on there it would apply that to them as well i just make it a habit to go ahead and apply them recursively just in case and then click on save okay so now we've created a file system called test now we need to go out and we need to actually create a windows share i know it's not real intuitive but this is how it works so i'm going to click on add and then i'm going to check the path to test which has an acl okay we're going to use default share permissions right uh we're just going to call this test share and we're going to click on submit and then we're going to enable the service so that we're able to see it and it tells us the smb service has been enabled so we'll go ahead and click on close now i'm going to come back here to the dashboard and we can see all is right with the world now to see if our share is working uh what we need to do is come out to windows file explorer and if i type in double backslash the name of the nas which is called trunas and hit enter if i've done this correctly it should connect up to the test share if i double click on that i should have access to it and then if i right click and do new folder i should be able to write a folder to it and i can so that means my permissions are correct now i'm using the user jstraily that i created but if i had logged into this machine with the dhamma it would have worked on that as well so now what i want to do is start copying some data over to this test folder but i wanted what i want to do is go back one and i'm going to actually map a network drive i'm going to map the network drive of let's see t is t is available so we use t for true nas click on finish and then now we have drive letter t is assigned to the trunas test folder so now let's start copying some data over there and see how our performance is so i'm copying some data over from my local ssd or nvme drive over to uh my true nas server and right now it's getting about anywhere between 50 and 100 megabytes per second depending on the file sizes some of these files are large some are small but as you can see i'm getting consistent 100 megabit per second transfer rates now if we go over to true navs we'll see the impact it's having about 31 cpu usage you can see my v dev is up and running you can see my network card is up and running it's getting about 104 megabits per second so we're getting good performance on this file transfer which is what i wanted to make sure of is that we would that adding hyper-v to the mix would not slow down the file transfer process and as you can clearly see it's doing quite well on the file transfer speeds that's what i would get with my synology nas or any other nas i have connected to it but the beauty of running this under hyper-v 2019 server is i could add a 10 gig network card in here and in effect get 10 gig networking speeds but i just wanted to show you uh how trivial it was or simple it was to set up a trunas virtual server and to see that even with a uh uh off the shelf nick card which is a uh what is that uh it's i think it's uh let's go and see what brand and nick card is in this server i think it's a qualcomm let's go to device manager network adapter yeah it's a qualcomm atheros ar 8161 and again another reason i use hyper-v and server 2019 i was going to put esxi 6.7 on here but it does not support the qualcomm network card in here so it was just easier for my life to put windows on here i'm more familiar with it and uh so we'll let this uh i don't think we have any more issues we'll let the copy finish and then what i'm going to really do is start putting some data on there that i know has duplicate files from different folders and then we're going to turn on the deduplication now it's my understanding the deduplication feature of trunas is going to require at least 16 gig of ram so we'll have to play around with the ram settings probably before we can turn that on but that'll be one of the experiments we do to see if truenas is going to live up to uh and the zfs file system is going to live up to the standards that i need and one of the primary reasons of switching from synology to true navs is for or to the qnap for that matter is because i wanted to capture that ability of zfs to do deduplication now i could have just installed truenas directly onto that machine and i did attempt to do that and i don't know why truenaz i think just doesn't like me or fridaz whatever you want to call it this week i had problems getting true nas to load directly onto this machine and i just eventually gave up and moved on to other things but filed it away for future reference so i was able to get windows server 2019 installed on here without any trouble get hyper-v configured and as you saw true navs is running everything but everything except for the uh smart testing seems to be working on here it passes through the drive serial numbers and the temperature information all that good stuff i was able to as you saw create a data volume and create uh v devs and go out there and share the files and i'm getting really good copy speeds for a gigabit network they're normal i was even able to do some uh testing on this where i moved uh removed a hard drive while the system was running to see if it would keep running and if it would flag the drive as being bad it did now the only caveat is is that because of the older bios i have on this it does not support um hot swapping hard drives i think it's a biosetting i have to go out and set so the one thing i had to do was when i went to put the drive back in to true naz and get it to re-silver it still didn't see the drive i had to actually shut down truenas then restart the virtual machine running truenas and then it was able to see the drive and go ahead and re-silver and i didn't i wasn't copying any other data to the server while the drive was offline so the re-silvering process took a minimal amount of time and overall i was very happy with this setup uh it was fast it was speedy and and frankly the only features of true navs that i would use are zfs i don't use their their jails i don't you i'm not fond of running virtual machines under trinez i think where trunas really shines is is how it manages a zfs and frankly i can roll zfs on my own so there you go people of the internet we hope you found the video entertaining and informative as always please leave your comments in the comments section give us a thumbs up if you liked the video donate if you're so inclined we take paypal patreon and the youtube join function and don't forget to join us uh we have a live stream usually saturdays at noon or 1pm just depending on how i'm feeling that week and we will send out notifications to everybody um all of our subscribers when we are going to have a live stream a few days in advance so you'll have time to set aside the time and plan please come back and see us again and don't forget we'll see all of you on the other side you
Info
Channel: Unkyjoe's Playhouse
Views: 4,018
Rating: undefined out of 5
Keywords: truenas, freenas, zfs, zfs file system, server 2019, hyperv, hyper-v, freenas virtual machine, truenas virtual machine, virtual nas, virtual machine, windows server 2019, hyperv 2019, hyper-v 2019, zfs virtual machine, unkyjoes playhouse, nas, diy nas
Id: V0XXHk147pw
Channel Id: undefined
Length: 29min 47sec (1787 seconds)
Published: Wed Apr 07 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.