diff --git a/driveAtlas.sh b/driveAtlas.sh index 876b84a..343dcba 100644 --- a/driveAtlas.sh +++ b/driveAtlas.sh @@ -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)