From d49046aed531bc9a4bd1055e6c0f67cd30d97a75 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 28 Jul 2025 15:10:43 +0300 Subject: Update content for html --- about/resources.html | 194 ++++++++++----------- ...5-07-14-f3s-kubernetes-with-freebsd-part-6.html | 72 ++++---- gemfeed/atom.xml | 74 ++++---- index.html | 2 +- uptime-stats.html | 2 +- 5 files changed, 182 insertions(+), 162 deletions(-) diff --git a/about/resources.html b/about/resources.html index ee592f57..45b3fb17 100644 --- a/about/resources.html +++ b/about/resources.html @@ -50,107 +50,107 @@ In random order:


Technical references



I didn't read them from the beginning to the end, but I am using them to look up things. The books are in random order:


Self-development and soft-skills books



In random order:


Here are notes of mine for some of the books

@@ -159,22 +159,22 @@ Some of these were in-person with exams; others were online learning lectures only. In random order:


Technical guides



@@ -182,8 +182,8 @@

Podcasts



@@ -192,32 +192,32 @@ In random order:


Podcasts I liked



I liked them but am not listening to them anymore. The podcasts have either "finished" (no more episodes) or I stopped listening to them due to time constraints or a shift in my interests.


Newsletters I like



@@ -226,25 +226,25 @@

Magazines I like(d)



This is a mix of tech I like(d). I may not be a current subscriber, but now and then, I buy an issue. In random order:


Formal education


