Refactor Drive Atlas with modular chassis templates and PCI path mapping
Major improvements: - Separated chassis types from server hostnames for better reusability - Implemented template-based layout system (10bay, large1) - Renamed medium2 to compute-storage-01 for clarity - All three Sliger CX471225 servers now use unified 10bay layout - Added comprehensive PCI path-based drive mapping system - Created diagnose-drives.sh helper script for mapping new servers - Added DEBUG mode for troubleshooting drive mappings Technical changes: - Replaced DRIVE_MAPPINGS with separate SERVER_MAPPINGS and CHASSIS_TYPES - Removed spare-10bay layout (all Sliger chassis use same template) - Improved drive detection and SMART data collection - Better error handling for missing drives and unmapped servers - Cleaner code structure with sectioned comments Documentation: - Complete rewrite of README with setup guide and troubleshooting - Added detailed todo.txt with action plan and technical notes - Documented Sliger CX471225 4U chassis specifications - Included step-by-step instructions for mapping new servers 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -108,31 +108,6 @@ generate_large1_layout() {
|
||||
EOF
|
||||
}
|
||||
|
||||
generate_spare_10bay_layout() {
|
||||
cat << 'EOF'
|
||||
┌─────────────────────────────────────────────────────────────┐
|
||||
│ Spare 10-Bay Chassis │
|
||||
│ (Not Currently Deployed) │
|
||||
│ │
|
||||
│ ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐ │
|
||||
│ │ 1 │ │ 2 │ │ 3 │ │ 4 │ │
|
||||
│ └────────────┘ └────────────┘ └────────────┘ └────────────┘ │
|
||||
│ │
|
||||
│ ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐ │
|
||||
│ │ 5 │ │ 6 │ │ 7 │ │ 8 │ │
|
||||
│ └────────────┘ └────────────┘ └────────────┘ └────────────┘ │
|
||||
│ │
|
||||
│ ┌─────────┐ │
|
||||
│ │ 9 │ │
|
||||
│ └─────────┘ │
|
||||
│ ┌─────────┐ │
|
||||
│ │ 10 │ │
|
||||
│ └─────────┘ │
|
||||
│ │
|
||||
└─────────────────────────────────────────────────────────────┘
|
||||
EOF
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Server-Specific Drive Mappings
|
||||
# Maps PCI paths to physical bay numbers for each server
|
||||
@@ -169,7 +144,7 @@ declare -A SERVER_MAPPINGS=(
|
||||
|
||||
declare -A CHASSIS_TYPES=(
|
||||
["compute-storage-01"]="10bay"
|
||||
["compute-storage-gpu-01"]="spare-10bay"
|
||||
["compute-storage-gpu-01"]="10bay"
|
||||
["storage-01"]="10bay"
|
||||
["large1"]="large1"
|
||||
["micro1"]="micro"
|
||||
@@ -230,9 +205,6 @@ case "$CHASSIS_TYPE" in
|
||||
"large1")
|
||||
generate_large1_layout
|
||||
;;
|
||||
"spare-10bay")
|
||||
generate_spare_10bay_layout
|
||||
;;
|
||||
"micro")
|
||||
echo "Micro server layout not yet implemented"
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user