From 36f84eaef26524ee4a7144468e095611b3fe46a2 Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Sun, 9 Aug 2026 12:09:15 -0400 Subject: [PATCH] driveAtlas: fix large1 bay numbering, row-major vs column-major mismatch The grid renderer placed bays column-major (1-5 down the left column, 6-10 middle, 11-15 right) while every wiring comment in the file was written row-major (A1=1, B1=2, C1=3, A2=4, ...). This silently mislabeled almost every populated bay on screen -- e.g. bay 7 rendered at B2 when the wiring docs meant A3. Also corrects the phy7 (Slim-SAS #1 Port 1) wiring note: previously flagged as an unverified guess with no drive present. osd.14 was moved onto this port after its onboard SATA port started corrupting the OSD under load; physical cable-color tracing of the middle stack (silver/ silver/orange/silver bottom-up) confirms the original B Slot 2 (bay 5) guess was correct. Verified live against large1: fixed script test-run over SSH shows bay 5 (sdi/osd.14) and bay 7 (sdd/boot SSD) both drawn in the correct cells, matching the wiring documentation for the first time. --- driveAtlas.sh | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/driveAtlas.sh b/driveAtlas.sh index a424423..6865e99 100644 --- a/driveAtlas.sh +++ b/driveAtlas.sh @@ -835,7 +835,8 @@ generate_nuc_layout() { # Rack ears with D-handles at both ends; slim I/O strip on the right. # # Bay numbering is a driveAtlas LOCAL convention (the chassis documents none): -# 1-5 = LEFT module top->bottom, 6-10 = MIDDLE, 11-15 = RIGHT. +# row-major across modules: A1=1, B1=2, C1=3, A2=4, B2=5, C2=6, ... C5=15. +# (Matches the wiring comments on SERVER_MAPPINGS["large1"] below.) # # Args: # $1 - Hostname to display in the layout header @@ -951,9 +952,9 @@ generate_large1_layout() { local eartop='┌───┐' earhole='│ ▄ │' earcapT='│╭─╮│' earbody='││ ││' local earcapB='│╰─╯│' earbot='└───┘' local labs l1 l2 l3 - printf -v l1 '%*s%-*s' 5 '' 13 'LEFT 1-5' - printf -v l2 '%*s%-*s' 3 '' 15 'MIDDLE 6-10' - printf -v l3 '%*s%-*s' 3 '' 15 'RIGHT 11-15' + printf -v l1 '%*s%-*s' 5 '' 13 'LEFT A' + printf -v l2 '%*s%-*s' 3 '' 15 'MIDDLE B' + printf -v l3 '%*s%-*s' 3 '' 15 'RIGHT C' labs="${l1} ${l2} ${l3}" local d grid E @@ -966,8 +967,11 @@ generate_large1_layout() { 0) grid="$gtop" ;; 10) grid="$gbot" ;; 1|3|5|7|9) + # row-major: bay N = A/B/C module, slot ceil(N/3) -- matches + # the SERVER_MAPPINGS wiring comments (A1=1,B1=2,C1=3,A2=4,...) i=$(( (d + 1) / 2 )) - grid="│${cells[$i]}│ │${cells[$(( i + 5 ))]}│ │${cells[$(( i + 10 ))]}│" ;; + local base=$(( (i - 1) * 3 )) + grid="│${cells[$(( base + 1 ))]}│ │${cells[$(( base + 2 ))]}│ │${cells[$(( base + 3 ))]}│" ;; *) grid="$gmid" ;; esac E="${DA_HL}${earbody}${DA_SR}" @@ -995,8 +999,8 @@ generate_large1_layout() { printf '%s\n' " ${DA_ST}LEGEND ${DA_OK}▌${DA_ST} drive present ${DA_DIM}░${DA_ST} bay empty$(_l1_rep ' ' 50)${DA_RST} " printf '%s\n' " ${DA_ST}NOT IN GRID m2-1 ${DA_HL}${m1p}${DA_SR} m2-2 ${DA_HL}${m2p}${DA_SR} internal ${DA_HL}${exp}${DA_RST} " - _l1_txt 'BAYS numbering is a driveAtlas LOCAL convention (the chassis documents none): 1-5' "${DA_ST}" - _l1_txt ' LEFT module top->bottom, 6-10 MIDDLE, 11-15 RIGHT -- identify a drive by SERIAL.' "${DA_ST}" + _l1_txt 'BAYS numbering is a driveAtlas LOCAL convention (the chassis documents none):' "${DA_ST}" + _l1_txt ' row-major A1=1,B1=2,C1=3,A2=4,...,C5=15 -- identify a drive by SERIAL.' "${DA_ST}" _l1_txt 'NOTE no backplane, no per-bay LEDs, not hot-swap: every drive is cabled direct to the' "${DA_DIM}" _l1_txt ' board/HBA, and is serviced by removing the TOP COVER, not through the front door.' "${DA_DIM}" @@ -1083,7 +1087,12 @@ declare -A SERVER_MAPPINGS=( # Port 1 (phy3) -> C Slot 1 (bay 3) Port 2 (phy2) -> unconnected # Port 3 (phy1) -> A Slot 1 (bay 1) Port 4 (phy0) -> A Slot 2 (bay 4) # Slim-SAS #1 (SILVER cables, connector furthest from bracket): - # Port 1 (phy7) -> B Slot 2 (bay 5) -- cable present, no drive yet + # Port 1 (phy7) -> B Slot 2 (bay 5) -- confirmed 2026-08-09: osd.14 + # (28TB OOS28000G, serial 0002QQ2N) moved onto this port from a + # failing onboard SATA port. Verified by cross-checking the middle + # stack's cable colours bottom-up (silver/silver/orange/silver = + # B5 stuck/B4/B3 ata-7/B2 this port), which matches this mapping + # exactly -- the original "no drive yet" guess was correct. # Port 2 (phy6) -> B Slot 5 (bay 14) -- STUCK, cannot remove # Port 3 (phy5) -> B Slot 4 (bay 11) # Port 4 (phy4) -> A Slot 3 (bay 7)