diff --git a/gemfeed/2025-07-14-f3s-kubernetes-with-freebsd-part-6.html b/gemfeed/2025-07-14-f3s-kubernetes-with-freebsd-part-6.html index 85d007e8..b58eb813 100644 --- a/gemfeed/2025-07-14-f3s-kubernetes-with-freebsd-part-6.html +++ b/gemfeed/2025-07-14-f3s-kubernetes-with-freebsd-part-6.html @@ -1602,7 +1602,6 @@ http://www.gnu.org/software/src-highlite --> MOUNT_POINT="/data/nfs/k3svolumes" LOCK_FILE="/var/run/nfs-mount-check.lock" -STATE_FILE="/var/run/nfs-mount.state" # Use a lock file to prevent concurrent runs if [ -f "$LOCK_FILE" ]; then @@ -1611,46 +1610,57 @@ STATE_FILE="/var/run/nfs-mount.state" touch "$LOCK_FILE" trap "rm -f $LOCK_FILE" EXIT -remount_it () { - # Try to fix - echo "Attempting to fix/remount NFS mount at $(date)" | systemd-cat -t nfs-monitor -p notice - umount -f "$MOUNT_POINT" 2>/dev/null - sleep 1 +fix_mount () { + echo "Attempting to remount NFS mount $MOUNT_POINT" + if mount -o remount -f "$MOUNT_POINT" 2>/dev/null; then + echo "Remount command issued for $MOUNT_POINT" + else + echo "Failed to remount NFS mount $MOUNT_POINT" + fi - if mount "$MOUNT_POINT"; then - echo "NFS mount fixed at $(date)" | systemd-cat -t nfs-monitor -p info - rm -f "$STATE_FILE" + echo "Checking if $MOUNT_POINT is a mountpoint" + if mountpoint "$MOUNT_POINT" >/dev/null 2>&1; then + echo "$MOUNT_POINT is a valid mountpoint" else - echo "Failed to fix NFS mount at $(date)" | systemd-cat -t nfs-monitor -p err + echo "$MOUNT_POINT is not a valid mountpoint, attempting mount" + if mount "$MOUNT_POINT"; then + echo "Successfully mounted $MOUNT_POINT" + return + else + echo "Failed to mount $MOUNT_POINT" + fi fi -} -# Quick check - ensure it's actually mounted -if ! mountpoint -q "$MOUNT_POINT"; then - echo "NFS mount not found at $(date)" | systemd-cat -t nfs-monitor -p err - remount_it -fi + echo "Attempting to unmount $MOUNT_POINT" + if umount -f "$MOUNT_POINT" 2>/dev/null; then + echo "Successfully unmounted $MOUNT_POINT" + else + echo "Failed to unmount $MOUNT_POINT (it might not be mounted)" + fi -# Quick check - try to stat a directory with a very short timeout -if timeout 2s stat "$MOUNT_POINT" >/dev/null 2>&1; then - # Mount appears healthy - if [ -f "$STATE_FILE" ]; then - # Was previously unhealthy, log recovery - echo "NFS mount recovered at $(date)" | systemd-cat -t nfs-monitor -p info - rm -f "$STATE_FILE" + echo "Attempting to mount $MOUNT_POINT" + if mount "$MOUNT_POINT"; then + echo "NFS mount $MOUNT_POINT mounted successfully" + return + else + echo "Failed to mount NFS mount $MOUNT_POINT" fi - exit 0 -fi -# Mount is unhealthy -if [ ! -f "$STATE_FILE" ]; then - # First detection of unhealthy state - echo "NFS mount unhealthy detected at $(date)" | systemd-cat -t nfs-monitor -p warning - touch "$STATE_FILE" + echo "Failed to fix NFS mount $MOUNT_POINT" + exit 1 +} + +if ! mountpoint "$MOUNT_POINT" >/dev/null 2>&1; then + echo "NFS mount $MOUNT_POINT not found" + fix_mount fi -remount_it +if ! timeout 2s stat "$MOUNT_POINT" >/dev/null 2>&1; then + echo "NFS mount $MOUNT_POINT appears to be unresponsive" + fix_mount +fi EOF + [root@r0 ~]# chmod +x /usr/local/bin/check-nfs-mount.sh
diff --git a/gemfeed/atom.xml b/gemfeed/atom.xml index dc1c83bb..86fbc6ea 100644 --- a/gemfeed/atom.xml +++ b/gemfeed/atom.xml @@ -1,6 +1,6 @@ - 2025-07-28T14:27:18+03:00 + 2025-07-28T15:09:21+03:00 foo.zone feed To be in the .zone! @@ -1609,7 +1609,6 @@ http://www.gnu.org/software/src-highlite --> MOUNT_POINT="/data/nfs/k3svolumes" LOCK_FILE="/var/run/nfs-mount-check.lock" -STATE_FILE="/var/run/nfs-mount.state" # Use a lock file to prevent concurrent runs if [ -f "$LOCK_FILE" ]; then @@ -1618,46 +1617,57 @@ STATE_FILE="/var/run/nfs-mount.state" touch "$LOCK_FILE" trap "rm -f $LOCK_FILE" EXIT -remount_it () { - # Try to fix - echo "Attempting to fix/remount NFS mount at $(date)" | systemd-cat -t nfs-monitor -p notice - umount -f "$MOUNT_POINT" 2>/dev/null - sleep 1 +fix_mount () { + echo "Attempting to remount NFS mount $MOUNT_POINT" + if mount -o remount -f "$MOUNT_POINT" 2>/dev/null; then + echo "Remount command issued for $MOUNT_POINT" + else + echo "Failed to remount NFS mount $MOUNT_POINT" + fi - if mount "$MOUNT_POINT"; then - echo "NFS mount fixed at $(date)" | systemd-cat -t nfs-monitor -p info - rm -f "$STATE_FILE" + echo "Checking if $MOUNT_POINT is a mountpoint" + if mountpoint "$MOUNT_POINT" >/dev/null 2>&1; then + echo "$MOUNT_POINT is a valid mountpoint" else - echo "Failed to fix NFS mount at $(date)" | systemd-cat -t nfs-monitor -p err + echo "$MOUNT_POINT is not a valid mountpoint, attempting mount" + if mount "$MOUNT_POINT"; then + echo "Successfully mounted $MOUNT_POINT" + return + else + echo "Failed to mount $MOUNT_POINT" + fi fi -} -# Quick check - ensure it's actually mounted -if ! mountpoint -q "$MOUNT_POINT"; then - echo "NFS mount not found at $(date)" | systemd-cat -t nfs-monitor -p err - remount_it -fi + echo "Attempting to unmount $MOUNT_POINT" + if umount -f "$MOUNT_POINT" 2>/dev/null; then + echo "Successfully unmounted $MOUNT_POINT" + else + echo "Failed to unmount $MOUNT_POINT (it might not be mounted)" + fi -# Quick check - try to stat a directory with a very short timeout -if timeout 2s stat "$MOUNT_POINT" >/dev/null 2>&1; then - # Mount appears healthy - if [ -f "$STATE_FILE" ]; then - # Was previously unhealthy, log recovery - echo "NFS mount recovered at $(date)" | systemd-cat -t nfs-monitor -p info - rm -f "$STATE_FILE" + echo "Attempting to mount $MOUNT_POINT" + if mount "$MOUNT_POINT"; then + echo "NFS mount $MOUNT_POINT mounted successfully" + return + else + echo "Failed to mount NFS mount $MOUNT_POINT" fi - exit 0 -fi -# Mount is unhealthy -if [ ! -f "$STATE_FILE" ]; then - # First detection of unhealthy state - echo "NFS mount unhealthy detected at $(date)" | systemd-cat -t nfs-monitor -p warning - touch "$STATE_FILE" + echo "Failed to fix NFS mount $MOUNT_POINT" + exit 1 +} + +if ! mountpoint "$MOUNT_POINT" >/dev/null 2>&1; then + echo "NFS mount $MOUNT_POINT not found" + fix_mount fi -remount_it +if ! timeout 2s stat "$MOUNT_POINT" >/dev/null 2>&1; then + echo "NFS mount $MOUNT_POINT appears to be unresponsive" + fix_mount +fi EOF + [root@r0 ~]# chmod +x /usr/local/bin/check-nfs-mount.sh
diff --git a/index.html b/index.html index d564f950..a8c48bce 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@

Hello!



-This site was generated at 2025-07-28T14:27:18+03:00 by Gemtexter
+This site was generated at 2025-07-28T15:09:21+03:00 by Gemtexter

Welcome to the foo.zone!

diff --git a/uptime-stats.html b/uptime-stats.html index 8a490a80..b044cae9 100644 --- a/uptime-stats.html +++ b/uptime-stats.html @@ -13,7 +13,7 @@

My machine uptime stats



-This site was last updated at 2025-07-28T14:27:18+03:00
+This site was last updated at 2025-07-28T15:09:21+03:00

The following stats were collected via uptimed on all of my personal computers over many years and the output was generated by guprecords, the global uptime records stats analyser of mine.

-- cgit v1.2.3