How to run TrueNAS on Proxmox?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in one of my last videos i showed you how i built my new home server with proxmox which is an amazing system to run virtual machines in your home lab and proxmox is great as a hypervisor you can build zfs storage pools with it you can run virtual machines but it isn't really great for storing files and making them available in your network so i was searching for something else that i could use as an s system and i wanted to run it as a virtual machine because then i could just use my existing server without buying a new device so i did a quick research on the internet and i thought i should try out 2nas and run this as a virtual machine in proxmox turns out that this isn't actually so difficult and there are no bigger downsides when doing this but there are still a few things you need to consider when building a storage system on desktop hardware or run it as a virtual machine so let's take a look at these things and let me show you how i built this system by the way thanks everybody for supporting my channel i'm so thankful for all the great people in my community may it be on discord on twitter you're always giving me such a great feedback interesting questions and great suggestions for future videos and i know that i haven't really delivered on that like i wanted to in the past just because there's so much i want to do with this channel and there are so many topics and tools i want to make all videos about which can be overwhelming but i will keep track of all your suggestions and if there is something in particular you really want to see or you need help with then please let me know i may not be able to cover everything and turn it into an interesting and appealing video but at least i try i tried really hard anyway i just wanted to get that out of the way so let's start with the server build and i first want to show you trueness core which was previously known as freeness and this is an operating system based on freebsd which comes with many cool features like an intuitive web ui and a redundant software rate that is based on open zfs and you can just download this on their home page completely for free you can install that on a desktop pc or server but also run it in a virtual machine and for any professional company environment there's even an enterprise version existing that comes with some additional cool features but for any home server the trueness core version is totally sufficient you can do everything with it that you can imagine for building a reliable storage system at home but speaking of reliability it is very important that you consider a few things when building this and the first one is that you should always run truenas with ecc memory ecc stands for error correction code and it is a specific type of memory that can detect and even correct errors it's a standard in any professional server or workstation hardware and you can easily spot these memory modules because they are called registered ecc memory but this is something that isn't very common on desktop hardware because usually on a normal desktop pc you don't need that so when you're building your trueness system on professional server hardware where you have registered ecc memory you're fine but when you're building a home server with desktop hardware you usually don't have ecc memory and that could potentially get you in big trouble because when you're using a software rate system like zfs what you will do when building a storage pool in trueness the errors in the memory can have a high impact on the integrity of the fight system and it's very hard to say how likely those arrows will happen i personally never had issues with that but like everything in it things can go wrong and if something damages your fight system without a backup you don't have any chance of rescuing your files on that storage pool so in my last video about my home server i built i talked about this and i showed you some memory modules the so called unbuffered ecc which are supported by some specific consumer cpus and mainboards most likely all amd ryzen processors can handle ecc mode and if you want to learn more about this i've put your link to my video in the description down below there you talk in much more detail about my home server build and why i have decided to go with certain paths and when you want to buy ecc memory for your nas server then take a look at my kit page where i share all of my pc and server builds which i've done and i also will do in the future the second thing that you need is a storage controller and which one is depending on the storage capacity you need so most mainboards come with a built-in sata controller which can manage four to six hard drives usually and if you need more drives you may want to add an additional pci controller i know many people will start looking for raid controllers which is very common but here's also something you need to consider that's very important so in the case you need an additional controller card you can go with the two different solutions the first one is you just get a pci controller card that has no raid mode and no intelligence because then you can just pass through the individual hard drives to the operating system and the second solution would be that you can still get a raid controller but only if it supports the so-called it mode which bypasses the rate intelligence and simply passes through the hard drives to the operating system but be careful some controllers need to be flashed with a specific firmware to enable idit mode so make sure you're doing a good research and try to find out if the storage controller or the raid controller you will get will work with zfs the installation of trueness on proxbox isn't very different from any other installation you simply just go to the official home page and you download the iso file of trueness make sure that you're selecting trueness corp which is the community and free open source edition of it and then in proxmox you simply just go to your local storage where you store your iso files and upload it there so i've already done that you can see the iso file here and let's create a new virtual machine in proxmox and because i already have a production system running i will create a second one to just walk you through the process and i will call it trueness test for example so let's click on next and here we now need to select our iso file we want to do the installation from all the other settings like the guest os the linux kernel version can be default also the system settings you usually don't need to touch here and at the hard disk section we now need to create a virtual hard disk no this is for the operating system this has nothing to do with our storage pools or where the data is stored for our network later this is just for the operating system and as i said in my previous videos about my home server build this should be always stored on an ssd or better on an nvme drive which usually gives you much better performance right and on my main proxmox server i have an nvme drive where i have my local storage lvm volume so this isn't actually very big but it's totally sufficient for storing just the operating system of trueness here so i will create a new disk file of 32 gigabyte this should be totally fine i don't need to catch anything here and i just want to go next here so now i want to add one more quarter this virtual machine i would recommend you to go with at least two cores here and also the memory trueness recommends at least eight gigabytes of memory better more the larger your storage boots are because zfs is a very very memory intensive file system it does a lot of caching and calculations in the cpu in in the memory so you want to add more memory to it that will definitely speed up the whole system so 8 gigabytes is the minimum size that is recommended and i always forget the right size of 8 gigabytes so it will just calculate it and put this number into this field here so now if we have that we can go to the network connection and now that's depending on your setup how you have set up proxmox and how you want to connect the virtual machines to your network you can see i have three network card interfaces three bridges uh one that is bridge to my physical network the second is just for my internet connection and the third the dmz is routed through a surface xg firewall is also running on my proxmox server by the way this will be the topic within the next couple of weeks i will make a video how to protect your home system with the firewalls so now i want to just bridge that to my local area network i don't want to add a vlan here so i will just confirm this so now before you start this virtual machine you want to edit a few things because as i said we need to pass through our hard drives or the storage controller depending on what you got and built into your machine so when you go to the hardware you can also add another one here and if you got a pci controller card you can just click on add pci device and you can select it here and pass the whole controller through so because i have a built-in controller on my main board you can only see i have the nvme drive here but i can't pass through the internal sata controller of the main board because this is not an additional pci bus this is built into the main board so if you don't have an additional controller and you have connected your hard drives directly on the main board you cannot use this method here you need to add a configuration file inside proxmox and add those drives manually but don't worry i will show you how to do it it is not actually so difficult so first of all i will need to connect to my proxmox server so i will open a new ssh connection and then we need to find out the unique identifiers of these hard drives so now we can use the linux tools to find out that so the first one is the lsvlk command that will show us all block devices that are connected in the linux operating system and you can see that i have my nvme hard drives here and i also have my three hard drives where i want to store my data on and these are connected to the sata controller of my main board so usually they start with sda sdb sdc and so on but no we don't see the unique identifier of these hard drives and proxmox doesn't recommend to refer to those hard drives via the sda sdb in sdc because those things can change once you reboot the system or you change something in the hardware those sdas sdbs sdcs can be in reverse order for example so in order to always have the same integrity of the file system and always have the same way of connecting those hard drives to the virtual machine you need to refer not to the sda sdb but to the unique identifier of the hard drive because every hard drive has a unique serial number and we need to find out this first and we can do that by expanding the lsblk command via the dash o parameter and add the model and the serial here so when we hit enter you can see that this will print the same output but it adds the model and the serial number at the end you can see all the three hard drives have the same model but they have a unique serial number and this unique serial number is also mentioned in the device folders of the linux operating system so in the virtual file systems where the linux kernel makes the hardware devices available to us we can actually see those unique hard drives and refer to it so when we do an ls command on this folder here the slash dev where all the devices are stored and made available and we can go further to disk and let us search by id so no one can access all the devices by a unique identifier and you can see that all the sata drive usually start with ata and then you can see the specific model of the hard drive and here we have our unique serial number so now we can simply just copy this path here and now we need to add all three hard drives and start attaching this to the scsi controller you can see in the virtual machine that we have an scsi controller where we can attach those hard drives to and we have one scsi zero port and this is used by the virtual hard disk but we can also add other scsi ports like scsi one two three and so on for each hard drive here and this is what we can do with the command q and set and now we need to use the unique identifier of the virtual machine this is a number in front of that name in this case one zero three and now i want to add an scsi port one and now i can use the df list by id folder and just copy this part here and add the first hard drive so let me just do that for all hard drives as well [Music] and now when we refresh the ui you can see that all the three hard drives are now connected to the virtual machine so this is probably not the most elegant way of doing it i would always recommend you to add an additional controller card to your server this will make things easier and you always have the ability to see the controller card inside the trueness virtual machine but this is also a way how you can make it work when you don't have an additional pci slot to add a controller card for example you don't have enough space so you just don't want to spend your money on a controller card and now we want to start the installation of trueness so what we can do now is we can simply just start the virtual machine and let's go through the installation procedure and this is the installation menu we simply can just proceed and select okay and now we want to select where we want to store our operating system on so select the first one here the 32 gigabyte virtual hard disk click on ok and confirm that you no need to add a strong password here of course or you want to authenticate to your server and no depending on your bios or ufi settings usually by default it should be bios you can see that in the hardware section of the virtual machine if it has default sea bios you need to select this one here otherwise the system wouldn't boot okay so the system is now booted up and everything should be ready now and we can simply connect to the web interface or you can use this menu to um configure the network card interfaces or add dns server whatever you will need and this is a web ui of trueness so now we need to authenticate with the root user and our password that we have just set up during the installation procedure and no this is a dashboard of pruner so i think this really looks great and is a very simplified system it is very intuitive to use so the first one i want to do is add a storage pool and because i used this on my other production system already i can simply import the same storage pool so when for whatever reason you delete the virtual machine but you still have the hard drives you can simply just pass them through to another virtual machine and import an existing storage pool or if this is a completely fresh new system you can create another one just to show you how it works you can simply add all the hard drives and then you can add redundancy to a larger pool of physical disks so in my case because i already created the storage pool on another virtual machine i can simply now import an existing pool and once you have created your storage pool you can see all the metrics here like the used the available space here the compression and if there are any systems activated like deduplication or whatever and what i want to show you now is if you have created your storage pool you can now add a network share so for example if you have windows machines in your network usually will use a windows share via the smb protocol so you can click on add here and create a new path that you want to store here for example this one here you also need to create a new user to authenticate to this network share and you can of course set all the different permissions access control list and whatever as well so this is really intuitive it's very simple and i think i don't need to walk you through all the different settings here because some may be interesting for you some maybe not but what i think is really important are the snapshots because this is really the best feature of a cfs storage pool because you can create a snapshots of a current timestamp and then you can revert back to this preview state and restore files that for example have been deleted or have been changed and you can of course create them all manually but you can also set up a task for that which is pretty comfortable so select tasks here and go to periodic snapshot tasks and then you can add another task here for example create a daily snapshot of our data stat store in the lifetime of this should be two weeks so then i'm able to revert back to any day within the last previous two weeks even if i have deleted some files so and this is really really great and if you have not installed this on a virtual machine because you can use trueness also on a physical hardware and not run it as a virtual machine you can of course run virtual machines with that so there may be some arguments while you probably would replace proxmox with trunas so maybe this is also an option for some people but i really like the virtualization features of proxmox and i definitely want to keep that running so i want to use both systems at the same time and running trueness as a virtual machine is a great option to do that okay so this is how you can virtualize trueness on proxbox and build a great nas system with that personally i haven't seen any downsides doing this however i'm still thinking of maybe upgrading my nas system at some point and maybe get an external system with more capacity i'm not sure whether it will be again a do-it-yourself build or if i get a nas device from synology or qnap those systems are also very good but still very expensive for now i'm totally fine with running this as a virtual machine at home and if i need more space i can just add more hard drives and expand the storage pool of course so i hope you enjoyed this video and this was helpful please tell me in the comments which system are you using to store your files in your home network and yeah thanks everybody for watching i see you in the next one bye bye
Info
Channel: The Digital Life
Views: 21,999
Rating: undefined out of 5
Keywords: diy nas server, nas server, diy nas build, diy nas software, diy nas storage, nas server selber bauen anleitung, home nas server, server, nas build, budget nas, building a nas, cheap nas, home server, plex server, proxmox backup server, qnap nas, synology nas
Id: M3pKprTdNqQ
Channel Id: undefined
Length: 17min 35sec (1055 seconds)
Published: Tue Aug 03 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.