Book Review: FreeBSD Mastery: Storage Essentials
Saint Aardvark writes If, like me, you administer FreeBSD systems, you know that (like Linux) there is an embarrassment of riches when it comes to filesystems. GEOM, UFS, soft updates, encryption, disklabels — there is a *lot* going on here. And if, like me, you're coming from the Linux world your experience won't be directly applicable, and you'll be scaling Mount Learning Curve. Even if you *are* familiar with the BSDs, there is a lot to take in. Where do you start? You start here, with Michael W. Lucas' latest book, FreeBSD Mastery: Storage Essentials. You've heard his name before; he's written Sudo Mastery (which I reviewed previously), along with books on PGP/GnuPGP, Cisco Routers and OpenBSD. This book clocks in at 204 pages of goodness, and it's an excellent introduction to managing storage on FreeBSD. From filesystem choice to partition layout to disk encryption, with sidelong glances at ZFS along the way, he does his usual excellent job of laying out the details you need to know without every veering into dry or boring. Keep reading for the rest of Saint Aardvark's review.
FreeBSD Mastery: Storage Essentials
author
Michael W. Lucas
pages
240
publisher
Tilted Windmill Press
rating
9/10
reviewer
Saint Aardvark
ISBN
0692343202
summary
FreeBSD Mastery: Storage Essentials takes you on a deep dive into FreeBSD’s disk management systems.
Do you need to know about GEOM? It's in here: Lucas takes your from "What *is* GEOM, anyway?" (answer: FreeBSD's system of layers for filesytem management) through "How do I set up RAID 10?" through "Here's how to configure things to solve that weird edge-case." Still trying to figure out GUID partitions? I sure was...and then I read Chapter Two. Do you remember disklabels fondly, and wonder whatever happened to them? They're still around, but mainly on embedded systems that still use MBR partitions — so grab this book if you need to deal with them.
The discussion of SMART disk monitoring is one of the best introductions to this subject I've ever read, and should serve *any* sysadmin well, no matter what OS they're dealing with; I plan on keeping it around for reference until we no longer use hard drives. RAID is covered, of course, but so are more complex setups — as well as UFS recovery and repair for when you run into trouble.
Disk encryption gets three chapters (!) full of details on the two methods in FreeBSD, GBDE and GELI. But just as important, Lucas outlines why disk encryption might *not* be the right choice: recovering data can be difficult or impossible, it might get you unwanted attention from adversaries, and it will *not* protect you against, say, an adversary who can put a keylogger on your laptop. If it still make sense to encrypt your hard drive, you'll have the knowledge you need to do the job right.
I said that this covers *almost* everything you need to know, and the big omission here is ZFS. It shows up, but only occasionally and mostly in contrast to other filesystem choices. For example, there's an excellent discussion of why you might want to use FreeBSD's plain UFS filesystem instead of all-singing, all-dancing ZFS. (Answer: modest CPU or RAM, or a need to do things in ways that don't fit in with ZFS, make UFS an excellent choice.) I would have loved to see ZFS covered here — but honestly, that would be a book of its own, and I look forward to seeing one from Lucas someday; when that day comes, it will be a great companion to this book, and I'll have Christmas gifts for all my fellow sysadmins.
One big part of the appeal of this book (and Lucas' writing in general) is that he is clear about the tradeoffs that come with picking one solution over another. He shows you where the sharp edges are, and leaves you well-placed to make the final decision yourself. Whether it's GBDE versus GELI for disk encryption, or what might bite you when enabling soft updates journaling, he makes sure you know what you're getting into. He makes recommendations, but always tells you their limits.
There's also Lucas' usual mastery of writing; well-written explanations with liberal dollops of geek humor that don't distract from the knowledge he's dropping. He's clear, he's thorough, and he's interesting — and that's an amazing thing to say about a book on filesystems.
Finally, the technical review was done by Poul Henning-Kamp; he's a FreeBSD developer who wrote huge parts of the GEOM and GBDE systems mentioned above. That gives me a lot of warm fuzzies about the accuracy of this book.
If you're a FreeBSD (or Linux, or Unix) sysadmin, then you need this book; it has a *lot* of hard-won knowledge, and will save your butt more than you'll be comfortable admitting.
You can purchase FreeBSD Mastery: Storage Essentials from amazon.com. Slashdot welcomes readers' book reviews (sci-fi included) -- to see your own review here, read the book review guidelines, then visit the submission page. If you'd like to see what books we have available from our review library please let us know.
The discussion of SMART disk monitoring is one of the best introductions to this subject I've ever read, and should serve *any* sysadmin well, no matter what OS they're dealing with; I plan on keeping it around for reference until we no longer use hard drives. RAID is covered, of course, but so are more complex setups — as well as UFS recovery and repair for when you run into trouble.
Disk encryption gets three chapters (!) full of details on the two methods in FreeBSD, GBDE and GELI. But just as important, Lucas outlines why disk encryption might *not* be the right choice: recovering data can be difficult or impossible, it might get you unwanted attention from adversaries, and it will *not* protect you against, say, an adversary who can put a keylogger on your laptop. If it still make sense to encrypt your hard drive, you'll have the knowledge you need to do the job right.
I said that this covers *almost* everything you need to know, and the big omission here is ZFS. It shows up, but only occasionally and mostly in contrast to other filesystem choices. For example, there's an excellent discussion of why you might want to use FreeBSD's plain UFS filesystem instead of all-singing, all-dancing ZFS. (Answer: modest CPU or RAM, or a need to do things in ways that don't fit in with ZFS, make UFS an excellent choice.) I would have loved to see ZFS covered here — but honestly, that would be a book of its own, and I look forward to seeing one from Lucas someday; when that day comes, it will be a great companion to this book, and I'll have Christmas gifts for all my fellow sysadmins.
One big part of the appeal of this book (and Lucas' writing in general) is that he is clear about the tradeoffs that come with picking one solution over another. He shows you where the sharp edges are, and leaves you well-placed to make the final decision yourself. Whether it's GBDE versus GELI for disk encryption, or what might bite you when enabling soft updates journaling, he makes sure you know what you're getting into. He makes recommendations, but always tells you their limits.
There's also Lucas' usual mastery of writing; well-written explanations with liberal dollops of geek humor that don't distract from the knowledge he's dropping. He's clear, he's thorough, and he's interesting — and that's an amazing thing to say about a book on filesystems.
Finally, the technical review was done by Poul Henning-Kamp; he's a FreeBSD developer who wrote huge parts of the GEOM and GBDE systems mentioned above. That gives me a lot of warm fuzzies about the accuracy of this book.
If you're a FreeBSD (or Linux, or Unix) sysadmin, then you need this book; it has a *lot* of hard-won knowledge, and will save your butt more than you'll be comfortable admitting.
You can purchase FreeBSD Mastery: Storage Essentials from amazon.com. Slashdot welcomes readers' book reviews (sci-fi included) -- to see your own review here, read the book review guidelines, then visit the submission page. If you'd like to see what books we have available from our review library please let us know.
I prefer NTFS as a journaling file system. It provides all the functionality and none of the incompatibility that you get with these niche OS's.
why disk encryption might *not* be the right choice:
recovering data can be difficult or impossible,
Backups! Backups! Backups!
it might get you unwanted attention from adversaries,
This is a variant of the venerable security through obscurity.
and it will *not* protect you against, say, an adversary who can put a keylogger on your laptop.
Perfect is the enemy of good enough. Disk encryption solves one particular set of problems; IDS/antivirus solve another set. Need I draw you a Venn diagram?
That's planned as another book in the Storage Mastery series (with a possible third on networked storage). But, whether that book is written depends on how well this first book is received and what his schedule is like for other books. If the first book doesn't sell enough or garner enough attention, then it will be the last one in that series.
There's a bunch more detail on Michael's blog about this.
Now that ZFS is the default operating system for new installs of FreeBSD 10.x, it sounds like this book documents a lot of hard won technical insights that have been made obsolete by ZFS. Why would I configure RAID 10 for UFS when ZFS provides superior data protection? And so on. It's probably useful for people who have parachuted in and now must maintain a legacy FreeBSD system. It doesn't sound particularly useful for someone who is migrating from Linux to FreeBSD right now, since this is all about how people *used* to configure FreeBSD storage.
I have written a truly remarkable program which this sig is too small to contain.
PC-BSD is built atop FreeBSD, but it's unquestionably a different thing than FreeBSD.
There are reasons to use ZFS, and other reasons to use UFS. Sometimes you really DO want UFS on raid-10. It depends entirely on the workload.
UFS has been around for decades now. I can't say it's bug free--nothing is--but most of the code paths have been quite well exercised. ZFS is newer and more complex than UFS, and more actively developed.
UFS is likely to remain the default in mainstream FreeBSD, for licensing reasons if nothing else.
It's a minor quibble, but the review states it's 204 pages and the table says 240. Obviously at least one of these numbers is incorrect.
Facts have a liberal bias.
The book contains 204 numbered pages. Add in the index, Table of Contents, preface, copyright page, etc, and it hits 240 pages.
I did not do this in an effort to screw with people.
Had it occurred to me beforehand, however... yeah, I would have totally done that to screw with people.
==ml
Thank you Saint Aardvark for taking the time to write this review. You write very well.
--Z.
The cover artwork is nice, but i like the cover style of his "Absolute ..." series more.
1% APY, No fees, Online Bank https://captl1.co/2uIErYq Don't let your $$$ sit in a no-interest acct.
lol, I like your style!
Facts have a liberal bias.
If it was, it wouldn't be about UFS, it'd be about ZFS.
UFS is still fine for small installations on embedded systems, but for any thing of any size, you should be using ZFS. Its superior in every way other than memory usage.
Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
Is it anything like Embarrassingly Parallel Workloads?
I read through Saint's documentation every day. It's one of the reasons I keep coming into work.
While ZFS on linux is pretty good and I'm using it on a few things it's still a bit behind the other versions in speed and reliability. At the moment BSD is still a long way ahead if you have a lot of disks and want raidz or raidz2.
I had a failure on every disk of a sixteen disk pool when setting up on linux late last year for example, just after I'd copied a few TB to it - there's still some edge cases where it falls over and dies. Reinstalled with BSD it was much faster, nearly twice as fast, and hasn't had any problems. Of course twice as fast doesn't always matter since it doesn't take much to saturate gigabit.
However you can set stuff on on BSD now for reliability and later you can just import those ZFS pools from BSD into linux with a one line command. I've done that with a web server I first setup in BSD, with mirrored disks in the pool, and then when I reinstalled as linux I just had to import the pool and I got all the contents back, all neatly mounted where they should be.
It probably won't take very long for ZFS on linux to catch up but for the moment BSD has some advantages. I love how ZFS will work even if you shove the disks into a different machine with different controllers and even a different operating system. No more worrying about whether you can get a replacement RAID card of the same model when things die.
The thing that is stopping me right now from my server fleet wholesale to a BSD is the lack of good choices when it comes to clustered filesystems, like OCFS2. I know there is GlusterFS, which is not the right solution for me and HAMMER / HAMMER2 which don't have the maturity and feature set we need yet. A shared drive, with a simple and fast DLM. Maybe I have overlooked something, but that is what is lacking right now in File Systems for BSD...
So what is the dog slow setup? A dozen disks in a single raidz2 vdev will be slow, splitting it into multiple vdevs will not, and mirrored disks (one vdev per two disks) should be very fast. It's not the same as RAID where the speed is proportional to the number of disks, the speed is proportional to the number of vdevs (virtual devices).
Then there's the possibility of running 4k per sectors disks as if they are not and losing a lot of performance.
So what did you do to get a speed slower than a single disk? Did any of my guesses match up or is something else wrong?
I've got faster than that with a Pentium 4, eight year old IDE disks and 2GB memory.
the cover is so great... Visit Blogger Tutorials!