Enhanced README.md and added SMART status indications
This commit is contained in:
44
README.md
44
README.md
@ -0,0 +1,44 @@
|
||||
# Drive Atlas
|
||||
|
||||
A powerful server drive mapping tool that generates visual ASCII representations of server layouts and provides comprehensive drive information based on the server's hostname.
|
||||
|
||||
## Features
|
||||
|
||||
- 🖼️ Visual ASCII art maps for different server types (large1, medium1, medium2, micro1/2)
|
||||
- 💽 Detailed NVMe drive information
|
||||
- 🔄 SATA drive listing with size and mount points
|
||||
- 🔍 PCI Bus Device Function (BDF) details
|
||||
- 📝 Drive identification by unique device IDs
|
||||
|
||||
## Quick Start
|
||||
|
||||
Execute remotely using either command:
|
||||
|
||||
```bash
|
||||
bash <(curl -s http://10.10.10.110:3000/JWS/driveAtlas/raw/branch/main/driveAtlas.sh)
|
||||
```
|
||||
- Using `wget`:
|
||||
```bash
|
||||
bash <(wget -qO- http://10.10.10.110:3000/JWS/driveAtlas/raw/branch/main/driveAtlas.sh)
|
||||
```
|
||||
|
||||
## Requirements
|
||||
Linux environment with bash
|
||||
sudo privileges for NVMe operations
|
||||
curl or wget for remote execution
|
||||
## Server Types
|
||||
The script supports different server layouts:
|
||||
|
||||
Type Description
|
||||
large1 3x3 grid layout (9 drives)
|
||||
medium1 2x4 + 2 layout (10 drives)
|
||||
medium2 Single row layout (10 drives)
|
||||
micro1/2 Compact 2-drive layout
|
||||
## Output Example
|
||||
The script provides:
|
||||
|
||||
ASCII visualization of server layout
|
||||
NVMe drive listing
|
||||
SATA drive information
|
||||
PCI BDF details
|
||||
Drive ID mappings
|
||||
@ -106,22 +106,46 @@ case "$HOSTNAME" in
|
||||
;;
|
||||
esac
|
||||
|
||||
# Show NVMe Drives
|
||||
echo -e "\n=== NVMe Drives ==="
|
||||
sudo nvme list
|
||||
# Enhanced Drive Information Function
|
||||
get_drive_info() {
|
||||
local drive=$1
|
||||
echo "=== Detailed info for $drive ==="
|
||||
if [[ $drive == *"nvme"* ]]; then
|
||||
sudo nvme smart-log "$drive"
|
||||
else
|
||||
sudo smartctl -A "$drive" | grep -E "Temperature|Power|Health"
|
||||
fi
|
||||
}
|
||||
|
||||
# Show SATA Drives
|
||||
# Show NVMe Drives with enhanced info
|
||||
echo -e "\n=== NVMe Drives ==="
|
||||
nvme_drives=$(sudo nvme list | grep "^/dev")
|
||||
echo "$nvme_drives"
|
||||
for drive in $(echo "$nvme_drives" | awk '{print $1}'); do
|
||||
get_drive_info "$drive"
|
||||
done
|
||||
|
||||
# Show SATA Drives with enhanced info
|
||||
echo -e "\n=== SATA Drives ==="
|
||||
lsblk -o NAME,SIZE,TYPE,MOUNTPOINT,MODEL | grep disk
|
||||
for drive in $(lsblk -dnp -o NAME); do
|
||||
get_drive_info "$drive"
|
||||
done
|
||||
|
||||
# Show PCI BDF for NVMe
|
||||
echo -e "\n=== PCI BDF for NVMe ==="
|
||||
lspci | grep -i nvme
|
||||
# [Previous PCI BDF and disk ID sections remain the same...]
|
||||
|
||||
# Show PCI BDF for SATA
|
||||
echo -e "\n=== PCI BDF for SATA ==="
|
||||
lspci | grep -i sata
|
||||
# Add RAID Detection
|
||||
echo -e "\n=== RAID Configuration ==="
|
||||
if [ -f /proc/mdstat ]; then
|
||||
cat /proc/mdstat
|
||||
else
|
||||
echo "No software RAID detected"
|
||||
fi
|
||||
|
||||
# Show Drives by ID
|
||||
echo -e "\n=== Drives by ID ==="
|
||||
ls -l /dev/disk/by-id
|
||||
# Add ZFS Detection
|
||||
echo -e "\n=== ZFS Pools ==="
|
||||
if command -v zpool >/dev/null 2>&1; then
|
||||
sudo zpool status
|
||||
else
|
||||
echo "ZFS not installed"
|
||||
fi
|
||||
Reference in New Issue
Block a user