BTRFS - Perfect Filesystem With Trust Issues

BTRFS - the filesystem that was first introduced in 2009, back in the days of Linux 2.6.x kernel. It came with a promise of being this modern filesystem, for the modern age. Packed with all sorts of features that were traditionally being considered as part of the “Software RAID” or “Volume manager”. To this day, it is being considered by many, as a “ZFS for the Linux world”. My first encounter with this filesystem was way later, when it was already considered pretty much stable....

February 7, 2021 · 8 min · Ivan Tomica

Cleaning up ZFS GPT signatures

I have been previously installing Ubuntu on ZFS (root-on-zfs) and since then I’ve transitioned to Fedora, on ext4+lvm, to avoid much complication and hassle. It is also not necessary for me to have all those nice ZFS features on root. When I was installing Fedora I have reformatted existing drive. Unfortunately although new GPT should’ve been created it seems like I’ve missed something and root of my device was identified as ZFS member:...

March 29, 2020 · 5 min · Ivan Tomica

Expanding ZFS pool on Linux VPS

In order to expand ZFS pool first step is to resize underlying disk. Once that’s done, by default on Linux, partition 9 of size 8MB is created at the end of the disk. Reasoning for this partition is not completely clear for me, but according to some random discussions on the internet, it would seem that it comes from Solaris, but no clear explanation why it exists in the first place....

February 12, 2020 · 2 min · Ivan Tomica

Mounting NFS from Host machine inside VM on Fedora

For the past few weeks I’ve been trying to solve few particular set of problems which I won’t go into detail here, perhaps in another post. One of the challenges I’ve faced is how to export NFS from my ZFS pool on Fedora host machine and mount it within Ubuntu based VM. The whole process is quite simple and straight forward so here we go. In order to be able to use NFS at all we first need to install required components on the host machine:...

November 19, 2019 · 2 min · Ivan Tomica

Using Sanoid for snapshotting ZFS on Fedora

ZFS is really nice filesystem and I use it wherever I can. I could write essays on the topic of ZFS and how awesome it is, and that is just what might happen some time in the future, but for now I’ll just show you how snapshots are managed on my machines. Why snapshots? There are 10 types of people: Those who do backups And those who will I’m not sure about you, but I’ve definitely deleted things I shouldn’t have only to realize few minutes (,or 3 days, or a month) later that I need the data that’s now gone....

September 8, 2019 · 3 min · Ivan Tomica

Moving Ubuntu to Root-on-ZFS

My main rig is running Ubuntu 18.04. To be more precise I opted out at install time to use Ubuntu Mate 18.04 but later on installed AwesomeWM and use that instead now. But without digressing much, I decided it was time to move my root (/) to ZFS. Why? - Because it is awesome! ZFS is my favorite FS of choice for some time now. I don’t use it everywhere (am trying to be smart about it) but I prefer to do whenever I have the chance....

February 1, 2019 · 5 min · Ivan Tomica

Replacing a broken drive on FreeBSD ZFS

These days, one of the drives on one of my machines started developing bad habits of reallocating blocks which is an early sign that drive might go bad. To prevent such misfortune I decided to replace it with a new one. Once the old drive was yanked out and new one was put into the machine (there are other ways, but I was forced to do it this way) it was only left to partition the new drive and add it to appropriate places....

December 19, 2017 · 4 min · Ivan Tomica

Moving /home to another ZFS dataset

When I set up ZFS on my main rig I was kind of doing it “fast as possible” and haven’t paid attention to much details. Recently, I wanted to customize my setup a bit so here’s how I migrated my /home to another ZFS dataset. Setup was as follows: There is ZFS pool called storage composed of two mirrored vdevs One vdev is 2x2TB drives while the other one is 2TB drive and 1,5TB drive....

November 20, 2017 · 2 min · Ivan Tomica

Checking disk activity with ZFS – iostat

Pretty neat little command that I wasn’t aware before, but quick check of the manpage would bring it to my attention. :-) To check current disk activity stats on your zpool you can use: zpool iostat -v POOLNAME You can of course omit pool name, without it it’ll show statistics for all pools. Command output example: $ zpool iostat -v capacity operations bandwidth pool alloc free read write read write ---------- ----- ----- ----- ----- ----- ----- storage 838G 554G 1 40 54....

March 28, 2017 · 1 min · Ivan Tomica