Initial commit: loc_az_hci (smom-dbis-138 excluded via .gitignore)
Some checks failed
Test / test (push) Has been cancelled

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
defiQUG
2026-02-08 09:04:46 -08:00
commit c39465c2bd
386 changed files with 50649 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
#!/bin/bash
# Configure Proxmox Storage Mounts from Router Server
# Run on ML110 and R630 Proxmox hosts
set -e
echo "========================================="
echo "Proxmox Storage Configuration"
echo "========================================="
STORAGE_SERVER="10.10.10.1"
NFS_EXPORT="/mnt/storage"
STORAGE_NAME="router-storage"
echo "Configuring NFS storage mount from Router server..."
# Add NFS storage to Proxmox
pvesm add nfs $STORAGE_NAME \
--server $STORAGE_SERVER \
--export $NFS_EXPORT \
--content images,iso,vztmpl,backup \
--maxfiles 0
echo "Storage configured: $STORAGE_NAME"
echo "To verify: pvesm status"

View File

@@ -0,0 +1,73 @@
# Configure Storage Spaces Direct (S2D) for Storage Shelves
param(
[string[]]$PhysicalDisks,
[string]$PoolName = "S2DPool",
[string]$VolumeName = "S2DVolume"
)
$ErrorActionPreference = "Stop"
Write-Host "=========================================" -ForegroundColor Cyan
Write-Host "Storage Spaces Direct Configuration" -ForegroundColor Cyan
Write-Host "=========================================" -ForegroundColor Cyan
# Check if running as Administrator
if (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
Write-Host "This script requires Administrator privileges." -ForegroundColor Red
exit 1
}
Write-Host "`nDetecting physical disks..." -ForegroundColor Yellow
$disks = Get-PhysicalDisk | Where-Object { $_.CanPool -eq $true }
if ($disks.Count -eq 0) {
Write-Host "No poolable disks found." -ForegroundColor Red
Write-Host "Ensure storage shelves are connected and detected." -ForegroundColor Yellow
exit 1
}
Write-Host "Found $($disks.Count) poolable disk(s):" -ForegroundColor Green
foreach ($disk in $disks) {
Write-Host " - $($disk.FriendlyName): $($disk.Size) bytes, $($disk.HealthStatus)" -ForegroundColor White
}
# Create storage pool
Write-Host "`nCreating storage pool: $PoolName" -ForegroundColor Yellow
try {
$pool = New-StoragePool -FriendlyName $PoolName -StorageSubsystemFriendlyName "Windows Storage*" -PhysicalDisks $disks -ErrorAction Stop
Write-Host "Storage pool created successfully." -ForegroundColor Green
}
catch {
Write-Host "Error creating storage pool: $_" -ForegroundColor Red
exit 1
}
# Create virtual disk
Write-Host "`nCreating virtual disk..." -ForegroundColor Yellow
try {
$virtualDisk = New-VirtualDisk -StoragePoolFriendlyName $PoolName -FriendlyName $VolumeName -ResiliencySettingName "Mirror" -Size (Get-StoragePool -FriendlyName $PoolName).Size -ErrorAction Stop
Write-Host "Virtual disk created successfully." -ForegroundColor Green
}
catch {
Write-Host "Error creating virtual disk: $_" -ForegroundColor Red
exit 1
}
# Create volume
Write-Host "`nCreating volume..." -ForegroundColor Yellow
try {
$volume = $virtualDisk | Get-VirtualDisk | New-Volume -FriendlyName $VolumeName -FileSystem NTFS -ErrorAction Stop
Write-Host "Volume created successfully." -ForegroundColor Green
Write-Host " Drive Letter: $($volume.DriveLetter)" -ForegroundColor White
Write-Host " Size: $($volume.Size)" -ForegroundColor White
}
catch {
Write-Host "Error creating volume: $_" -ForegroundColor Red
exit 1
}
Write-Host "`n=========================================" -ForegroundColor Cyan
Write-Host "Storage Spaces Direct Configuration Complete" -ForegroundColor Cyan
Write-Host "=========================================" -ForegroundColor Cyan

View File

@@ -0,0 +1,9 @@
# Export Storage Protocols (NFS/SMB/iSCSI) for Proxmox/Ubuntu VMs
Write-Host "=========================================" -ForegroundColor Cyan
Write-Host "Storage Protocol Export Configuration" -ForegroundColor Cyan
Write-Host "=========================================" -ForegroundColor Cyan
Write-Host "`nConfigure NFS/SMB/iSCSI exports for Proxmox and Ubuntu VMs." -ForegroundColor Yellow
Write-Host "See Windows Server documentation for NFS Server and iSCSI Target Server roles." -ForegroundColor Yellow

View File

@@ -0,0 +1,23 @@
# Flash LSI 9207-8e to IT Mode
# WARNING: This script provides instructions - actual flashing should be done from Linux
param(
[switch]$DryRun = $true
)
Write-Host "=========================================" -ForegroundColor Cyan
Write-Host "LSI HBA IT Mode Firmware Flash" -ForegroundColor Cyan
Write-Host "=========================================" -ForegroundColor Cyan
Write-Host "`nWARNING: Flashing firmware will erase current firmware!" -ForegroundColor Red
Write-Host "This operation should be performed from Linux/Proxmox, not Windows." -ForegroundColor Yellow
Write-Host "`nIT Mode Flash Instructions:" -ForegroundColor Cyan
Write-Host "1. Boot into Linux/Proxmox or use Linux live USB" -ForegroundColor White
Write-Host "2. Download sas2flash utility" -ForegroundColor White
Write-Host "3. Download IT mode firmware (P20 for SAS2308)" -ForegroundColor White
Write-Host "4. Identify controller: ./sas2flash -listall" -ForegroundColor White
Write-Host "5. Flash firmware: ./sas2flash -o -f 2308p20.fw -b mptsas2.rom" -ForegroundColor White
Write-Host "`nFor automated script, see Linux version in infrastructure/storage/" -ForegroundColor Yellow

View File

@@ -0,0 +1,10 @@
# Optional ZFS on Linux Setup for NAS Workloads
Write-Host "=========================================" -ForegroundColor Cyan
Write-Host "ZFS on Linux Setup (Optional)" -ForegroundColor Cyan
Write-Host "=========================================" -ForegroundColor Cyan
Write-Host "`nZFS setup for NAS workloads (optional)." -ForegroundColor Yellow
Write-Host "Install ZFS on Linux: apt install zfsutils-linux" -ForegroundColor White
Write-Host "Create pool: zpool create tank /dev/sdX /dev/sdY" -ForegroundColor White

View File

@@ -0,0 +1,10 @@
# Storage Health Monitoring using smartmontools and storcli
Write-Host "=========================================" -ForegroundColor Cyan
Write-Host "Storage Health Monitoring" -ForegroundColor Cyan
Write-Host "=========================================" -ForegroundColor Cyan
Write-Host "`nUse smartmontools and storcli for storage health checks." -ForegroundColor Yellow
Write-Host "Install smartmontools: choco install smartmontools" -ForegroundColor White
Write-Host "Download storcli from Broadcom support site." -ForegroundColor White