Kenno’s Open Note šŸ‘‹

Feel free to take a peak

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

How to rebuild initramfs on Fedora

Earlier today while performing the update on my Fedora desktop, I encountered an issue with the new kernel update. As a result, the initramfs was not generated for the new installed kernel. So, Iā€™ll share with you how to rebuild or generate the initramfs while fixing real issue on my Fedora workstation. First, here is an output showing the source of the issue. It might not be clear of whatā€™s going on, but thatā€™s okay as itā€™s not the main focus of this blog post....

August 21, 2024 Ā· 5 min Ā· 1000 words Ā· kenno

Process Life Cycle

A short while back, I had to do a revision about process life cycle in the operating system, Linux specifically. Last time that I had to learn about this topic was back in the good old days in college. I donā€™t know when I need to review it again, so I think itā€™s a good idea to dump what Iā€™ve learned including the references to this topic. Also, I will only focus mainly on the 5-state model....

August 3, 2024 Ā· 2 min Ā· 372 words Ā· kenno

Snapshot of LVM logical volume - a brief howto

Recently, after an OS updated and rebooted, I was not able to login to the desktop environment. When that happened, I thought to myself, ā€œI wish I could just do a quick EBS snapshot like I would on the cloud before running any OS updates.ā€ On my Linux desktop, the root volume is an LVM volume, I knew that snapshot was possible, but never tried to create one before. A friend at work encouraged that I should make use of it, and it was not that hard to get started....

July 26, 2024 Ā· 3 min Ā· 491 words Ā· kenno

Systemctl cat is cool

Sometimes we want to see the content of a Systemd unit file. One obvious way to do it is to just cat/vim the content of the unit file directly. For example, to display the content of systemd-tmpfiles-clean.timer, we can perform the following step: āžœ systemctl status systemd-tmpfiles-clean.timer | grep Loaded Loaded: loaded (/usr/lib/systemd/system/systemd-tmpfiles-clean.timer; static) āžœ cat /usr/lib/systemd/system/systemd-tmpfiles-clean.timer; # SPDX-License-Identifier: LGPL-2.1-or-later # # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2....

July 20, 2024 Ā· 2 min Ā· 306 words Ā· kenno