Skip to content

Instantly share code, notes, and snippets.

@jfeilbach
Last active May 4, 2024 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfeilbach/33e6cb3078848c8abdd05b46bc3537f8 to your computer and use it in GitHub Desktop.
Save jfeilbach/33e6cb3078848c8abdd05b46bc3537f8 to your computer and use it in GitHub Desktop.
Promise Utility information dump
#!/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
@jfeilbach
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment