A Second Life for my ThreadRipper 1950X (Part 2)

In the previous post I talked about the setup for the Host machine, and this continues from there. This time it's time for setting up the virtual machines themselves.

Virtual Machine with KVM

Virtualization with QEMU and libvirt is super easy, if you know what you're doing. And if you don't, there's management tools that make your life easier (but aren't exactly bug free). In my case, I've already had experience with writing XML files for libvirt, and none of the management tools would work from console (aside from libvirt itself).

Setting up the FreeNAS+PLEX VM was hindered by many problems, but the biggest one was the Graphics device. For an unknown reason, libvirt defaults to a cirrus device, which not many Linux distros still support. In fact, FreeNAS doesn't support it at all and tries to create a graphics interface even when you tell it to boot in serial console mode - which is kinda stupid, but who am I to complain about free software?

Fixing it was easy, just switch it with the much more modern qxl driver and done. After that the machine booted, but I still had things to do: Storage. FreeNAS requires that it is installed on a separate disk than the storage it is supposed to use for NAS storage - and that's where the 5th partition on the NVMe comes in.

In short, I needed a small enough partition to hold FreeNAS, but not too small. I decided on 4GiB, which should be enough to hold FreeNAS and any configuration files it would create. Creating the storage was simply running virsh vol-create-as --pool storage --name freenas --capacity 4G --allocation 4G --format raw. As you might have guessed, that created a raw volume which outperforms all other storage formats, at the cost of not having any snapshots.

And I had some spare 2TB drives lying around from the time I had HDDs in my main PC, those were perfect for NAS - they were a bit louder, but they did still do the job fine. Thankfully Linux supports device names, so I passed them in directly using the device serial number instead of relying on fragile, connection based addressing.

Setting up FreeNAS and PLEX

Installing FreeNAS is very easy, most of it ended up being automated. I only had to point it at the drive it was supposed to use as storage, and that was it. Well I also had to tell with which network Gateway and DNS to use, as it refused to gather those from DHCP, but that's probably something in my own network causing it.

Surprisingly that is where the easy things stopped. The FreeNAS web interface is anything but a shallow learning curve, and I repeatedly end up having to figure out how to do things in an unfamiliar environment. But in the end I did get it running. The first task is to specify at least one user group to which you want to assign people to.

For the groups I used 'users' (anyone under 18) and 'adult-users' (anyone over or exactly 18). This allows me to split the user base between trusted and untrusted users. Next up was to define my own user, which I added to both users and adult-users, and finally it was time to define the actual storage space. FreeNAS defaults to either RAID 5 or RAID 6 (not exactly sure which), which meant my 3 2TB HDDs would end up as around 4TB total.

As I prefer my important network accessible storage to not just simply disappear one day, I went with that over a striped RAID - even though I still have not had a single Seagate HDD die on me, I wasn't about to tempt fate. After all, anything that can go wrong will go wrong, and anyone claiming the opposite should probably not have the job they have right now.

Finally there was setting up the SAMBA share. This was super easy thanks to the Web interface, and the only issue I had was that I forgot to set the group correctly. Once that was fixed, I finally had network accessible storage, at a much cheaper price than I would have to pay for any of the proprietary providers like Google, DropBox and similar. And surprisingly installing PLEX was just clicking install on a plugin and then waiting a few hours for the progress bar to move from 50%. All done!

pfSense and and PiHole

I ended up not going with these two for now, as PLEX+FreeNAS ended up eating a huge chunk of network bandwidth. And I also couldn't figure out how to get my Router to not act as a DHCP server yet, so I'm leaving that for a future post.

But with this I finally had a way to get rid of around 1.1 TB of static data on my PC. Especially important documents wandered from my Google Drive to my NAS storage as I needed them to be accessible on any device in my home network. With that said, this mini-series ends.

- Xaymar out.

Comments for: A Second Life for my ThreadRipper 1950X (Part 2)