Files
Sankofa/scripts/verify-r630-disks.sh
defiQUG 33d50fb91e
Some checks failed
API CI / API Lint (push) Successful in 47s
API CI / API Type Check (push) Failing after 47s
API CI / API Test (push) Successful in 1m0s
API CI / API Build (push) Failing after 50s
API CI / Build Docker Image (push) Has been skipped
Build Crossplane Provider / build (push) Failing after 5m51s
CD Pipeline / Deploy to Staging (push) Failing after 29s
CI Pipeline / Lint and Type Check (push) Failing after 36s
CI Pipeline / Build (push) Has been skipped
CI Pipeline / Test Backend (push) Failing after 1m33s
CI Pipeline / Test Frontend (push) Failing after 30s
CI Pipeline / Security Scan (push) Failing after 1m16s
Crossplane Provider CI / Go Test (push) Failing after 3m23s
Crossplane Provider CI / Go Lint (push) Failing after 7m27s
Crossplane Provider CI / Go Build (push) Failing after 3m27s
Deploy to Staging / Deploy to Staging (push) Failing after 30s
Portal CI / Portal Lint (push) Failing after 21s
Portal CI / Portal Type Check (push) Failing after 21s
Portal CI / Portal Test (push) Failing after 21s
Portal CI / Portal Build (push) Failing after 22s
Test Suite / frontend-tests (push) Failing after 30s
Test Suite / api-tests (push) Failing after 49s
Test Suite / blockchain-tests (push) Failing after 30s
Type Check / type-check (map[directory:. name:root]) (push) Failing after 23s
Type Check / type-check (map[directory:api name:api]) (push) Failing after 21s
Type Check / type-check (map[directory:portal name:portal]) (push) Failing after 19s
Validate Configuration Files / validate (push) Failing after 1m52s
CD Pipeline / Deploy to Production (push) Has been skipped
chore: consolidate local WIP (repo cleanup 20260707)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-07 09:41:34 -07:00

99 lines
3.1 KiB
Bash
Executable File

#!/bin/bash
# Script to verify and configure 250GB drives on R630-01 for Ceph OSD
# Run this script on R630-01 (192.168.11.11)
set -e
echo "=========================================="
echo "R630-01 Disk Verification and Ceph OSD Setup"
echo "=========================================="
echo ""
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
# Check if running as root
if [ "$EUID" -ne 0 ]; then
echo -e "${RED}Please run as root${NC}"
exit 1
fi
echo "Step 1: Listing all block devices..."
echo "-----------------------------------"
lsblk -o NAME,SIZE,TYPE,MOUNTPOINT,FSTYPE,MODEL,SERIAL | grep -E "NAME|sd"
echo ""
echo "Step 2: Checking all disks..."
echo "-----------------------------------"
fdisk -l 2>/dev/null | grep -E "^Disk /dev/sd" | sort
echo ""
echo "Step 3: Identifying 250GB drives..."
echo "-----------------------------------"
echo "Looking for drives around 250GB size..."
fdisk -l 2>/dev/null | grep -E "^Disk /dev/sd" | grep -iE "232|233|234|235|236|237|238|239|240|241|242|243|244|245|246|247|248|249|250|251|252|253|254|255|256|257|258|259|260" || echo "No 250GB drives found in fdisk output"
echo ""
echo "Step 4: Checking current Ceph OSD status..."
echo "-----------------------------------"
if command -v ceph &> /dev/null; then
echo "Current OSD tree:"
ceph osd tree 2>/dev/null || echo "Ceph not accessible or not configured"
echo ""
echo "Current OSD details:"
ceph osd df 2>/dev/null || echo "Ceph not accessible"
echo ""
echo "Ceph health:"
ceph health 2>/dev/null || echo "Ceph not accessible"
else
echo "Ceph command not found"
fi
echo ""
echo "Step 5: Checking storage pools..."
echo "-----------------------------------"
if command -v pvesm &> /dev/null; then
pvesm status 2>/dev/null || echo "pvesm not accessible"
else
echo "pvesm command not found"
fi
echo ""
echo "Step 6: Finding unused disks (potential for OSD)..."
echo "-----------------------------------"
echo "Checking for disks without partitions or filesystems..."
for disk in /dev/sd[a-z]; do
if [ -b "$disk" ]; then
# Skip if it's the boot disk or has partitions
if ! lsblk -n -o MOUNTPOINT "$disk" 2>/dev/null | grep -q "/"; then
size=$(fdisk -l "$disk" 2>/dev/null | grep "^Disk $disk" | awk '{print $3 $4}')
echo " $disk: $size (potentially available)"
fi
fi
done
echo ""
echo "=========================================="
echo "Summary and Recommendations"
echo "=========================================="
echo ""
echo "1. Review the output above to identify the 6x 250GB drives"
echo "2. Check if any drives are uninitialized (no partitions)"
echo "3. If a drive is available, you can create a Ceph OSD with:"
echo ""
echo " # WARNING: This will destroy all data on the drive!"
echo " ceph-volume lvm create --data /dev/sdX"
echo ""
echo " Replace sdX with the actual device (e.g., sdc, sdd, etc.)"
echo ""
echo "4. After creating OSD, verify with:"
echo " ceph osd tree"
echo " ceph health"
echo ""
echo "5. If Ceph health improves, the third OSD is working!"
echo ""