#!/usr/bin/ksh
TMP_FILE=/tmp/mirror_check.out
if (( $(lspv| grep -cw rootvg) > 1 )); then
lsvg -l rootvg | awk 'NR > 2 && $2 !~ /^sysdump$/ { if ($3 == $4) {print $0} }' >> $TMP_FILE
NON_MIRR=`wc -l < $TMP_FILE`
if (( $NON_MIRR != 0 )); then
echo "unmirrored LVs found:"
echo
cat $TMP_FILE
fi
fi
The original code was written by zaxxon.
The above code has a flaw, works when only one sysdump device exists, if 2 dump device exists, it says as not mirrored. Please check and help to update the script