Kenno’s Open Note ๐Ÿ‘‹

Feel free to take a peak

How to enable and check linger for a systemd user

โ€œThe systemd login manager will terminate any user services when their login session ends unless you enable user lingering with the enable-linger option. Use loginctl with the enable-linger option to configure a user to start during the boot process and prevent the systemd service from terminating when the user session ends.โ€ [1] To enable linger for a user, e.g. kenno, we can run the following command: # loginctl enable-linger kenno I usually ran the above command, and that was it....

December 3, 2024 ยท 2 min ยท 293 words ยท kenno

Accessing host from inside Podman 5.0 container

Sometimes you need to connect to the host from a Podman container running on it. How would you do that? In the past I was able to get this working by connecting to the gateway IP of the container. For example, I have a web server running on the host listening on port 8080. โžœ nc -vz localhost 8080 Ncat: Version 7.92 ( https://nmap.org/ncat ) Ncat: Connected to 127.0.0.1:8080. Ncat: 0 bytes sent, 0 bytes received in 0....

December 2, 2024 ยท 2 min ยท 420 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

Fix container to container DNS lookup failed in Podman OpenSUSE Leap 15.16

Iโ€™ve started to running more containers in my homelab with Podman, running inside AlamaLinux. Most of the times, things just worked. However today, I tried to setup similar containers on OpenSUSE Leap 15.16 host, and I came across an issue getting containers to communicate with one another. Well, spoiler alert, I found a solution, hence this blog post. TL;DR - install cni-plugin-dnsname package from cni-plugin-dnsname build service. (No package from the official OpenSUSE repo)....

November 11, 2024 ยท 3 min ยท 566 words ยท kenno

NGINX 413 Request Entity Too Large

While trying to upload a file to a web app using NGINX as a reverse proxy, I encountered the following error: ... Save(<data/c5ceb2d914>) returned error, retrying after 19.847451977s: client.PutObject: <html>Documents/Fonts/FiraCode.zip <head><title>413 Request Entity Too Large</title></head> <body> <center><h1>413 Request Entity Too Large</h1></center> <hr><center>nginx/1.20.1</center> </body> </html> Save(<data/d194099394>) returned error, retrying after 36.899440019s: client.PutObject: <html>Documents/Fonts/FiraCode.zip <head><title>413 Request Entity Too Large</title></head> <body> <center><h1>413 Request Entity Too Large</h1></center> <hr><center>nginx/1.20.1</center> </body> </html> ... It turned out that NGINX has default value for file upload limit to 1 MB set in client_max_body_size variable....

November 4, 2024 ยท 2 min ยท 224 words ยท kenno

Look up one own's public IP easily

Occasionally, I need to look up my own public IP for various reasons. To do this, I would google โ€œwhat is my ipโ€, and got a result on the browser. Recently, I found a way to easily do this using curl command to an easy to remember URL ifconfig.io. Here is an example, of course with the fake IPs as the results: โžœ curl ifconfig.io 2444:3444:20a:5310:d6c9:ffff:fef1:7777 To get the IPv4, we can supply the -4 option to curl command:...

October 28, 2024 ยท 1 min ยท 113 words ยท kenno

Installing Nerd Font on Fedora

I want to install โ€˜Hack Nerd Fontโ€™ on my laptop running Fedora 40. As of today, there is no RPM package that I am aware of that provides this font. Therefore, I would need to download and install the font manually. Visit the Nerd font website, to choose a preferred font. I like Hack Nerd Font. It can be downloaded from the Download link. Unzip the downloaded (e.g. Hack.zip) and move or copy the directory to ~/....

September 22, 2024 ยท 2 min ยท 312 words ยท kenno

Resizing a root partition on Linux VM

Well, I recently learned that one of my VMs had its root partition full. The following document on the root partition was resized on that VM. Itโ€™s not gonna be something exciting or anything special. However, I feel like I should document anyway, in case I forget on how to do that in the future, and partly due to I no longer work with these type of work as my daily job anymore....

September 16, 2024 ยท 4 min ยท 660 words ยท kenno

Replacing cron with systemd timer

Well, I donโ€™t currently really have a good reason to replace a working cron job with systemd-timer beside practicing it. The following is the existing cron task for www-data user. I want to convert this cron to a systemd-timer: $ sudo crontab -l -u www-data # m h dom mon dow command */5 * * * * php -f /var/www/nextcloud/cron.php The above output indicates that the command php -f /var/www/nextcloud/cron.php is run at every 5th minute, of course by www-data user....

September 3, 2024 ยท 3 min ยท 428 words ยท kenno

Upgrading Longhorn with Helm

For my test Kubernetes cluster, Longhorn is used as the persistent block storage. The installed version is 1.6.2, and the version 1.7.0 is available now. So today, Iโ€™m going to share how to perform the Longhorn upgrade using Helm. Iโ€™m going to try to do this live as usual. Of course, I already created snapshots for all my K8s nodes in case thing goes south. First, letโ€™s verify the current installed version of Longhorn [1]....

August 23, 2024 ยท 4 min ยท 647 words ยท kenno