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....

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....

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....

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

Replacing a Disk in a Zpool

ZFS is one of my favorite file systems. I use it at home on my nas server (running FreeBSD) as well as my Fedora 32 desktop. Today, I’m going to show you (and my future self) how to replace a (faulty) disk in a Zpool. The server I’ll be working on is nas2 and the pool is tank. List the status of the current pool. Password: root@nas2:~ # zpool status tank pool: tank state: DEGRADED status: One or more devices could not be opened....

September 20, 2020 · 3 min · 445 words · kenno

Upgrading Freebsd 11.2 to 12.0-RELEASE

FreeBSD 12.0-RELEASE was released today, and that means it’s time to upgrade 2 of FreeBSD 11.2 machines to this latest version. One of my FreeBSD boxes is a desktop used at work, and the upgrade went well without any issues. In this post, I’m going to document how the upgrade is done on my nas server at home. First ensure that the FreeBSD is up to date: root@nas:~ # freebsd-update fetch src component not installed, skipped Looking up update....

December 12, 2018 · 4 min · 697 words · kenno

Upgrading my nas from FreeBSD 11.1-RELEASE to 11.2-RELEASE

FreeBSD 11.2-RELEASE was released a few days ago. This means it’s time to upgrade the FreeBSD running on my nas. For the most part, this was all what I did: # freebsd-update -r 11.2-RELEASE upgrade # freebsd-update install # reboot # freebsd-update install After it’s been upgraded, I also need to update the Zpool. root@nas:~ # zpool status pool: zroot state: ONLINE status: Some supported features are not enabled on the pool....

June 30, 2018 · 2 min · 353 words · kenno

How to extend ZFS partition

I have a FreeBSD server which used to run of a smaller SSD drive. When replaced with a larger capacity SSD by using dd command to clone the disk, there is free space allocated. I want to extend the existing zroot pool to use this space. The following describes how I achieve this with the help of a forum post. Let’s list some information about the zroot pool: root@nas:~ # zfs list zroot NAME USED AVAIL REFER MOUNTPOINT zroot 4....

March 11, 2018 · 2 min · 302 words · kenno

Zpool Not Automatically Mounted on Boot on Fedora

I love ZFS, but there is something that has annoyed me for quite sometimes – the zpool doesn’t get automatically mounted on boot. To work around this, I had to login as root and run: to import tank pool before I login with my normal user account. Well, I finally found a solution. This is what’s written on zfsonlinux/zfs WIFI about Fedora specifically: Systemd Update: When upgrading to the zfs-0.6.5.8 release it’s recommended that users manually reset the zfs systemd presets....

December 20, 2016 · 1 min · 139 words · kenno