My NAS solution and other homelab projects
2024-12-12
Network-attached storage solution
Back in April (2024), I built a NAS machine with the following components:
- CPU: 12th Gen Intel i5-12600K 10-core (16 threads) at 4.9GHz with integrated graphics (Alderlake-S GT1)
- RAM: 64 GB (4x16GB) Corsair Vengeance LPX DDR4
- SilverStone Technology CS382 8-bay SAS-12G/SATA-6G Hot-swappable Micro ATX NAS chassis
- four Seagate Exos X22 20TB SATA 6Gb/s 7200RPM 3.5-inch Enterprise HDDs
- Corsair SF850L fully modular low-noise SFX power supply
- MSI PRO B760M-A WiFi DDR4 ProSeries motherboard, 2.5Gbps LAN
When I moved back in with my parents in June, I had this machine running for a couple months. My parents, who pay the electric bill, are strict about conserving energy and saving money, so they yell at me for leaving lights on and such. (But they have their own "parent math", such that they get mad when lights are needlessly left on but they justify other expenditures that seem needless to me. But it's their money, so.) I figured having this NAS machine running 24/7 was probably contributing to a good portion of the electric bill. So I decided to buy a 4-bay external NAS hard drive enclosure that supports up to 80 TB, and connect this to my laptop to use as a NAS solution. I used this for a while until last week, when I decided to get the NAS machine I built back up and running again. I told my parents that I will pay them $50 a month toward the electric bill. They are fine with this deal.
I didn't bother taking the hard drives out of the 4-bay external NAS enclosure, and I just connected it to a USB port on the back of the NAS machine. The NAS chassis I bought is built to hold up to 8 HDDs, but the motherboard only has 4 SATA connector ports, so the machine can only support 4 HDDs. If I ever want to expand from 80 TB up to 160 TB, I can do that, but 80 TB is plenty, at least for now.
I previously used TrueNAS SCALE on the NAS machine when I first got it back in April and until I shelved it. Now it runs regular Debian, which gives me more granular control over the system than the sort of locked-down approach of TrueNAS. The four 20 TB enterprise HDDs are part of a RAID0 ZFS pool. Perhaps if I want redundancy in the future I can get four more 20 TB HDDs and make them mirror the other four, but redundancy is not really a priority for the type of data I store on them. I only really want redundancy for personal data, not public archive data. On my Linux desktop, I have a 5 TB Btrfs RAID1 mirror that consists of three 5 TB external HDDs, and on this 5 TB RAID1 mirror I have my personal data in an encrypted Borgbackup repository. For additional redundancy and separation I also have this Borgbackup repository mirrored on my Linux desktop's 1 TB local hard drive.
My NAS machine also runs some local services, like Invidious, Grafana, Prometheus, Loki, Promtail, Linkding, qBittorrent, and two qBittorrent Prometheus exporters. One of those qBittorrent exporters is for my local qBittorrent instance where I torrent Linux distribution ISOs and other stuff that is legal in the U.S. The other qBittorrent exporter is for my remote qBittorrent instance on SeedHost that resides in Amsterdam, which I use for public digital archive stuff.
Kubernetes cluster
I have three Orange Pi 5 Plus devices that are currently doing nothing right now. I came across an article1 for setting up a K3s cluster on Orange Pi 5 Plus running Armbian. I'm considering doing this. I also came across another article2 for setting up Ollama in a Kubernetes cluster, and there's also a way to set it up with TrueCharts. Ollama is about as ethical as LLM use can get at this time. It allows you to download open source LLMs and run them locally. I came across another article3 that discusses generating alt-text from images with LLaVA. Most of the time my brain deadlocks when I want to describe an image for alt-text, so I've tended to avoid doing it. This causes friction with my belief that content on the Internet should be accessible to visually-impaired users. Lately I've been trying to get into the habit of adding alt-text to the best of my ability, but it takes a lot, and I fear that even the little I can do at a given time is inadequate, which isn't fair to visually-impaired users. So I find this to be an acceptable use-case for LLMs. I generally believe LLMs have a ton of potential for accessibility.
Other things I'm considering running on the Orange Pi 5 Plus Kubernetes cluster:
- Semaphore : an open source alternative to Ansible Tower, which allows you to create, manage, and monitor Ansible projects, playbooks, and roles.
- blocky : DNS proxy, DNS enhancer, and ad-blocker for the LAN written in Go.
- Vaultwarden : Unofficial Bitwarden compatible server written in Rust. I wouldn't use this as a replacement for Bitwarden, but I would use it to mirror my Bitwarden vault locally.
- apt-cacher-ng : Caching proxy for Debian packages, but apparently not limited to Debian.
- Atuin : Magical shell history. It replaces existing shell history with a SQLite database and records additional context for your commands. Can also sync shell history across devices.
- calibre : An open source e-book manager. I currently use the desktop version of calibre, but I think it's worth seeing how running it in a K3s cluster would work out. Additionally, calibre-web.
- ciao : Checks HTTP(S) URL endpoints for a status code and sends a notification on change via email or webhooks. I might also just deploy this on my NAS machine.
- Grafana, Prometheus, Loki, Promtail, and rsyslog – though I'd prefer not to mess with their current installation on my NAS machine.
- Invidious
- netbootxyz : PXE boot for any type of operating system or utility disk. Could be highly useful for me.
- Pihole : If not blocky, then Pihole.
- protonmail-bridge : This could be highly useful for me to have available on my LAN.
- Seafile : File-sync solution. Maybe?
- Tailscale : Obviously need to have these services accessible on my tailnet somehow.
I doubt I will have every one of the above services setup on the cluster, but they are definitely good candidates. I would also need to find a way to make my NAS storage available to the cluster.