38 lines
1.1 KiB
Bash
38 lines
1.1 KiB
Bash
|
|
#!/usr/bin/env bash
|
||
|
|
set -o errexit
|
||
|
|
set -o nounset
|
||
|
|
set -o pipefail
|
||
|
|
|
||
|
|
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
|