How to Run Redis in Podman Container

This is just a quick note on how to run Redis as a container using Podman on Ubuntu 22.04 (i.e. there will be no mention about SELinux.) Create a persistent volume for the Redis container I like storing all data/volume for containers under /srv/data. So I’ll create a sub-directory called redis-data under the same location. # mkdir -p /srv/data/redis-data Pull the Redis image # podman pull docker.io/redis Create and run the Redis container # podman run -d --name redis_server \ -v /srv/data/redis-data:/var/redis/data \ -p 6379:6379 redis Create systemd service for the Redis container I like creating a systemd service to enable/start the container....

February 22, 2023 · 1 min · 189 words · kenno

How to check cpu temp on Debian and Ubuntu

This is just a quick note for me to display CPU temperature on one of my fanless device which runs Debian. Install the required package lm-sensors Run the sensors command. Here is a sample output: root@pve:~# sensors coretemp-isa-0000 Adapter: ISA adapter Package id 0: +45.0°C (high = +105.0°C, crit = +105.0°C) Core 0: +37.0°C (high = +105.0°C, crit = +105.0°C) Core 1: +37.0°C (high = +105.0°C, crit = +105.0°C) Core 2: +37....

August 29, 2022 · 1 min · 105 words · kenno

How to Enable Persistent Logging for Systemd Journal

On RHEL 7/8, CentOS 7/8 and even Ubuntu (??), by default the journal log data is stored only in memory (/run/log/journal/ directory). There are 2 ways to retain the journal log messages. The first one is to set the variable Storage to persistent in the /etc/systemd/journald.conf. [Journal] Storage=persistent Then restart the systemd-journald service. Another solution is simpler and it looks like it’s the recommended way of achieving this. All we have to do is to create a directory, /var/log/journal (with correct ownership and permission), and journald will automatically store the log messages there....

August 29, 2020 · 2 min · 418 words · kenno

Getting rid of old initrd files on Ubuntu

Occasionally I see some of our Ubuntu machines having /boot partition filled up by the initrd files generated from old kernels which no longer were no longer installed on the machines. root@matht232:/boot# uname -a Linux matht232 5.3.0-40-generic #32~18.04.1-Ubuntu SMP Mon Feb 3 14:05:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux root@matht232:/boot# dpkg -l linux-image-\* | grep ^ii ii linux-image-5.3.0-40-generic 5.3.0-40.32~18.04.1 amd64 Signed kernel image generic ii linux-image-generic-hwe-18.04-edge 5.3.0.46.102 amd64 Generic Linux kernel image root@matht232:/boot# ls -1 /boot config-5....

April 21, 2020 · 2 min · 252 words · kenno

How to Label an XFS Filesystem

When I plugged in an external drive to my laptop, the drive was displayed as a string consits random letters and numbers. Here is an example: ❯❯❯ df -Th | grep sdb /dev/sdb1 xfs 481M 26M 456M 6% /run/media/kenno/5428b182-c92e-466b-89d2-b5b31b80ba48 Though the drive worked perfectly fine, I think it’s ugly, and I wanted to properly give it a good name. Let’s call it externo. But how to do this? You may not believe it, I forgot how to do this....

October 27, 2019 · 2 min · 304 words · kenno