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

Vim Replace String 256 with <T_CO>

What was your first text editor when you started using Linux/Unix? Mine was pico. It was very easy to get started with and quite similar to nano. Then I moved to emacs and sticked with it for a long while. Eventually, I’ve switched to vim (or neovim), and that’s what I have been using until now. Well, the thing about text editor or may be this also applies to many other things, you’re only familiar with features that you constantly use....

May 9, 2021 · 2 min · 320 words · kenno

Looping Through Line in a File in Bash

I wanted to install vim package on FreeBSD 13.0, and did so without realizing that there were over 86 additional dependency packages installed. This was done with pkg install -y vim command. Anyway, I wanted to clean up by removing vim and those dependencies after all this is a headless server. Removing vim package doesn’t remove the installed dependencies. Fortunately, I was able to copy and paste the names of dependency packages and save it to a file....

April 17, 2021 · 2 min · 226 words · kenno

Freebsd adduser ERROR - User Disappeared During Update

While creating a new user account on one my servers running FreeBSD 12, I encountered the following error: root@nas2:~ # adduser Username: devops Full name: Ansible Operator Uid (Leave empty for default): Login group [devops]: Login group is devops. Invite devops into other groups? []: Login class [default]: Shell (sh csh tcsh nologin) [sh]: Home directory [/home/devops]: Home directory permissions (Leave empty for default): Use password-based authentication? [yes]: no Lock out the account after creation?...

November 7, 2020 · 1 min · 184 words · kenno