+++ title = "A Quick ZFS Overview on Linux" author = ["Elia el Lazkani"] date = 2020-01-27T21:00:00+01:00 lastmod = 2021-06-28T00:01:00+02:00 tags = ["zfs", "file-system"] categories = ["misc"] draft = false +++ I have, for years, been interested in _file systems_. Specifically a _file system_ to run my personal systems on. For most people **Ext4** is good enough and that is totally fine. But, as a power user, I like to have more control, more features and more options out of my file system. I have played with most of file sytsems on Linux, and have been using **Btrfs** for a few years now. I have worked with NAS systems running on **ZFS** and have been very impressed by it. The only problem is that **ZFS** wasn't been well suppored on Linux at the time. **Btrfs** promissed to be the **ZFS** replacement for Linux nativetly, especially that it was backed up by a bunch of the giants like Oracle and RedHat. My decision at that point was made, and yes that was before RedHat's support for **XFS** which is impressive on its own. Recently though, a new project gave everyone hope. [OpenZFS](http://www.open-zfs.org/wiki/Main%5FPage) came to life and so did [ZFS on Linux](https://zfsonlinux.org/). Linux has had **ZFS** support for a while now but mostly to manage a **ZFS** _file system_, so I kept watching until I saw a blog post by **Ubuntu** entitled [Enhancing our ZFS support on Ubuntu 19.10 -- an introduction](https://ubuntu.com/blog/enhancing-our-zfs-support-on-ubuntu-19-10-an-introduction). In the blog post above, I read the following: > We want to support ZFS on root as an experimental installer option, initially for desktop, but keeping the layout extensible for server later on. The desktop will be the first beneficiary in Ubuntu 19.10. Note the use of the term ‘experimental' though! My eyes widened at this point. I know that **Ubuntu** has had native **ZFS** support since 2016 but now I could install it with one click. At that point I was all in, and I went back to **Ubuntu**. ## Ubuntu on root ZFS {#ubuntu-on-root-zfs} You heard me right, the **Ubuntu** installer offers an 'experimental' install on **ZFS**. I made the decision based on the well tested stability of **ZFS** in production environments and its ability to offer me the flexibility and the ability to backup and recover my data easily. In other words, if **Ubuntu** doesn't work, **ZFS** is there and I can install whatever I like on top and if you are familiar with **ZFS** you know exactly what I mean and I have barely scratched the ice on its capabilities. So here I was with **Ubuntu** installed on my laptop on root **ZFS**. So I had to do it. ```text # zpool status -v pool: bpool state: ONLINE status: The pool is formatted using a legacy on-disk format. The pool can still be used, but some features are unavailable. action: Upgrade the pool using 'zpool upgrade'. Once this is done, the pool will no longer be accessible on software that does not support feature flags. scan: none requested config: NAME STATE READ WRITE CKSUM bpool ONLINE 0 0 0 nvme0n1p4 ONLINE 0 0 0 errors: No known data errors pool: rpool state: ONLINE scan: none requested config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 nvme0n1p5 ONLINE 0 0 0 errors: No known data errors ```
Note
I have read somewhere in a blog about **Ubuntu** that I should not run an upgrade on the boot pool.Note
The installer have created some random IDs that I have not figured out if they are totally random or mapped to something so I have sanitized them. I also sanitized the user, of course. ;)