
It had everything I needed to start manually setting up jails to my liking.
I eventually had to get some additional help online but you come a long, long, long way with that book in your hand.
Another FreeBSD solution is Jails. I never seen a more powerful container solution. It is lightweight and has unique features like hierarchical Jails. Management is done over cli or solutions like Iocage. Jails and its ancestors have been developed since 1975. The modern Jails is developed since 1998. It is an incredible flexible and lightweight virtualization platform. Michael W Lucas wrote a very good book about it ("FreeBSD Mastery: Jails").
I bought physical copies of several of them (the “FreeBSD Mastery: Jails” book, “FreeBSD Mastery: Specialty Filesystems”, “FreeBSD Mastery: ZFS” and “FreeBSD Mastery: Advanced ZFS”) on FreeBSD Mall.
I finished reading the “FreeBSD Mastery: Jails” book, and am currently reading the “FreeBSD Mastery: Specialty Filesystems” book.
I also recently bought the Total Mastery eBook bundle of his from his Tilted Windmill website. It includes eBook versions of the above books that I already have in physical copies, along with a bunch of other eBooks.
In the future I might buy physical copies of more of his books. There is something special about physical books that makes them far more comfortable to read for me than to read eBooks even though I have a eBook reader with eInk. The ability to flip through a physical book, and to feel the physical dimensions of the book adds something for me that eBook readers cannot.
I also want to investigate whether it is possible to donate books to some libraries. I think as a community we could buy IT books that we particularly like, and donate them to libraries, to make them available to more people. It would be especially nice to help books about FreeBSD and OpenBSD reach more people.
If you are familiar with other Unix-like operating systems such as Linux, and you would like to use FreeBSD, then I think the FreeBSD Mastery books that I mentioned which I have physical copies of are useful also.
If you are not familiar with Unix-like systems at all then the FreeBSD Mastery books are probably not yet so useful for you.
The FreeBSD Mastery books are the most useful to someone who is already using FreeBSD in my opinion.
My background includes a few years at IBM as an OS architect in charge of, among other things, the file systems and network services for AIX. However, this was a long time ago (~1988). So I understood NFS, inodes, what it meant to mount a device and the classic Unix commands for managing filesystems.
The first ZFS problem for me was just the vocabulary. What's a pool? What's a VDev? Fortunately, there are lots of high-level descriptions of ZFS on the internet that cover the high level concepts.
Getting the hardware set up was the second hurdle. There are a lot of discussions on forums that cover hardware issues and there you will find answers to many hardware issues, like: is ECC memory required, how fast does the processor need to be, are SATA drives recommended and what drive controllers are compatible with ZFS. Naturally, the answers to these questions depend on how critical is the system you are putting together. I suggest for most people to try setting up a ZFS on some old hardware just to get practice with it. I had a low end Dell tower server model that I wasn't using so it became my first FreeBSD/ZFS server. It had four hard drives.
The real difficulty for me was just the lack of a deep understanding of how ZFS works. ZFS has lots of features totally new to me so working with only the man pages for the ZFS related commands was not giving me much fun. I ended up buying two small books that I can't recommend enough, FreeBSD Mastery: ZFS and FreeBSD Mastery: Advanced ZFS by Michael W Lucas and Allan Jude, see [1] and [2].
These books are each around 200 pages long. The chapters of the first book are:
1. Introducing ZFS
2. Virtual Devices
3. Pools
4. ZFS Datasets
5. Repairs and Renovations
6. Disk Space Management
7. Snapshots and Clones
8. Installing ZFS
Each of the chapters is quite detailed, and I found these two books were just what I needed.
[1] https://read.amazon.com/kp/embed?asin=B00Y32OHNM&preview=new...
[2] https://read.amazon.com/kp/embed?asin=B01E40YIRM&preview=new...
BTRFS has had Copy on Write disabled, while ZFS (not possible, cause the whole idea of the FS is intended to be copy on write), which actually makes BTRFS look even worse compared to ZFS, cause BTRFS writes once instead of twice and has most of its features not work, while still performance pretty bad. But then it's also younger.
Both ZFS and BTRFS (only know specifics of ZFS) can be configured to be better for DB workloads. On ZFS, I know a couple of people using it cause it has nice properties.
Anyway. You might not want to use ZFS or BTRFS for a (pure) database system when performance is the important thing (compared to data security).
What I find kind of missing is UFS because of the BSD world (it's kind of what Ext4 is in the sense of "your general purpose FS with good performance for DBs"), but okay.
And yeah, that all may sound a bit biased towards ZFS, but so far my experience with ZFS has been rather pleasent compared to BTRFS, but again. You might wanna use UFS or Ext4.
It's also kind of "wrong" to compare those file systems. It's like while you could use Redis and PostgreSQL for the same things it's probably not what you want to for one reason or the other.
But then of course it's good, cause you might really have a thing where you want to have a comparison of those two things to take the right decision for your specific application. Like those cases where you say "It's slow, but it makes a lot of thing easier" or "It doesn't guarantee that, but when I take care of it in the design I will only need only a fraction of the resources. And the other downsides don' t annoy me thaaat much".
Because the question came up. COW means Copy on Write and it really means what it says. You copy the data (so have find and to write blocks, duplicating your data on write) which in case of a full blown database which does that again (WAL, Autovacuum, keeping lots of metadata, etc.) you really shouldn't be surprised that it's a lot slower on write heavy sytems. It is more than expected.
On the other hand because the FS does a lot of things in a similar way to a database, other than snapshots and replication and all that cool stuff ZFS does things related to metadata extremely quickly and that's why some CDNs that have many small files use it. Besides just being an amazing thing for managing your data in general.
Also if you wanna learn more a about ZFS and have a good understanding of how you can run databases and other things on ZFS and really utilize it (not just gaining more performance) then I highly recommend the book FreeBSD Mastery: Advanced ZFS.