Last active
May 4, 2024 15:36
-
-
Save jfeilbach/33e6cb3078848c8abdd05b46bc3537f8 to your computer and use it in GitHub Desktop.
Promise Utility information dump
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Dump information, logs, and stats about Promise disk array uing the Promise Utility cli | |
date=$(date +%Y-%m-%d) | |
log=~/Documents/promise-${date}.log | |
cmd='/usr/local/bin/promiseutil -L ${log} -C' | |
syslog='hostname' | |
echo -e "\nWill write to ${log}\n" | |
list=("date -a list" \ | |
"about" \ | |
"bbm -a list" \ | |
"checktable -l 0" \ | |
"subsys -v" \ | |
"enclosure -v" \ | |
"ctrl -v" \ | |
"phydrv -v" \ | |
"array -v" \ | |
"logdrv -v" \ | |
"event -v" \ | |
"event -l nvram") | |
for sub_cmd in "${list[@]}" ; do | |
${cmd} ${sub_cmd} | |
done | |
echo -e "Copying ${log} to syslog server.\n" | |
scp ${log} ${syslog}:/var/log/promise/promise-${date}.log | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
replace dead drive
switch new drive to "unconfigured" new HDD defaults to "passsthrough"
phydrv -a mod -s "config=unconfig" -p 7
start rebuild
logdrv OpStatus Rebuilding