added physical mapping

This commit is contained in:
2025-03-01 12:22:15 -05:00
parent 81d7d17370
commit d9a7a13bcd

View File

@ -32,6 +32,25 @@ get_drives_info() {
done
}
# Get physical slot mapping from system
get_physical_mapping() {
# Map NVMe drives
local nvme_info=$(ls -l /dev/disk/by-path/pci-0000:0d:00.0* 2>/dev/null)
# Map SATA hot-swap bays using sg_ses or other tools
local hotswap_info=$(ls -l /dev/disk/by-path/pci-0000:0c:00.0-ata-* 2>/dev/null)
# Map USB devices
local usb_info=$(ls -l /dev/disk/by-path/pci-0000:0b:00.0-usb* 2>/dev/null)
# Use smartctl to get drive details
for drive in $(echo "$hotswap_info" | awk -F'/' '{print $NF}'); do
local smart_info=$(get_drive_smart_info "$drive")
local size=$(get_drive_details "$drive")
# Map drive details to physical location
done
}
# Define the ASCII art maps
large1='''
┌─────────────────────────────────────────────────────────────┐