|
| 1 | +#!/bin/bash |
| 2 | +# Verify secondary disk configuration on all Talos worker nodes |
| 3 | + |
| 4 | +set -e |
| 5 | + |
| 6 | +# Worker node IPs (regular + GPU workers) |
| 7 | +WORKERS=( |
| 8 | + "192.168.10.111" # talos-o31-0s1 (regular worker) |
| 9 | + "192.168.10.112" # talos-w4s-zts (regular worker) |
| 10 | + "192.168.10.113" # talos-blj-72f (GPU worker) |
| 11 | + "192.168.10.114" # talos-kyk-7ek (GPU worker) |
| 12 | +) |
| 13 | + |
| 14 | +echo "🔍 Checking disk configuration on all worker nodes..." |
| 15 | +echo "==================================================" |
| 16 | + |
| 17 | +for node in "${WORKERS[@]}"; do |
| 18 | + echo "" |
| 19 | + echo "📍 Node: $node" |
| 20 | + echo "---" |
| 21 | + |
| 22 | + # Check if /dev/sdb exists |
| 23 | + echo " ✓ Checking /dev/sdb disk:" |
| 24 | + if talosctl -n "$node" get disks 2>/dev/null | grep -q "sdb"; then |
| 25 | + talosctl -n "$node" get disks 2>/dev/null | grep "sdb" | awk '{print " - " $3 " (" $6 ")"}' |
| 26 | + else |
| 27 | + echo " ❌ /dev/sdb not found" |
| 28 | + fi |
| 29 | + |
| 30 | + # Check if partition exists |
| 31 | + echo " ✓ Checking /dev/sdb1 partition:" |
| 32 | + if talosctl -n "$node" get discoveredvolumes 2>/dev/null | grep -q "sdb1"; then |
| 33 | + talosctl -n "$node" get discoveredvolumes 2>/dev/null | grep "sdb1" | awk '{print " - " $3 " - " $6 " - " $7}' |
| 34 | + else |
| 35 | + echo " ❌ /dev/sdb1 partition not found" |
| 36 | + fi |
| 37 | + |
| 38 | + # Check if mount point exists |
| 39 | + echo " ✓ Checking /var/mnt/longhorn_sdb mount:" |
| 40 | + if talosctl -n "$node" ls /var/mnt/longhorn_sdb 2>&1 | grep -q "no such file or directory"; then |
| 41 | + echo " ❌ Mount point NOT configured (needs reboot to apply config)" |
| 42 | + else |
| 43 | + echo " ✅ Mount point exists!" |
| 44 | + talosctl -n "$node" ls /var/mnt/longhorn_sdb 2>/dev/null | tail -3 |
| 45 | + fi |
| 46 | + |
| 47 | + # Check /var/lib/longhorn |
| 48 | + echo " ✓ Checking /var/lib/longhorn:" |
| 49 | + if talosctl -n "$node" ls /var/lib/longhorn 2>/dev/null | grep -q "longhorn-disk.cfg"; then |
| 50 | + echo " ✅ Longhorn directory configured" |
| 51 | + else |
| 52 | + echo " ⚠️ Longhorn directory may not be ready" |
| 53 | + fi |
| 54 | +done |
| 55 | + |
| 56 | +echo "" |
| 57 | +echo "==================================================" |
| 58 | +echo "🎯 Summary:" |
| 59 | +echo " - If mount points are missing, reboot nodes to apply Omni config patches" |
| 60 | +echo " - After reboot, run this script again to verify" |
| 61 | +echo "" |
| 62 | +echo " Reboot command: talosctl -n <node-ip> reboot" |
| 63 | +echo "==================================================" |
0 commit comments