Script for detecting APA network bonded pairs. It is already built into the cinam21t drd image. It will save you 3-5 hours of guess work on future builds.
Networking was changed to protect the innocent.
Here is an example:
[root@cinam21t]:/home/root # ./apanetwork_discover 142.18.1.26 142.18.1.96 ——————————————————— -This script figures out which NIC cards are APA paired.- -It has two inputs:……………………………….- -1- The assigned IP address of the APA Group lan90#…..- -2- The known network address of an HP-UX server on net.- -ex ./apanetwork_discover 142.18.1.26 142.18.1.96 ……- – These are cinam21t and stlam31t…………………..- – The system must be OFF network for this to work ……- – Instruction: …………………………………..- – /sbin/init.d/net stop …………………………..- – /sbin/init.d/vlan stop ………………………….- – /sbin/init.d/hplm stop ………………………….- – /sbin/init.d/hpapa stop (You may need to ctrl-break…- – netstat -rn (ifconfig lan# down then unplumb any lans.- – Wash,rinse and repeat for lan901,lan902,lan903 …….- ——————————————————— The LAN is lan0 Success lan0 as 142.18.1.26 was able to ping 142.18.1.96 The LAN is lan8 NO JOY lan8 as 142.18.1.26 was able NOT to ping 142.18.1.96 The LAN is lan16 NO JOY lan16 as 142.18.1.26 was able NOT to ping 142.18.1.96 The LAN is lan19 NO JOY lan19 as 142.18.1.26 was able NOT to ping 142.18.1.96 The LAN is lan2 NO JOY lan2 as 142.18.1.26 was able NOT to ping 142.18.1.96 The LAN is lan49 NO JOY lan49 as 142.18.1.26 was able NOT to ping 142.18.1.96 The LAN is lan52 NO JOY lan52 as 142.18.1.26 was able NOT to ping 142.18.1.96 The LAN is lan56 Success lan56 as 142.18.1.26 was able to ping 142.18.1.96 [root@cinam21t]:/home/root # |
In this case lan0 are in the bonded pair (lan900)
Take a nwmgr output before bringing network down. Run from console only
Here is the script code
/root/build # cat apanetwork_discover
#
echo “———————————————————“
echo “-This script figures out which NIC cards are APA paired.-“
echo “-It has two inputs:……………………………….-“
echo “-1- The assigned IP address of the APA Group lan90#…..-“
echo “-2- The known network address of an HP-UX server on net.-“
echo “-ex ./apanetwork_discover 172.19.1.26 172.19.1.96 ……-“
echo “- These are stlam34t and stlam31t…………………..-“
echo “- The system must be OFF network for this to work ……-“
echo “- Instruction: …………………………………..-“
echo “- /sbin/init.d/net stop …………………………..-“
echo “- /sbin/init.d/vlan stop ………………………….-“
echo “- /sbin/init.d/hplm stop ………………………….-“
echo “- /sbin/init.d/hpapa stop (You may need to ctrl-break…-“
echo “- netstat -rn (ifconfig lan# down then unplumb any lans.-“
echo “- Wash,rinse and repeat for lan901,lan902,lan903 …….-“
echo “———————————————————“
IP2=$2
IPADDY=$1
nwmgr | awk ‘!/hp_apa/{ printf “%s %s\n”, $1,$2 }’ | awk ‘/UP/{print $1}’ | while read -r LN
do
sleep 1
echo "The LAN is ${LN}"
ifconfig ${LN} ${IPADDY} netmask 255.255.255.0 up > /dev/null
ping ${IP2} -n 1 -m 5 > /dev/null
rc=$?
if [ $rc -eq 0 ]
then
echo "Success $LN as $IPADDY was able to ping $IP2"
else
echo "NO JOY $LN as $IPADDY was able NOT to ping $IP2"
fi
ifconfig ${LN} down
ifconfig ${LN} unplumb
done
swlist -l fileset -a state | grep -E -v ‘^#|conf’ ###
VParProvider.VPAR-DOC corrupt
If re-installation does not wotk, try this on specially selected (re non-critical) filesets.
# swmodify -a state=configured VParProvider.VPAR-DOC
swlist -l fileset -a state | grep -E -v ‘^#|conf’ ###
Clean!
Tags: hp-ux corrupt filesets
Patch Depot tutorial
So you downloaded your QPK after doing swainv analysis of what patches your HP-UX server fleet needs. You have a bundle, but you do not want the default name bundle. No problem use the create script to customize:
The following command sets the bundle name (-b ) and the tilte of the bundle ( -t )
./create_depot_hpux.11.31 -b 201510HPUXPATCHMYCOMPANY -t MYCOMPANYFALL2015
… some output
A directory depot is created
cd depot
Check the bundle list. The names should be meaningful
swlist –l bundle –s $PWD
# Initializing…
# Contacting target “myhost”…
#
# Target: myhost:/Depots/tmp/depot
#
201510HPUXPATCHMYCOMPANY B.2015.07.23 MYCOMPANYFALL2015
QPKAPPS B.11.31.1503.411a Applications Patches for HP-UX 11i v3, March 2015
QPKBASE B.11.31.1503.411a Base Quality Pack Bundle for HP-UX 11i v3, March 2015
Next step copy them to a single install point:
swcopy -x enforce_dependencies=FALSE -x reinstall=TRUE -x write_remote_files=TRUE -d -s $PWD \* @ /Depots/B.11.31/2015FY_second
… some output deleted …
PHSS_43882.HVSD-KRN,r=1.0,a=HP-UX_B.11.31_IA,v=HP,fr=1.0,fa=HP-UX_B.11.31_IA
PHSS_43883.HSSN-KRN,r=1.0,a=HP-UX_B.11.31_IA,v=HP,fr=1.0,fa=HP-UX_B.11.31_IA
PHSS_43884.IGSSN-KRN,r=1.0,a=HP-UX_B.11.31_IA,v=HP,fr=1.0,fa=HP-UX_B.11.31_IA
PHSS_43886.GVSD-KRN,r=1.0,a=HP-UX_B.11.31_IA,v=HP,fr=1.0,fa=HP-UX_B.11.31_IA
* Selection succeeded.
* Beginning Analysis and Execution
* Session selections have been saved in the file
“/root/.sw/sessions/swcopy.last”.
WARNING: “myhost:/Depots/B.11.31/2015FY_second”: The software
dependencies for 4 products or filesets cannot be resolved.
* The execution phase succeeded for
“myhost:/Depots/B.11.31/2015FY_second”.
* Analysis and Execution succeeded.
NOTE: More information may be found in the agent logfile using the
command “swjob -a log myhost-2347 @
myhost:/Depots/B.11.31/2015FY_second”.
======= 07/23/15 14:49:03 PDT END swcopy SESSION (non-interactive)
(jobid=myhost-2347)
Next check the destination depot
swlist –l depot –s /Depots/B.11.31/2015FY_second
# Initializing…
# Contacting target “myhost”…
#
# Target: myhost:/Depots/B.11.31/2015FY_second
#
201510HPUXPATCHMYCOMPANY B.2015.07.23 MYCOMPANYFALL2015
QPKAPPS B.11.31.1503.411a Applications Patches for HP-UX 11i v3, March 2015
QPKBASE B.11.31.1503.411a Base Quality Pack Bundle for HP-UX 11i v3, March 2015
Then a problem comes up and you need to add a new patch to your already build depot, say PHSS_44116.depot a fix to issues starting hpvm guests.
swcopy -d -s $PWD/PHSS_44116.depot \* @ /Depots/B.11.31/2015FY_second
======= 07/23/15 14:58:12 PDT BEGIN swcopy SESSION (non-interactive)
(jobid=myhost-2348)
* Session started for user “root@myhost”.
* Beginning Selection
* Target connection succeeded for
“myhost:/Depots/B.11.31/2015FY_second”.
* Source: /Depots/B.11.31/PHSS_44116.depot
* Targets: myhost:/Depots/B.11.31/2015FY_second
* Software selections:
PHSS_44116.HPVM-CORE,r=1.0,a=HP-UX_B.11.31_IA,v=HP,fr=1.0,fa=HP-UX_B.11.31_IA
PHSS_44116.VIRT-PROVIDER,r=1.0,a=HP-UX_B.11.31_IA,v=HP,fr=1.0,fa=HP-UX_B.11.31_IA
* Selection succeeded.
* Beginning Analysis and Execution
* Session selections have been saved in the file
“/root/.sw/sessions/swcopy.last”.
* The analysis phase succeeded for
“myhost:/Depots/B.11.31/2015FY_second”.
* The execution phase succeeded for
“myhost:/Depots/B.11.31/2015FY_second”.
* Analysis and Execution succeeded.
NOTE: More information may be found in the agent logfile using the
command “swjob -a log myhost-2348 @
myhost:/Depots/B.11.31/2015FY_second”.
======= 07/23/15 14:58:14 PDT END swcopy SESSION (non-interactive)
(jobid=myhost-2348)
This method can be used to deliver any software built in depot format.
Let’s check the patch became a part of the depot:
myhost:root > swlist -s /Depots/B.11.31/2015FY_second
# Initializing…
# Contacting target “myhost”…
#
# Target: myhost:/Depots/B.11.31/2015FY_second
#
#
# Bundle(s):
#
201510HPUXPATCHMYCOMPANY B.2015.07.23 MYCOMPANYFALL2015
QPKAPPS B.11.31.1503.411a Applications Patches for HP-UX 11i v3, March 2015
QPKBASE B.11.31.1503.411a Base Quality Pack Bundle for HP-UX 11i v3, March 2015
#
# Product(s) not contained in a Bundle:
#
PHSS_44116 1.0 HPVM B.06.30 CORE PATCH
myhost:root >
Tags: Capacity Planning, HP-UX, hpux patching tutorial, Ignite-UX
The following command conducts a cleanup and preparation step for any nodes named in a serviceguard cluster.
It is something I should have known, but learned recently:
cmpreparecl -n sgnode0 -n sgnode1
It does all the steps that would normally be done by hand.
Tags: cluster configuration, hpux, serviceguard configuration
A hpvm 6.2 guest was cloned from one host to another and would not come on network.
hpvmnet -S prod
Port Port Port Untagged Number of Active VM Tagged
Number State Adapter VLANID Reserved VMs VLANIDs
======= ============ ======== ======== ============ ============ =============
1 Reserved avio_lan 101 1 none
2 Available unknown 653 0 none
3 Active avio_lan 38 1 working none
4 Active avio_lan 400 1 nonworking none
The problematic guest was guest 4 (p4)
We want to configure it to avio_lan 38
## The portid:4: is from the Port Number Column of the hpvmnet output
hpvmnet -S prod -u portid:4:vlanid:38
[Port Configuration Details]
Port Port Port Untagged Number of Active VM Tagged
Number State Adapter VLANID Reserved VMs VLANIDs
======= ============ ======== ======== ============ ============ =============
1 Reserved avio_lan 101 1 none
2 Available unknown 653 0 none
3 Active avio_lan 38 1 working none
4 Active avio_lan 38 1 newhost none
Other useful commands
netstat -ni
hpvmstatus -p 4 | grep -i lan
vswitch avio_lan ignite 4 0 0 0 9a-01-f8-a4-c8-dd
vswitch avio_lan prod 4 0 1 0 56-a1-3b-78-66-3b
vswitch avio_lan mgmt 4 0 2 0 2e-b9-7b-9c-e5-1c
vswitch avio_lan data 4 0 4 0 16-90-57-11-37-e1
MAC addresses are fake.
APA is in use here. The MAC addresses have been changed for security reasons and may not be valid.
There is missing data from this post, comment and I will try to enhance the post.
There are 4 networks. Networking for hpvm guests was hosed beyond repair.
Problem before rebuild.
hpvmnet -v -S ignite -v
hpvmnetName Number State Mode NamePPA MAC Address IPv4 Address
===================== ====== ======= ========= ======= ============== ===============
hprod 2 Down Shared lan900
[Port Configuration Details]
Port Port Port Untagged Number of Active VM Tagged
Number State Adapter VLANID Reserved VMs VLANIDs
======= ============ ======== ======== ============ ============ =============
1 Available unknown 102 0 none
2 Available unknown 102 0 none
root@hpvmserv# hpvmnet -S data hpvmnet -S mgmt -v hpvmnet -S data
Version B.06.10.05
-vName Number State Mode NamePPA MAC Address IPv4 Address
===================== ====== ======= ========= ======= ============== ===============
mgmt 4 Down Shared lan902
[Port Configuration Details]
Port Port Port Untagged Number of Active VM Tagged
Number State Adapter VLANID Reserved VMs VLANIDs
======= ============ ======== ======== ============ ============ =============
1 Available unknown 501 0 none
2 Available unknown 501 0 none
root@hpvmserv# hpvmnet -S ignite -v hpvmnet -S data -v
Version B.06.10.05
Name Number State Mode NamePPA MAC Address IPv4 Address
===================== ====== ======= ========= ======= ============== ===============
ignite 6 Down Shared lan903
[Port Configuration Details]
Port Port Port Untagged Number of Active VM Tagged
Number State Adapter VLANID Reserved VMs VLANIDs
======= ============ ======== ======== ============ ============ =============
1 Available unknown 502 0 none
2 Available unknown 502 0 none
root@hpvmserv# hpvmnet -S data -v
Version B.06.10.05
Name Number State Mode NamePPA MAC Address IPv4 Address
===================== ====== ======= ========= ======= ============== ===============
data 3 Down Shared lan901
[Port Configuration Details]
Port Port Port Untagged Number of Active VM Tagged
Number State Adapter VLANID Reserved VMs VLANIDs
======= ============ ======== ======== ============ ============ =============
1 Available unknown 101 0 none
2 Available unknown 101 0 none
The fix total rebuild on the fly:
hpvmmodify -P server1 -d network:avio_lan:0,0,0xAAD44C09C7A3:vswitch:prod:portid:1
hpvmmodify -P server1 -d network:avio_lan:0,1,0x025E925A26F0:vswitch:mgmt:portid:1
hpvmmodify -P server1 -d network:avio_lan:0,2,0xCEF0C06D8591:vswitch:data:portid:1
hpvmmodify -P server1 -d network:avio_lan:0,4,0x2A7FBA421018:vswitch:ignite:portid:1
hpvmmodify -P server2 -d network:avio_lan:0,0,0xAA0971729E70:vswitch:prod:portid:2
hpvmmodify -P server2 -d network:avio_lan:0,1,0xA6EA6047EF3C:vswitch:mgmt:portid:2
hpvmmodify -P server2 -d network:avio_lan:0,2,0x5ECA220B069D:vswitch:data:portid:2
hpvmmodify -P server2 -d network:avio_lan:0,4,0x36C4C98BAE05:vswitch:ignite:portid:2
hpvmnet -d -S prod
hpvmnet -d -S mgmt
hpvmnet -d -S ignite
hpvmnet -d -S data
hpvmnet -c -S prod -n 900
hpvmnet -c -S mgmt -n 902
hpvmnet -c -S data -n 901
hpvmnet -c -S ignite -n 903
hpvmmodify -P server1 -a network:avio_lan::vswitch:prod
hpvmmodify -P server1 -a network:avio_lan::vswitch:mgmt
hpvmmodify -P server1 -a network:avio_lan::vswitch:data
hpvmmodify -P server1 -a network:avio_lan::vswitch:ignite
hpvmmodify -P server2 -a network:avio_lan::vswitch:prod
hpvmmodify -P server2 -a network:avio_lan::vswitch:mgmt
hpvmmodify -P server2 -a network:avio_lan::vswitch:data
hpvmmodify -P server2 -a network:avio_lan::vswitch:ignite
hpvmnet -S prod -u portid:1:vlanid:102
hpvmnet -S prod -u portid:2:vlanid:102
hpvmnet -S mgmt -u portid:1:vlanid:501
hpvmnet -S mgmt -u portid:2:vlanid:501
hpvmnet -S data -u portid:1:vlanid:101
hpvmnet -S data -u portid:2:vlanid:101
hpvmnet -S ignite -u portid:1:vlanid:502
hpvmnet -S ignite -u portid:2:vlanid:502
hpvmnet -b -S prod
hpvmnet -b -S mgmt
hpvmnet -b -S ignite
hpvmnet -b -S data
post:
root@hpvmserv# hpvmnet -v
Version B.06.10.05
Name Number State Mode NamePPA MAC Address IPv4 Address
===================== ====== ======= ========= ======= ============== ===============
prod 8 Up Shared lan900 0x00226403e1cc
mgmt 9 Up Shared lan902 0x0025b3b0a9d0
localnet 1 Up Shared N/A N/A
data 10 Up Shared lan901 0x00226403e1ce
ignite 11 Up Shared lan903 0x0025b3b0a9d2
Tags: hpux, hpvm, hpvmmodify, rebuild hpvm guest networking
When running vpmon/vpar virtualization, any changes made to the vpar database vpardb are automatically saved to:
/stand/vpdb
In fact you can boot vpmon of a disk, stand up the vpars, and reven remove the original vpmon system and boot disk and the database will maintain integrity on the remaining systems.
To sync/verify the vpardb
vparstatus -D /stand/vpdb
vparstatus -m
Console path: No path as console is virtual
Monitor boot disk path: 1.0.4.0.0.0.0.4.0.0.0.1.128.0.0.0.0
Monitor boot filename: /stand/vpmon
Database filename: /stand/vpdb
Memory ranges used: 0x0/349069312 monitor
0x14ce6000/327680 firmware
0x14d36000/417792 monitor
0x14d9c000/925696 firmware
0x14e7e000/1417216 monitor
0x14fd8000/50495488 firmware
0x18000000/134213632 monitor
0x3ffec000/81920 firmware
0x79ffc000000/67108864 firmware
0x89ffc000000/67108864 firmware
will show you what hardware was actually used to boot the vpmon. You may find your monitor disk path no longer exists and your vpars are running just fine.
Tags: hpux vpars, vpar, vparstatus, vpmon
This applies to hpvm, definitely version 4.00, probably all the way through version 6.2. HP-UX 11.31
You have a HPVM host named hpvm1 and it has a guest dguest1
Storage team presents you the storage.
ioscan -Nfncdisk (or)
ioscan -fnCdisk
Disk turns out to be disk 5
To pull back disk288 from a guest on:
rmsf -k -H <hardware path from ioscan -NfnCdisk>
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=0x000005 (/dev/pt/pt_disk11) vs minor2=0x000008 (/dev/rdisk/disk11)
checking disk12 – Minor numbers are probably incorrect
minor1=0x000006 (/dev/pt/pt_disk12) vs minor2=0x000009 (/dev/rdisk/disk12)
checking disk13 – Minor numbers are probably incorrect
minor1=0x000007 (/dev/pt/pt_disk13) vs minor2=0x00000a (/dev/rdisk/disk13)
checking disk14 – Minor numbers are probably incorrect
minor1=0x000008 (/dev/pt/pt_disk14) vs minor2=0x00000b (/dev/rdisk/disk14)
checking disk15 – Minor numbers are probably incorrect
minor1=0x000009 (/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=0x000017 (/dev/pt/pt_disk19) vs minor2=0x000013 (/dev/rdisk/disk19)
checking disk2 – OK
checking disk22 – Minor numbers are probably incorrect
minor1=0x000018 (/dev/pt/pt_disk22) vs minor2=0x000014 (/dev/rdisk/disk22)
checking disk23 – Minor numbers are probably incorrect
minor1=0x000019 (/dev/pt/pt_disk23) vs minor2=0x000015 (/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
Tags: forums.itrc.hp.com, high capacity volume group, HP-UX, hpux, hpvm, ia64, Ignite-UX, LVM