Monday, February 13, 2012

Clean up Procedure after Ignite replication of hpvm host


This errror is created by Ignite replication of an hpvm system. The following checks device integrity and cleans up errors created by Ignite replication.
hpvmcreate: ERROR (jdeautp1): Incorrect backing device type.
First check for errors with this script (I may check this in at some point)
#!/usr/bin/sh
#
# Unofficial quick and dirty passthru DSF check script
#
# It walks all /dev/pt/* files and tries to find corresponding /dev/rdisk
# or /dev/rtape files. If they are foudn their minor numbers are compared.
#
# @(#) pt_check.sh v1.1 – stanm@wtec
#
for i in $(ls /dev/pt/*)
do
# ll $i
shortname=${i##*_}
printf “checking $shortname”
minor1=$(ll $i|awk ‘{print $6}’)
# echo minor1=$minor ($i)
if [ -c /dev/rdisk/$shortname ]; then
minor2=$(ll /dev/rdisk/$shortname|awk ‘{print $6}’)
# echo minor2=$minor2 ($/dev/rdisk/$shortname)
if [[ "x$minor1" = "x$minor2" ]]; then
printf ” – OK\n”
else
printf ” – Minor numbers are probably incorrect\n”
printf “minor1=$minor1 ($i) vs ”
printf “minor2=$minor2 (/dev/rdisk/$shortname)\n”
fi
else
# could be tape
if [ -c /dev/rtape/${shortname}_BEST ]; then
minor2=$(ll /dev/rtape/${shortname}_BEST|awk ‘{print $6}’)
if [[ "x$minor1" = "x$minor2" ]]; then
printf ” – OK\n”
else
printf ” – Minor numbers are probably incorrect\n”
printf “minor1=$minor1 ($i) vs ”
printf “minor2=$minor2 (/dev/rtape/${shortname}_BEST)\n”
fi
else
printf ” – /dev/rdisk/$shortname or /dev/rtape/${shortname}_BEST not found – check skipped\n”
fi
fi
done
Output indicating problems:
checking disk11 – Minor numbers are probably incorrect
minor1=0×000005 (/dev/pt/pt_disk11) vs minor2=0×000008 (/dev/rdisk/disk11)
checking disk12 – Minor numbers are probably incorrect
minor1=0×000006 (/dev/pt/pt_disk12) vs minor2=0×000009 (/dev/rdisk/disk12)
checking disk13 – Minor numbers are probably incorrect
minor1=0×000007 (/dev/pt/pt_disk13) vs minor2=0x00000a (/dev/rdisk/disk13)
checking disk14 – Minor numbers are probably incorrect
minor1=0×000008 (/dev/pt/pt_disk14) vs minor2=0x00000b (/dev/rdisk/disk14)
checking disk15 – Minor numbers are probably incorrect
minor1=0×000009 (/dev/pt/pt_disk15) vs minor2=0x00000c (/dev/rdisk/disk15)
checking disk17 – OK
checking disk18 – /dev/rdisk/disk18 or /dev/rtape/disk18_BEST not found – check skipped
checking disk19 – Minor numbers are probably incorrect
minor1=0×000017 (/dev/pt/pt_disk19) vs minor2=0×000013 (/dev/rdisk/disk19)
checking disk2 – OK
checking disk22 – Minor numbers are probably incorrect
minor1=0×000018 (/dev/pt/pt_disk22) vs minor2=0×000014 (/dev/rdisk/disk22)
checking disk23 – Minor numbers are probably incorrect
minor1=0×000019 (/dev/pt/pt_disk23) vs minor2=0×000015 (/dev/rdisk/disk23)
checking disk3 – OK
checking disk5 – OK
checking disk8 – /dev/rdisk/disk8 or /dev/rtape/disk8_BEST not found – check skipped
checking disk9 – /dev/rdisk/disk9 or /dev/rtape/disk9_BEST not found – check skipped
Correction procedure:
cd /var/opt/hpvm/common/

rm -f hpvm_devinit
cd /dev/pt
ls
rm -f *
hpvmdevmgmt -I

Consider this a necessary procedure to clean up after ignite replication

No comments: