Shami's Blog

Sysadmin, Because Even Developers Need Heroes

Expand a Zpool

2021-09-01 by Mohammad H. Al-Shami

Block storage volumes are very useful, they give me an easy way of getting ZFS on Ubuntu virtual servers or getting extra storage on FreeBSD. Just attach a volume and create a zpool.

Today one of my volumes ran out of space. So I logged in to my cloud provider and expanded it. Then to expand the zpool I ran the following command

# zpool online -e ZPOOL_NAME DEVICE
zpool online -e tank da1

Maintenance Pages With HAProxy

2021-07-26 by Mohammad H. Al-Shami

Edit: 31/7/2021: Add content for maintenance pages.

I currently work with a group of very smart individuals and I learn a lot from them on almost daily basis. One thing they have done which I found cool was using Terraform to configure the AWS Application Load Balancer to display the notice during maintenance windows.


HOWTO - Build a Keycloak/Ubuntu/MariaDB Cluster Without Multicast UDP

2021-07-25 by Mohammad H. Al-Shami

I’ve been trying to learn more about Keycloak lately but two things kept frustrating me; a lot of the information available online doesn’t work and cloud providers blocking multicast UDP. I lost my notes once too many and decided to document the whole process here for future reference. I used to edit standalone-ha.xml to make it easier to automate with configuration managers. So lets begin.


Letsencrypt Pre-renew Hooks

2021-07-17 by Mohammad H. Al-Shami

Acmetool used to be my go-to tool for LetsEncrypt. It was quick and simple to set up. As a user, my favorite part of the Golang ecosystem is that binary files are statically linked. You don’t have to fiddle with any dependencies. But even though Acmetool is still getting occasional updates the last release is from 2018 and I prefer to stick to releases. There were times when Acmetool would not work behind Cloudflare and I would have to temporarily disable Cloudflare proxying to be able to generate certificates.


HOWTO - Letsencrypt Certificates for pfSense

2021-07-17 by Mohammad H. Al-Shami

I recently helped a friend set up pfSense as a VPN server/firewall for his colocated rack. We wanted SSH and the web configurator to be accessible from a set of static IPs.


HOWTO - Letsencrypt Certificates for localhost

2021-07-12 by Mohammad H. Al-Shami

A few days ago I discovered * which is a neat service that allows you to access localhost with multiple hostnames allowing the creation of multiple development sites without having to use http://localhost/(site1|site2|site3). We all know that has some difficulties when it comes to moving those sites to production. Not all CMS’s and frameworks support an easy migration.


Generate Keycloak Access Tokens with Curl

2021-07-09 by Mohammad H. Al-Shami

I’ve been working more with Keycloak lately and I’m loving it. But one thing I wanted to do while testing is to generate access tokens easily. Today I wrote a small wrapper script and thought I should share.


Logstash Hanging When Rebooting Ubuntu

2021-06-24 by Mohammad H. Al-Shami

Edit: 31/7/2022: I’m currently migrating all my logstash configurations to Vector, it has been much kinder to me than Logstash has ever been.

I maintain an ELK server running on Ubuntu 20.04 for testing. One issue I have faced is the Logstash service hanging on reboot. The server would not reboot and I end up having to power cycle.


Detect if your Script is Running in CRON

2021-06-21 by Mohammad H. Al-Shami

In my previous post I discussed how I use a wrapper script to back up a fleet of servers.


Back Up Multiple Servers With zxfer

2021-06-21 by Mohammad H. Al-Shami

ZFS has been one of my favorite tools since I discovered it in 2014. I can’t count how many times it has saved me from disasters. I’ve even had systems that wouldn’t boot but still managed to recover data from them with a rescue disk.


About Me

Dev gone Ops gone DevOps. Any views expressed on this blog are mine alone and do not necessarily reflect the views of my employer.