Skip to main content

Moving away from TrueNAS

· 4 min read
Matt Compton
Breaker of things

I only really used it to begin with because a lot of YouTube and online resources reccomend it as a starting place for running your own fileserver.

And, for the record, it is pretty good at doing exactly that.

However, over time, as I've spent more time hands-on with Debian and other more traditional server operating systems, it's been a pain in the ass to adapt other processes around TrueNAS's web-UI only style of doing things.

So, I decided it was time to get rid of it.

Migration process

I'm not one to do things well-planned in advance, so I burned a USB stick with Debian 11.7, and shut down TrueNAS without any more thought to it.

(For anyone curious, I did check to make sure that nothing important was on the TrueNAS boot device, and instead on the ZFS mirrored disks that I wanted to preserve.)

When my server Chewie was running TrueNAS (first CORE, then later SCALE), the disks were as follows:

  • ~250GB SATA SSD (boot device, I have absolutely 0 idea how they partitioned it)
  • 4 TB WDC HDD (ZFS Mirror disk #1)
  • 4 TB WDC HDD (ZFS Mirror disk #2)

I had over a terrabyte of disk space used on the total ZFS array, and no other disk large enough to hold all of the data, so I was banking on OpenZFS being as easy to use as I had read online. Thankfully for my sanity, that turned out to be the case.

Like with any other server, the first thing I did was a base Debian install with only "common utils" and "ssh server", and had the installer do a one-partition setup on the 250GB SSD device.

One I was booted in to my new Debian install, I did some light googling to figure out what I would have to set up for ZFS. Turns out, it's not hard at all.

Following the instructions from the OpenZFS website (except note that I personally skipped backports, as I think they skimp on stability sometimes) (https://openzfs.github.io/openzfs-docs/Getting%20Started/Debian/)

The instructions are basically the following steps:

# if you haven't enabled 'contrib' in your /etc/apt/sources.list yet (I hadn't)
sudo nano /etc/apt/sources.list
sudo apt update
sudo apt install build-essential dpkg-dev linux-headers-generic linux-image-generic -y
sudo apt install zfs-dkms zfsutils-linux -y

Now since I had the ZFS kernel module, I had to reboot.

Next, I ran across this AskUbuntu post (https://askubuntu.com/questions/123126/how-do-i-mount-a-zfs-pool), which kind've answered my question in a round-about way.

My pool had been named "Storag" in TrueNAS (not sure where the "e" went. Oh well), so I tried

sudo zpool import Storag

And to my suprise, it worked!

(Side note, the OP in the thread (or maybe a reply?) mentioned this older blog post, of someone doing much what I was, but I didn't end up needing it. https://web.archive.org/web/20171211140530/http://www.servercobra.com/freenas-to-ubuntu-initial-fileserver-setup-with-zfs)

Then, all I had to do was figure out how to set up NFS shares (as I had previously only used TrueNAS's awful webUI for it.)

Turns out, this too, was super easy.

This Atlantic.net article was super helpful (once you scroll past their quick self-advertisement): https://www.atlantic.net/dedicated-server-hosting/how-to-install-and-configure-nfs-server-on-debian-11/

TL;DR for Debian:

sudo apt-get update -y
sudo apt-get install nfs-kernel-server -y

Then you need to edit /etc/exports like:

/some_path 10.0.0.69(rw,sync,no_subtree_check)

(The article documents the options in the ()'s, and the IP is made up.)

Finally, you just

sudo systemctl restart nfs-server

And, done!

Conclusion

Obviously for some people the migration of TrueNAS could be more complex, but personally, half the reason I felt the need to move was because I wasn't using the machine for anything but ZFS and NFS, as I find the webUI just that frustrating.

It would obviously have been more taxing to migrate if I had been running apps from the TrueNAS marketplace still, but if that had been true, I probably wouldn't have been motivated to switch the machine at all.

Hopefully this short post can be SEO'd well enough to help out someone else! :D

Moving this site to Docusaurus

· One min read
Matt Compton
Breaker of things

It was. But, I think that in the long run, Docusaurus will be better.

For starters, being able to use .mdx rather than normal markdown is, frankly, awesome.

Also, it's waaaay more friendly to the idea of just,,, tossing markdown files in a folder, running a script, and calling it a day.

I know I said this when I moved to Jekyll, but hopefully this time, I actually mean it when I say I'll write more stuff on here.

Also, I'm going to probably move all the stuff from my gitbook on to here, and have a much better system for class notes.

Hosting Woes

· 2 min read
Matt Compton
Breaker of things

As I'm sure you know (since I mentioned it on the site at least once), I help host Crystal Linux's infrastructure, using two different nodes. One of which is a home server, that, of my own admission, was a little lacking in the security department. So, when someone came along scraping for servers to exploit, they spent quite a bit of time on my node that happens to also be (temporarily) serving the role of primary Crystal Linux package server. Hence, poof went the package updates. And oh, in come the discord messages. As an added Murphy's law moment, around the same time, we were due for a new ISO image release. Except, GitHub now couldn't pull packages from me either!

Nginx Limiting

Through a combination of sources, most of which are so far buiried in my firefox history as to be inaccesible, I managed to eek out some request limits on nginx, which seems to have (mostly?) solved the issue.

Fail2ban

Fail2ban seems to be incredibly versatile, if you have the willpower to spend ages configuring it. Luckily for me, combining the default nginx-limit-req rule and ufw seemed to work well enough. (And by that, I mean that editing the nginx conf worked, and the rest was a disaster)

Conclusion

Please hurry up and fix mirroring, OSSPlanet!!

Next-Day Update

We're setting up a strong VPS with our new OpenCollective money 👀, so even if we keep delaying OSSPlanet, this should still be resolved Soon™️

Moving this site to Jekyll

· One min read
Matt Compton
Breaker of things

I've always hated web-design. In fact, I actually paid a friend of mine, Kris, to do the CSS and templates for my previous site.

My personal website, anyways, is just a place for information, and thus, the format doesn't matter.

Jekyll is lovely since I can just write stuff, in markdown, and magically get a new page that matches the rest of the site.

I might actually be able to take down notes in a way where I can reference them later, which is lovely

Plus, markdown is shorthand for HTML tags