How to import ZFS pool with duplicated pool names

If you use ZFS as the file system, you probably already know that tank is the most common name for ZFS pools. That also applies to me, I do name most of my ZFS pools as tank as the default. There is no issue with that name, however, since ZFS’s pool name must be unique, this means I couldn’t import or have multiple ZFS pools with the name tank on a system. ...

December 14, 2024 · 2 min · 389 words · kenno

Expand ZFS partition to use entire disk

This is just a quick note to jot down what I did to resize and expand a ZFS partition to entire disk. I never had to do this before; it tured out it was quite easy. First ensure that the autoexpand option is set on the zpool. Then, stop the VM in order to resize the disk volume. [root@phnomaural ~]# zpool set autoexpand=on immich [root@phnomaural ~]# poweroff [root@phnomaural ~]# Connection to phnomaural closed by remote host. The original size of ZFS disk was 256 GiB, and it has been increased to 512 GiB. This was done by stopping the VM running on XCP-ng, and go to the disk and change the size to 256 GiB. ...

November 12, 2024 · 2 min · 246 words · kenno

List Block Devices on FreeBSD

Recently, I found out that the ZFS pool on a FreeBSD is running out of space. There is no option to clean up this storage, but there are spare disks. So the next logical thing to do is to add 2 extra disks to the existing (mirror) ZFS pool. This FreeBSD server is a virtual machine (VM), and after attaching 2 physical disks to this VM, I had difficulty identifying these disks. Well, I could guess it, but this is a production server, and I really don’t want to spend my whole weekend to setup this server from the backup. :) ...

July 14, 2021 · 3 min · 567 words · kenno

How to Remove ZFS Meta Data on FreeBSD

It’s been quite a while since I last posted something here. It’s not that I haven’t come across many issues in tech, it’s just that I haven’t had enough time to write anything. So I’m going to share how to easily clear the ZFS metadata on a disk previously used in a ZFS pool. Here is an example - I have an external drive, and it is detected as /dev/da0 when plugged into a FreeBSD server. Though I don’t remember having used it as a member of a ZFS pool called tank, the following output does show that it is the case: ...

May 26, 2021 · 2 min · 348 words · kenno

Using ZFS on an External Drive

I’m a fan of ZFS filesystem. It’s so good that I also use ZFS on most my Linux machines, though it’s painful at time when the ZFS kernel modules fail to compile. Why I like it so much comparing to other file system such as XFS, EXT4, BTRFS? ZFS allows me to quickly do snapshots and efficiently send snapshots over the network, and my nas runs FreeBSD which support ZFS natively. ...

November 12, 2020 · 3 min · 505 words · kenno