Categories
Uncategorized

HP Z420 Workstation

Even though I’ve posted about NAS devices as far back as 2005 I’ve never really run one at home until recently. I got OpenMediaVault running and it worked well, so when I was offered a free computer that could fit at least 6 drives I figured what the heck!? Let’s try the open source version of TrueNAS Scale.

Oh, I should point out that in 2007 I said “FreeNAS it looks like a cool solution, and something I may try to play with in the future” and hey, the future is now!? And honestly I still deal with some of the questions I asked back in 2007.

I should note a few things. First, the Z420 is a bit of a power hog but keep in mind I got it for free. So any extra energy cost can be traded for the fact this was zero-cost hardware, right? I don’t know if I will run this long-term but for now I can use it to learn TrueNAS.

The other thing is, you can easily just buy a Synology NAS and stuff it with drives. I say “easily” because they do a good job of building a ready-to-use NAS solution for most people… if you’ve got the budget. I like doing things on the cheap and learning the hard way though. You’re welcome!

Anyway, this post will focus on the HP Z420 Workstation. I’m sure I will post more about TrueNAS, but the installation was pretty simple. I flashed the ISO to a thumb drive, dropped a 256GB SSD into the case, booted it up, and ran the installer. Oh, I did remove one of the sticks of RAM because it showed an error (on the monitor) when I originally booted it. There is now just 12GB of RAM. I may try to re-install the DIMM or maybe get more RAM. 12GB might be plenty for testing though. (I tried to reinstall the fourth DIMM and it didn’t boot. I may give up on the fourth DIMM.)

I got the case open to see what I was working with… I should note I am not a person who has ever “built a PC” though I’ve opened a lot of machines. Tons and tons of Macs, from desktops to laptops and models in-between. I’ve also opened lots of Windows laptops which eventually became Linux laptops. Still as far as “towers” go my experience is with Apple hardware.

I had to procure three more SATA cables and added them to the one I found in a drawer and the two that were in the machine, but I got six drives connected. I popped out the optical drive and multi-card reader thing. Even though there is spaces for six drives I don’t have them in place yet… but they are all plugged in and… hanging about. It works.

I threw a monitor on for the install but it’s still attached for now as I get things up and running. Like other NAS products you pretty much do everything through a browser so no monitor is expected or needed. (Once your hardware actually works.)

I’ll need to 3D print some hard drive sleds (sled? caddy? whatever) and then get the drives more permanently mounted. These are mostly junk drives, old and smallish… I do have two 4TB drives ready to go and may have a third one soon. You really want a minimum of three drives for ZFS and more than that is even better. Again, I am trying to be economical in this project and not just spend a ton of money. If I wanted to do that I’d just buy a Synology box and call it a day.

Categories
Uncategorized

TrueNAS Testing

TrueNAS Dashboard

After my experiments with OpenMediaVault (and success) I decided to try out TrueNAS Scale. The first thing I noticed about TrueNAS is that it’s legit, and by that I mean it’s described as “Open Enterprise Storage” and on the web site it says “Award-Winning Storage Trusted by Over 60% of the Fortune 500” and lists a bunch of huge corporations. Sounds legit. We’re using the Community Edition which is to say it’s the open source version with no paid support contract or whatever…

Now, besides all of that I just wanted to try it out because I had heard good things, especially about the ZFS file system, which is more advanced than RAID. I had another old Dell Optiplex laying around from a failed client project years ago but it would not boot so I was in no rush with this TrueNAS testing. Then out of nowhere my sister messaged me with a photo of an HP Z420 Workstation and said “How do I get rid of this?” and I said “I’ll take it!” So I did.

The HP Z420 Workstation is a beast of a box with space for six drives so it seemed like a good candidate for TrueNAS… so that’s what I did. (I’ll write up a separate post about the Z420 and just focus on TrueNAS for this post.)

Because I’ve already got a fully functional NAS running this one was for testing, trying, and learning.

