Fix PCI path mappings and line endings for compute-storage-01
Hardware discovered: - LSI SAS3008 HBA at 01:00.0 (bays 5-10 via mini-SAS HD cables) - AMD SATA controller at 0d:00.0 (bays 1-4) - NVMe at 0e:00.0 (M.2 slot) Changes: - Updated SERVER_MAPPINGS with correct PCI paths based on actual hardware - Fixed diagnose-drives.sh CRLF line endings (was causing script errors) - Updated README with accurate controller information - Mapped all 10 bays plus M.2 NVMe slot - Added detailed cable mapping comments from user documentation The old mapping referenced non-existent controller 0c:00.0. Now uses actual SAS PHY paths and ATA port numbers that match physical bays. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -47,10 +47,10 @@ bash <(wget -qO- http://10.10.10.63:3000/LotusGuild/driveAtlas/raw/branch/main/d
|
|||||||
- **Chassis:** Sliger CX471225 4U (10-Bay Hot-swap)
|
- **Chassis:** Sliger CX471225 4U (10-Bay Hot-swap)
|
||||||
- **Motherboard:** B650D4U3-2Q/BCM
|
- **Motherboard:** B650D4U3-2Q/BCM
|
||||||
- **Controllers:**
|
- **Controllers:**
|
||||||
- 0c:00.0 - Front hot-swap bays
|
- 01:00.0 - LSI SAS3008 HBA (bays 5-10 via 2x mini-SAS HD)
|
||||||
- 0d:00.0 - M.2 NVMe slot
|
- 0d:00.0 - AMD SATA controller (bays 1-4)
|
||||||
- 0b:00.0 - USB controller
|
- 0e:00.0 - M.2 NVMe slot
|
||||||
- **Status:** Partially mapped (bays 3-6 only)
|
- **Status:** Fully mapped
|
||||||
|
|
||||||
#### storage-01
|
#### storage-01
|
||||||
- **Chassis:** Sliger CX471225 4U (10-Bay Hot-swap)
|
- **Chassis:** Sliger CX471225 4U (10-Bay Hot-swap)
|
||||||
|
|||||||
@@ -1,59 +1,59 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Drive Atlas Diagnostic Script
|
# Drive Atlas Diagnostic Script
|
||||||
# Run this on each server to gather PCI path information
|
# Run this on each server to gather PCI path information
|
||||||
|
|
||||||
echo "=== Server Information ==="
|
echo "=== Server Information ==="
|
||||||
echo "Hostname: $(hostname)"
|
echo "Hostname: $(hostname)"
|
||||||
echo "Date: $(date)"
|
echo "Date: $(date)"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
echo "=== All /dev/disk/by-path/ entries ==="
|
echo "=== All /dev/disk/by-path/ entries ==="
|
||||||
ls -la /dev/disk/by-path/ | grep -v "part" | sort
|
ls -la /dev/disk/by-path/ | grep -v "part" | sort
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
echo "=== Organized by PCI Address ==="
|
echo "=== Organized by PCI Address ==="
|
||||||
for path in /dev/disk/by-path/*; do
|
for path in /dev/disk/by-path/*; do
|
||||||
if [ -L "$path" ]; then
|
if [ -L "$path" ]; then
|
||||||
# Skip partitions
|
# Skip partitions
|
||||||
if [[ "$path" =~ -part[0-9]+$ ]]; then
|
if [[ "$path" =~ -part[0-9]+$ ]]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
basename_path=$(basename "$path")
|
basename_path=$(basename "$path")
|
||||||
target=$(readlink -f "$path")
|
target=$(readlink -f "$path")
|
||||||
device=$(basename "$target")
|
device=$(basename "$target")
|
||||||
|
|
||||||
echo "Path: $basename_path"
|
echo "Path: $basename_path"
|
||||||
echo " -> Device: $device"
|
echo " -> Device: $device"
|
||||||
|
|
||||||
# Try to get size
|
# Try to get size
|
||||||
if [ -b "$target" ]; then
|
if [ -b "$target" ]; then
|
||||||
size=$(lsblk -d -n -o SIZE "$target" 2>/dev/null)
|
size=$(lsblk -d -n -o SIZE "$target" 2>/dev/null)
|
||||||
echo " -> Size: $size"
|
echo " -> Size: $size"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Try to get SMART info for model
|
# Try to get SMART info for model
|
||||||
if command -v smartctl >/dev/null 2>&1; then
|
if command -v smartctl >/dev/null 2>&1; then
|
||||||
model=$(sudo smartctl -i "$target" 2>/dev/null | grep "Device Model\|Model Number" | cut -d: -f2 | xargs)
|
model=$(sudo smartctl -i "$target" 2>/dev/null | grep "Device Model\|Model Number" | cut -d: -f2 | xargs)
|
||||||
if [ -n "$model" ]; then
|
if [ -n "$model" ]; then
|
||||||
echo " -> Model: $model"
|
echo " -> Model: $model"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "=== PCI Devices with Storage Controllers ==="
|
echo "=== PCI Devices with Storage Controllers ==="
|
||||||
lspci | grep -i "storage\|raid\|sata\|sas\|nvme"
|
lspci | grep -i "storage\|raid\|sata\|sas\|nvme"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
echo "=== Current Block Devices ==="
|
echo "=== Current Block Devices ==="
|
||||||
lsblk -d -o NAME,SIZE,TYPE,TRAN | grep -v "rbd\|loop"
|
lsblk -d -o NAME,SIZE,TYPE,TRAN | grep -v "rbd\|loop"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
echo "=== Recommendations ==="
|
echo "=== Recommendations ==="
|
||||||
echo "1. Note the PCI addresses (e.g., 0c:00.0) of your storage controllers"
|
echo "1. Note the PCI addresses (e.g., 0c:00.0) of your storage controllers"
|
||||||
echo "2. For each bay, physically identify which drive is in it"
|
echo "2. For each bay, physically identify which drive is in it"
|
||||||
echo "3. Match the PCI path pattern to the bay number"
|
echo "3. Match the PCI path pattern to the bay number"
|
||||||
echo "4. Example: pci-0000:0c:00.0-ata-1 might be bay 1 on controller 0c:00.0"
|
echo "4. Example: pci-0000:0c:00.0-ata-1 might be bay 1 on controller 0c:00.0"
|
||||||
|
|||||||
@@ -116,17 +116,24 @@ EOF
|
|||||||
|
|
||||||
declare -A SERVER_MAPPINGS=(
|
declare -A SERVER_MAPPINGS=(
|
||||||
# compute-storage-01 (formerly medium2)
|
# compute-storage-01 (formerly medium2)
|
||||||
# Motherboard: B650D4U3-2Q/BCM
|
# Motherboard: B650D4U3-2Q/BCM with AMD SATA controller
|
||||||
# Controller at 0c:00.0 for hot-swap bays
|
# HBA: LSI SAS3008 at 01:00.0 (mini-SAS HD ports)
|
||||||
# Controller at 0d:00.0 for M.2 NVMe
|
# Cable mapping from user notes:
|
||||||
|
# - Mobo SATA: top-right=bay1, bottom-right=bay2, bottom-left=bay3, top-left=bay4
|
||||||
|
# - HBA bottom mini-SAS: bays 5,6,7,8
|
||||||
|
# - HBA top mini-SAS: bays 9,10
|
||||||
["compute-storage-01"]="
|
["compute-storage-01"]="
|
||||||
pci-0000:0c:00.0-ata-3 5
|
pci-0000:0d:00.0-ata-3 1
|
||||||
pci-0000:0c:00.0-ata-4 6
|
pci-0000:0d:00.0-ata-4 2
|
||||||
pci-0000:0c:00.0-ata-1 3
|
pci-0000:0d:00.0-ata-2 3
|
||||||
pci-0000:0c:00.0-ata-2 4
|
pci-0000:0d:00.0-ata-1 4
|
||||||
pci-0000:0d:00.0-nvme-1 m2-1
|
pci-0000:01:00.0-sas-phy2-lun-0 5
|
||||||
pci-0000:0b:00.0-usb-0:3:1.0-scsi-0:0:0:0 usb1
|
pci-0000:01:00.0-sas-phy3-lun-0 6
|
||||||
pci-0000:0b:00.0-usb-0:4:1.0-scsi-0:0:0:0 usb2
|
pci-0000:01:00.0-sas-phy4-lun-0 7
|
||||||
|
pci-0000:01:00.0-sas-phy5-lun-0 8
|
||||||
|
pci-0000:01:00.0-sas-phy6-lun-0 9
|
||||||
|
pci-0000:01:00.0-sas-phy7-lun-0 10
|
||||||
|
pci-0000:0e:00.0-nvme-1 m2-1
|
||||||
"
|
"
|
||||||
|
|
||||||
# storage-01
|
# storage-01
|
||||||
|
|||||||
11
test-paths.sh
Normal file
11
test-paths.sh
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "=== Checking /dev/disk/by-path/ ==="
|
||||||
|
ls -la /dev/disk/by-path/ | grep -v "part" | grep "pci-0000:0c:00.0" | head -20
|
||||||
|
echo ""
|
||||||
|
echo "=== Checking if paths exist from mapping ==="
|
||||||
|
echo "pci-0000:0c:00.0-ata-3:"
|
||||||
|
ls -la /dev/disk/by-path/pci-0000:0c:00.0-ata-3 2>&1
|
||||||
|
|
||||||
|
echo "pci-0000:0c:00.0-ata-1:"
|
||||||
|
ls -la /dev/disk/by-path/pci-0000:0c:00.0-ata-1 2>&1
|
||||||
Reference in New Issue
Block a user