Fix compute-storage-gpu-01 mapping: correct PCI address and bay order
Lint / Shell (shellcheck) (push) Successful in 9s
Lint / Shell (shellcheck) (push) Successful in 9s
- SATA controller is at 05:00.1, not 02:00.1 (all bays showed EMPTY) - SATA ports run in reverse order: ata-5=bay2, ata-4=bay3, ata-3=bay4, ata-2=bay5 - Boot SSD (ata-1) sits loose inside chassis; mapped as int-1 instead of a hot-swap bay - Add int- bay type support: shown in 10bay layout header and included in drive table Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+19
-8
@@ -431,6 +431,16 @@ generate_10bay_layout() {
|
||||
printf "│%-136s│\n" ""
|
||||
fi
|
||||
|
||||
# Internal (non-bay) drives if present
|
||||
local int_keys
|
||||
int_keys="$(printf '%s\n' "${!DRIVE_MAP[@]}" | grep -E '^int-' | sort)"
|
||||
if [[ -n "$int_keys" ]]; then
|
||||
while IFS= read -r int_key; do
|
||||
printf "│ %-134s│\n" " Internal (non-bay): ${DRIVE_MAP[$int_key]}"
|
||||
done <<< "$int_keys"
|
||||
printf "│%-136s│\n" ""
|
||||
fi
|
||||
|
||||
printf "│ %-134s│\n" " Front Hot-swap Bays:"
|
||||
printf "│%-136s│\n" ""
|
||||
|
||||
@@ -577,15 +587,16 @@ declare -A SERVER_MAPPINGS=(
|
||||
"
|
||||
|
||||
# compute-storage-gpu-01
|
||||
# Motherboard: ASUS PRIME B550-PLUS with AMD SATA controller at 02:00.1
|
||||
# 5 SATA ports + 1 M.2 NVMe slot
|
||||
# Motherboard: ASUS PRIME B550-PLUS with AMD SATA controller at 05:00.1
|
||||
# SATA ports run in reverse order for hot-swap bays (ata-5=bay2 .. ata-2=bay5)
|
||||
# ata-1 is the boot SSD sitting loose inside the chassis (not in a hot-swap bay)
|
||||
# sdf is USB/card reader - not mapped
|
||||
["compute-storage-gpu-01"]="
|
||||
pci-0000:02:00.1-ata-1 1
|
||||
pci-0000:02:00.1-ata-2 2
|
||||
pci-0000:02:00.1-ata-3 3
|
||||
pci-0000:02:00.1-ata-4 4
|
||||
pci-0000:02:00.1-ata-5 5
|
||||
pci-0000:05:00.1-ata-5 2
|
||||
pci-0000:05:00.1-ata-4 3
|
||||
pci-0000:05:00.1-ata-3 4
|
||||
pci-0000:05:00.1-ata-2 5
|
||||
pci-0000:05:00.1-ata-1 int-1
|
||||
pci-0000:0c:00.0-nvme-1 m2-1
|
||||
"
|
||||
|
||||
@@ -1046,7 +1057,7 @@ done
|
||||
|
||||
# Sort drives by bay position (numeric bays first, then m2 slots)
|
||||
# Combine numeric bays (sorted numerically) with m2 slots (sorted alphanumerically)
|
||||
all_bays="$(printf '%s\n' "${!DRIVE_MAP[@]}" | grep -E '^[0-9]+$' | sort -n; printf '%s\n' "${!DRIVE_MAP[@]}" | grep -E '^m2-' | sort)"
|
||||
all_bays="$(printf '%s\n' "${!DRIVE_MAP[@]}" | grep -E '^[0-9]+$' | sort -n; printf '%s\n' "${!DRIVE_MAP[@]}" | grep -E '^m2-' | sort; printf '%s\n' "${!DRIVE_MAP[@]}" | grep -E '^int-' | sort)"
|
||||
|
||||
# Cache lsblk data to reduce redundant calls
|
||||
# Get device sizes (whole disk only)
|
||||
|
||||
Reference in New Issue
Block a user