It took some clicking around and minimal doc reading to get a pool setup, and eventually an SMB share I could store files on. I also installed some containerized applications. And then I pulled out the three drives and swapped in two other drives and set those up. Then I added back in the original drives but just two instead of three. At this point I wanted to just test things out and see what would happen. I saw warnings about degraded pools and such. Nice to see. I haven’t quite figured out exporting a pool and re-importing again, which is what I think I might need to do someday.

In my mind the nice thing about OpenMediaVault just using an ext4 drive is that if the system dies I can just plug that drive into another computer and access all the data. (It’ll need to be a computer running Linux, but that’s okay.)

For these TrueNAS drives with ZFS it doesn’t seem to be that simple. I know you can run ZFS on Linux and I’ve even found a version for macOS but I think I basically need to learn all about ZFS before I feel confident I can rescue my data if things go wrong.

The obvious solution seems to be running two (or more) TrueNAS servers so one backs up to another, and you’ve got a second one to move drives to in case the first one fails.

I’m sure there are answers to all of this… if you have them, or other suggestions, feel free to share! Otherwise just consider this my notebook where I write things down for future me.

Categories
Uncategorized

OpenMediaVault Update

About a month ago I got OpenMediaVault up and running on a Raspberry Pi. It worked until the disk failed so I ended up redoing it all with a real computer and a better disk. I also added a backup disk and have an rsync job running daily to do a backup.

There’s also a computer off-site that does a daily backup to the NAS via rsync over ssh. Next on the list is to do the same with a web server I’ve got running at a hosting provider.

This post is really just a check-in to say it’s been working really well. I do like OpenMediaVault for a very simple NAS solution…

That said, I’m digging into TrueNAS Scale now and it’s… a lot. Which is fine. It’s been fun comparing the two, and I’ll have a post coming to cover TrueNAS soon.

Oh, and I’m considering building a small simple NAS using OpenMediaVault to go off-site for a bit more redundancy with the backups. Stay Tuned!

Categories
Uncategorized

BearExporter

Codeberg release

I released the code for a Python script called BearExporter over on Codeberg.

It’s a Python script to export all of your Bear notes to Markdown files you can use with Obsidian, read in the terminal, or whatever. I originally started on this when I started using the MintBook and realized I did not have a good way of seeing any of my notes from a Linux computer.

And yes, you can export your notes in plenty of other ways, the idea with this script is that you can automate/schedule it to run whenever you want, as often as you want, for up-to-date files wherever you might need them.

As the old saying goes “it works for me!” but I know it’s not amazingly well-written code, but it is available. I’m not exactly skilled at Python but I’ll try to improve it as time allows.

The README file probably goes way too in-depth about all the shortcomings. There are times I’m proud of the code I write, and then there are times I get something to (barely) work for me and figure others might find a use for it.

I originally tried this bear_backup script but it wasn’t what I was after. But maybe it’s what you need? I should probably steal/borrow a few ideas from it to enhance my code.

Anyway, enjoy the code, use it ignore it, improve it, or tell me what to do better. :)

Categories
Uncategorized

Know Your Rights – Stopped by Police

The ACLU has a great guide about what to do if your are stopped by police. (And more general guides about your rights as well.)

Here’s a printable PDF guide for what to do if you are stopped. Print one and carry it with you. Print them out and give them to people you care about (which should be everyone) so they too can know what to do.

Being stopped by police is a stressful experience that can go bad quickly. Here we describe what the law requires and also offer strategies for handling police encounters. We want to be clear: The burden of de-escalation does not fall on private citizens — it falls on police officers. However, you cannot assume officers will behave in a way that protects your safety or that they will respect your rights even after you assert them. You may be able to reduce risk to yourself by staying calm and not exhibiting hostility toward the officers. The truth is that there are situations where people have done everything they could to put an officer at ease, yet still ended up injured or killed.

Ask if you are free to leave. If the officer says yes, calmly and silently walk away. If you are under arrest, you have a right to know why.

And here’s a PDF of the whole page… as a backup. Just in case.