Why I Moved to ZFS

(Originally published on my old plaintext blog)

Cloudsdale (the host this blog is on) got a shiny new update last night! (And I got to go through the hell of setting up a new box!) What update, you ask? I moved everything to ZFS! Now, for those of you who don’t know, ZFS is a filesystem originally developed by Sun Microsystems, for their Solaris (SunOS) UNIX SysV OS! It has a number of security and usability features that make it far superior to most filesystems out there, including the dreaded ext2/3/4 pile of crap used by most Linux distributions. (Seriously, it’s not 1996 anymore guys….)

I personally chose ZFS for the security features. I back up regularly, so snapshots aren’t as big a thing for me. As this server sits on a host that already has hardware RAID and SSDs in play, the Z-Raid and caching features also don’t matter very much to me. I chose ZFS because of the ease of administration, ability to alter and create datasets on the fly, and the sheer number of configuration options available when creating datasets (like setting a homefolder noexec nosetuid without having to do crazy weird partitioning).

The problems, however, began as soon as I decided to retire the first Cloudsdale. Installing non-Linux on a Linode is….suffice to say, a challenge indeed. The recommended method of installing was to install your OS within VirtualBox and dd the disk up…… yeah no. I have terrible internet and wasn’t waiting 12 hours.

I figured, why not try uploading installation media to a disk on a Linode and running it locally? That’s just what I did! Problem? LISH, the Linode Shell (your Out-of-band access) accesses the serial console. While the BTX loader worked perfectly using Direct Disk boot, beyond that the installer just didn’t work! The FreeBSD USB installer isn’t serial-aware, as I detailed in Post 2: Easy FreeBSD on a Linode. Once I made the installer serial-aware, I was able to finish the installation as previously detailed. Once that was done, I ran into a whole host of new problems.

None of them were unsolvable, however learning to use features of a filesystem on the fly is never fun. I’d never needed to use user quotas before, so figuring that out, as well as how to chain other properties and the appropriate syntax was fun! Protip: zfs create -o setuid=off -o exec=off -o quota=500M -o compress=lz4 \ zroot/home/USERNAME is a great way to quickly lock down a user’s homefolder!

After that, it was just the usual nightmare of figuring how to get crap off without unmounting the disk from the old server.

A lot of configurations and files bounced through canterlot.local last night. Thank Celestia for vi and scp, amirite? Backing up said files along the way was just good process, and something I’d been needing to do anyway.

It took a little while, but Cloudsdale is up again, and rocking out the ZFS!

Written on August 12, 2015