Files

36 lines
1.0 KiB
Bash
Raw Permalink Normal View History

2026-05-05 21:40:46 +00:00
#!/usr/bin/env bash
2026-05-08 21:18:22 +00:00
set -euo pipefail
2026-05-05 21:40:46 +00:00
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=00_env.sh
. "$SCRIPT_DIR/00_env.sh"
run_optional() {
local description="$1"
shift
section "$description"
if validate_gpfs_command "$1"; then
run_readonly "$@" || warning "$description command failed"
fi
}
section "GPFS / Spectrum Scale Cluster Overview"
ok "Log file: $LOG_FILE"
run_optional "GPFS daemon state on all nodes" mmgetstate -a
run_optional "Cluster definition" mmlscluster
run_optional "Cluster configuration" mmlsconfig
run_optional "Managers and quorum information" mmlsmgr
run_optional "NSD inventory" mmlsnsd
run_optional "Disk inventory for all filesystems" mmlsdisk all
run_optional "Filesystem definitions" mmlsfs all
run_optional "Mount state for all filesystems" mmlsmount all
section "Mounted GPFS filesystems from df"
if command -v df >/dev/null 2>&1; then
df -h -t gpfs 2>/dev/null | tee -a "$LOG_FILE" || df -h | awk 'NR == 1 || /gpfs|mmfs/' | tee -a "$LOG_FILE"
else
warning "df command not available"
fi