msgbartop
Tips and Tricks site for advanced HP-UX Engineers
msgbarbottom

01 Oct 07 Welcome to hpux.ws

This site was created for two reasons. It was meant to document procedures, scripts and processes that I felt were important to myself and the greater HP-UX community.

This project is owned by ISN Corporation, a Subchapter S Corporation based in Chicago, Illinois, USA.

If you want to contribute to the site, let me know. hpuxadmin in gtalk hpuxconsulting in yahoo messenger

Regards,

Steven “Shmuel” Protter: Rosh Tzurim, Israel

Tags: , , ,

24 Jul 15 Single user vg00 reconfiguration for a san boot hp-ux system

San boot system.

HBA has to be replaced.

Then you have to boot single user mode to re-establish all your paths.

Procedure authored by my colleague Mahesh Koduru

Before you start make sure you have a current map file hosted on root filesystem.

“Reboot the server and follow these steps :
Interrupt the boot and boot the system in maintenance mode.

fs0:\EFI\HPUX> hpux

HPUX> boot -lm –lq vmunix This will bring the System into Maintance mod

#vgdisplay vg00 The VG should be in deactivated Mod

#ll /dev/*/group Collect the Group file

#vgexport -p -s -m vg00.map /dev/vg00 Keep the Map file in present directory , ie root

# ll vg00.map
#vgexport -v /dev/vg00

#mkdir -m 755 /dev/vg00
#mknod /dev/vg00/group c 64 0×030000 ##This is an example your major/minor number may vary
#vgimport -s -N -m vg00.map /dev/vg00 ## The -N is B.11.31 only to convert to agile storage
#vgchange -a y vg00
#mount -a Mount only Root filesystems

#setboot Check and correct setboot issues

#lvlnboot -v vg00 Check and correct lvlnboot issues , lvrmboot command can be used if needed

#/usr/sbin/lvlnboot -v
#/usr/sbin/lvrmboot -r /dev/vg00 Execute for fixing Boot Labels
# /usr/sbin/lvlnboot -r /dev/vg00/lvol3
# /usr/sbin/lvlnboot -b /dev/vg00/lvol1
# /usr/sbin/lvlnboot -s /dev/vg00/lvol2
# /usr/sbin/lvlnboot -d /dev/vg00/lvol2
# /usr/sbin/lvlnboot -v
# /usr/sbin/lvlnboot -R

Note: Comment the swap in fstab and then issue below command.
# shutdown -ry 0

23 Jul 15 HP-UX patch depot tutorial

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: , , ,

30 Apr 15 Quick guide to configuring secondary hp-ux swap

I always have to look at Google for this.

To make this site more comprehensive, here it is.

disk5 is designated as swap disk, size 128 GB. Server has 64 GB of RAM.

pvcreate /dev/rdisk/disk5
vgcreate -p 10 -l 10 /dev/vgswap /dev/disk/disk5

vgdisplay /dev/vgswap
vgdisplay -v /dev/vgswap
lvcreate -l 32767 -n lv_swap /dev/vgswap
swapinfo -tam
swapon -p 2 /dev/vgswap/lv_swap
vi /etc/fstab
/dev/vgswap/lv_swap … swap pri=2 0 0

swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 24576 0 24576 0% 0 – 1 /dev/vg00/lvol2
dev 131068 0 131064 0% 0 – 2 /dev/vgswap/lv_swap
reserve – 290 -290
memory 62330 7566 54764 12%
total 217974 7856 210114 4% – 0 -

A reboot test is recommended where possible.

Tags: , , , ,

20 Apr 15 Serviceguard cluster creation:tip of the day

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: , ,

03 Mar 15 Making sure MWA is running properly

What follows is a health check script that checks the installation status of HP Operations Agent and the run status of the two mwa daemons that measure performance.

When run with the -y parameter the script will attempt to correct installed status of HP Operations Agent.

If you want the script, please email me via the sites response form. Cutting and pasting from this site can be done, but may be a very frustrating endeavor.

I have added commentary to the script, which may introduce run errors if screen scraped.

myserva:root > cat 247_mwarun
#!/bin/ksh
############################################################################
# make sure scopeux is running, if not run if not installed install.ed

# Load common environment
. /var/adm/bin/.scriptenv
echo “. Checking for mwa software installed and running on ${hn}.”

is=myserva
if [ "${hn}" = "myserva" ]; then is=”myservb”;fi

ps -ef >/tmp/plist.txt

srun=$(awk ‘/scopeux/{print $NF}’ /tmp/plist.txt | wc -l);
mrun=$(awk ‘/midaemon/{print $NF}’ /tmp/plist.txt | wc -l);
swlist -l bundle TC097EA > /tmp/swlist.txt
mwainst=$(awk ‘/TC097EA/{ print $NF}’ /tmp/swlist.txt| wc -l);

#echo “scopeux procs running: $srun mwa installed: $mwainst”
if [ "$1" = "-y" ];then
CHANGES=1
fi

if [ ${srun} -eq 0 ] || [ ${mrun} -eq 0 ] ;then
if (($CHANGES));then
if [ ${mwainst} -ne 1 ]
then
### depot server location is in variable ${is}. This is an ignite depot server.
swinstall -x mount_all_filesystems=false -s ${is}:/Depots/B.11.31/2014midyear_depot TC097EA
rc=$?
echo “mwa TC097EA install succeeded checking sd on ${hn}…”
swlist -l bundle TC097EA > /tmp/swlist.txt
mwainst=$(awk ‘/TC097EA/{ print $NF}’ /tmp/swlist.txt| wc -l);
if [ ${mwainst} -eq 1 ];then echo ” pass – mwa NOW installed.” ;fi
optstat=$(/var/adm/bin/bdfmegs “/opt ” |awk ‘!/File-System/{print $5}’);
echo “${hn} /opt is ${optstat} full remediate if above 85% …”
else
mwa start all
fi
else
echo ” NOTICE – mwa not installed or scopeux/midaemon is not running on ${hn} .(-y will fix).”
fi
else
echo ” pass – mwa installed. scopeux/midaemon is running on ${hn}.”
fi
optstat=$(/var/adm/bin/bdfmegs “/opt ” |awk ‘!/File-System/{print $5}’);
echo “${hn} /opt is ${optstat} full remediate if above 85% …”
rm -f /tmp/plist.txt
rm -f /tmp/swlist.txt
echo “#### end report $0 ${sn} ####”

Script depends on Bill Hassell’s bdfmegs script. bdf can be made to work.
Typical output is:

myserv0:root > ./247_mwarun
Executing HP-UX specific environment parameters…
. Checking for mwa software installed and running on myserv0.
pass – mwa installed. scopeux/midaemon is running on mserv0.
myserv0 /opt is 68% full remediate if above 85% …
#### end report ./247_mwarun myserv0 ####
myserv0:root > mwa stop all

Shutting down Perf Agent collection software
Shutting down scopeux, pid(s) 28345
The Perf Agent collector, scopeux has been shut down successfully.
NOTE: The ARM registration daemon ttd will be left running.

OVOA is running. Not shutting down coda
myserv0:root > ./247_mwarun
Executing HP-UX specific environment parameters…
. Checking for mwa software installed and running on myserv0.
NOTICE – mwa not installed or scopeux/midaemon is not running on myserv0 .(-y will fix).
myserv0 /opt is 68% full remediate if above 85% …
#### end report ./247_mwarun myserv0 ####

Tags: ,

03 Mar 15 scopeux and midaemon don’t want to run

midaemon and scopeux combine to collect performance data on HP-UX.

They both need to be running to properly collect data.

These are part of a depot called measureware which is part of the base OS.

To see if it is installed:
swlist -l bundle TC097EA
myserv0:root > swlist -l bundle TC097EA
# Initializing…
# Contacting target “myserv0″…
#
# Target: myserv0:/
#

TC097EA 11.20.000 HP Operations Agent

If not installed, HP Operations Agent can be downloaded from HP if you have a software contract with HP.

It is also delivered as part of openview, which is a separately licensed product.

I recently implemented performance data collection on a fleet of 100+ servers where I work.

On three of the servers, the daemons refused to run normally.

The following error was recorded in the file /var/opt/perf/status.mi
Unable to find newly enabled CPU.
Please use -prealloc to allocate bufsets for all CPUs.

Here are the steps to implement.
mwa stop all
/opt/perf/bin/ovpa stop
/opt/perf/bin/pctl stop
perfstat

kill any processes gently identified as running in perfstat output.

Edit the file /etc/rc.config.d/ovpa
MIPARMS=”-prealloc=2 -pids 10000 -kths 10000 -smdvss 512M”
export MIPARMS

2 is the number of physical cpus in the box.
If present the file /var/opt/perf/datafiles/RUN should be deleted.


mwa start all
perfstat

Check back in 1 hour and one day that midaemon and scopeux are still running.
Check /var/opt/perf/datafiles for updated log files.

Tags: , , , ,

24 Feb 15 Server backplane layout for rx class servers

HP-UX hardware is a bit Byzantine in nature. The following script demystifies things a bit and allows us to work at remote data centers with accuracy on cable issues both fiber and copper.

If you want to use this script, use the contact form to reach out to me. Most people will find cutting and pasting from the website very frustrating.

I am also reaching out to the community, dare I say fan base for assistance. I am fairly certain that the fiber side accurately reports status of hba connections. I am fairly certain that the copper side needs to be improved.

This is tested on rx7640 and rx8640 systems. I am fairly confident that it will work on superdomes. I just do not happen to have any around to test on.

Script includes an environment plugin called .scriptenv . I will provide relevant code from it as some of what it does is customer specific and can not be released into the wild. If functionality is needed everywhere, I try to provide it via a centrally managed file. I provide functionality to both command prompts and scripting this way. It allows me to make the scripts generic and change one file with environment customizations.

Script is based on olrad -q output. It uses several deprecated utilities such as lanadmin and lanscan. Since I currently doubt HP-UX v4 is in the works, this should not be a problem.

The output then the script:

IP addresses and mac addresses have been changed to protect the innocent:

./backplane.layout.ksh
Executing HP-UX specific environment parameters…
m rx8640
ml ia64 hp server rx8640
——————————————————————–
Valid model found: rx8640
8-0-1-1 3/0/8/1
Nework info:
info lan3: 192.189.44.111 3/0/8/1/0/6/0 0x0025B3E86088 UP up(1) up(1)
info lan4: 192.101.0.155 3/0/8/1/0/6/1 0x0025B3E86089 UP up(1) up(1)
HBA info:
hba dev: /dev/fcd2
drviver state: ONLINE
fcms device: 3/0/8/1/0/4/0
WWN sys: 0x500143800542b4f9
WWP sys: 0x500143800542b4f8
Switch port: 0x20280027f8a26cd4
Switch node: 0x10000027f8a26cd4
hba dev: /dev/fcd3
drviver state: ONLINE
fcms device: 3/0/8/1/0/4/1
WWN sys: 0x500143800542b4fb
WWP sys: 0x500143800542b4fa
Switch port: 0x20a80027f8a09ff8
Switch node: 0x10000027f8a09ff8
——————————————————————–
8-0-1-7 3/0/2/1
Nework info:
info lan1: 192.8.0.95 3/0/2/1/0/6/0 0x0025B3E86066 UP up(1) up(1)
info lan2: 119.101.3.71 3/0/2/1/0/6/1 0x0025B3E86067 UP up(1) up(1)
HBA info:
hba dev: /dev/fcd0
drviver state: AWAITING_LINK_UP
fcms device: 3/0/2/1/0/4/0
WWN sys: 0x500143800542b4b5
WWP sys: 0x500143800542b4b4
Switch port: 0000000000000000
Switch node: 0000000000000000
hba dev: /dev/fcd1
drviver state: AWAITING_LINK_UP
fcms device: 3/0/2/1/0/4/1
WWN sys: 0x500143800542b4b7
WWP sys: 0x500143800542b4b6
Switch port: 0000000000000000
Switch node: 0000000000000000
——————————————————————–
8-0-1-5 3/0/6/0/0/0
Nework info:
ifconfig: no such interface
info lan7: 3/0/6/0/0/0/0/2/0/0/0 0x001E0B5186F0 UP up(1) up(1)
info lan8: 0.0.0.0 3/0/6/0/0/0/0/2/0/0/1 0x001E0B5186F1 UP up(1) up(1)
HBA info:
hba dev: /dev/fclp6
drviver state: ONLINE
fcms device: 3/0/6/0/0/0/0/4/0/0/0
WWN sys: 0x5001438001314ad5
WWP sys: 0x5001438001314ad4
Switch port: 0x20260027f8a09ff8
Switch node: 0x10000027f8a09ff8
hba dev: /dev/fclp7
drviver state: ONLINE
fcms device: 3/0/6/0/0/0/0/4/0/0/1
WWN sys: 0x5001438001314ad7
WWP sys: 0x5001438001314ad6
Switch port: 0x20950027f8a26cd4
Switch node: 0x10000027f8a26cd4
——————————————————————–
8-0-1-6 3/0/4/0/0/0
Nework info:
info lan5: 0.0.0.0 3/0/4/0/0/0/0/2/0/0/0 0x001E0B5186B4 UP up(1) up(1)
info lan6: 0.0.0.0 3/0/4/0/0/0/0/2/0/0/1 0x001E0B5186B5 UP up(1) up(1)
HBA info:
hba dev: /dev/fclp4
drviver state: ONLINE
fcms device: 3/0/4/0/0/0/0/4/0/0/0
WWN sys: 0x5001438001314a99
WWP sys: 0x5001438001314a98
Switch port: 0x200f0027f8a09ff8
Switch node: 0x10000027f8a09ff8
hba dev: /dev/fclp5
drviver state: ONLINE
fcms device: 3/0/4/0/0/0/0/4/0/0/1
WWN sys: 0x5001438001314a9b
WWP sys: 0x5001438001314a9a
Switch port: 0x20140027f8a09ff8
Switch node: 0x10000027f8a09ff8
——————————————————————–

Key output is this:
8-0-1-6
This is how the backplane is actually labeled.

cat backplane.layout.ksh
#!/usr/bin/ksh
#
# vgfiberswitch.ksh
# Steven “Shmuel” Protter steven.protter@hcl.com
#
. /var/adm/bin/.scriptenv
PATH=/opt/fcms/bin:${PATH}
####
# binary location
#
LS=/usr/sbin/lanscan
IS=/usr/sbin/ioscan
NW=/usr/sbin/nwmgr
IF=/usr/sbin/ifconfig
FU=/opt/fcms/bin/fcmsutil
LL=/usr/sbin/linkloop
LA=/usr/sbin/lanadmin

echo “m ${modinfo}”
echo “ml ${modinfol}”
echo “——————————————————————–”
if [ "${modinfo}" = "rx8640" ] ||[ "${modinfo}" = "rx7640" ]
then
echo “Valid model found: ${modinfo}”
else
echo “INVALID model found: ${modinfo}”
echo “Exiting return code 1 ………”
exit 1
fi
## determine number of multifunction cards to expect
ncards=$(olrad -n);
olrad -q| awk ‘/Yes/{ printf “%s %s\n”,$1,$2 }’ | while read -r slot hwp
do
echo “${slot} ${hwp}”
echo “Nework info:”
## network info
${LS} | grep “${hwp}” | awk ‘{ printf “%s %s %s %s %s\n”,$1,$2,$3,$4,$5 }’ | while read -r fwp mad nn st ln
do
### echo “hwp: ${fwp} mad: ${mad} netnum: ${nn} status ${st} lan:${ln}”
ipady=$(ifconfig ${ln} |awk ‘/inet/{print $2}’);
last1=$(lanadmin -g $nn |awk ‘/Administration Status/{ print $NF}’);
last2=$(lanadmin -g $nn |awk ‘/Operation Status/{ print $NF}’);
echo “info ${ln}: ${ipady} ${fwp} ${mad} ${st} ${last1} ${last2}”
done
echo “HBA info:”
ioscan -fnCfc -H ${hwp} | awk ‘/dev/{print $NF}’ |while read -r dv
do
nnwwn=$(${FU} ${dv}|awk ‘/N_Port Node World Wide Name/{print $NF}’);
npwwn=$(${FU} ${dv}|awk ‘/N_Port Port World Wide Name/{print $NF}’);
spwwn=$(${FU} ${dv}|awk ‘/Switch Port World Wide Name/{print $NF}’);
snwwn=$(${FU} ${dv}|awk ‘/Switch Node World Wide Name/{print $NF}’);
drst=$(${FU} ${dv}|awk ‘/Driver state/{print $NF}’);
fchw=$(${FU} ${dv}|awk ‘/Hardware Path is/{print $NF}’);
echo “hba dev: ${dv}”
echo “drviver state: ${drst}”
echo “fcms device: ${fchw}”
echo “WWN sys: ${nnwwn}”
echo “WWP sys: ${npwwn}”
echo “Switch port: ${spwwn}”
echo “Switch node: ${snwwn}”
done

echo “——————————————————————–”
done

relevant parts of .scriptenv

OSM=$(uname -s);
OSV=$(uname -r);

# determine the third octet
hn=$(hostname);

## /Depots/B.11.31/2014midyear_depot
## /Depots/B.11.23/2014midyear_depot

if [ "${OSM}" = "HP-UX" ]
then
echo “Executing HP-UX specific environment parameters…”
modinfo=$(model | awk ‘{print $NF}’);
modinfol=$(model | awk ‘{printf “%s %s %s %s\n”,$1,$2,$3,$4}’);
isvirt=$(model | awk ‘/Virtual/{print $NF}’ | wc -l);

Tags: , , ,

28 Jan 15 Ignite Golden Image server setup

These are my notes as I take a golden image and build a golden image server.

It is based on a document written in 2007 by Geoff Wild, fellow ITRC poster and friend. I simply need my own copy with notes. I will be doing a Golden Image for B.11.31 and B.11.23, but recording the process once, as I build it.

On the ignite server:
mkdir –p /var/opt/ignite/recovery/golden_images
## bdfmegs is by Bill Hassell and provides nice 1 line bdf output. It is much better for scripting than bdf. Just making sure we have space.
/var/adm/bin/bdfmegs /var/opt/ignite/recovery/golden_images
File-System Mbytes Used Avail %Used Mounted on
/dev/vg01/lv_ignite 467.6g 337.6g 122.0g 73% /var/opt/ignite

digush0:root > bdf /var/opt/ignite/recovery/golden_images
Filesystem kbytes used avail %used Mounted on
/dev/vg01/lv_ignite
467599360 337557391 122002189 73% /var/opt/ignite

Add /var/opt/ignite/recovery/golden_images to /etc/dfs/dfstab
##share -F nfs -o anon=2 -d “Ignite Golden Images” /var/opt/ignite/recovery/golden_images

exportfs -av

The next steps are on the server you are imaging. It should have an up to date Operating Environment and be current on patches. The more effort you take in cleaning it up, the better your image will be.

## Run a script to make sure I’m up to date on OE and patching.
root@dmdpvh0# ./450_bundleoe
Executing HP-UX specific environment parameters…
Installed OE is B.11.31.1303 : OEVER B.11.31.1303
dmdpvh0 pass Operating Environment is B.11.31.1303
dmdpvh0 pass QPK APPS is B.11.31.1403.400a
dmdpvh0 pass QPK BASE is B.11.31.1403.400a
#### end report ./450_bundleoe dmdpvh0 ####
## make a mount point
root@dmdpvh0# mkdir -p /mnt/ig_gimage
## mount it
mount digush0:/var/opt/ignite/recovery/golden_images /mnt/ig_gimage/
## copy ignite binary/script
# cp /opt/ignite/data/scripts/make_sys_image /tmp
# chmod 700 /tmp/make_sys_image
## make an exclude list
# vi /tmp/user_exclude_files
+NO_ARCHIVE
/app
/staging
/usr/local/include/c++
/usr/local/lib/gcc
/opt/langtools
/opt/aCC
/data
/mnt

# /tmp/make_sys_image –v –s local –d /mnt/ig_gimage -f /tmp/user_exclude_files
# save_config -f server_disk.cfg vg00

Back on the ignite server
# cp /opt/ignite/data/examples/core11.cfg /var/opt/ignite/recovery
#cd /var/opt/ignite/recovery/golden_images/
# /opt/ignite/lbin/archive_impact -t -g server.gz > impacts

# vi server.cfg
[sw_source] stanza nfs_source=”192.168.14.146:/var/opt/ignite/recovery/golden_images”
[sw_sel] stanza there are two of them, one for 32-bit the other for 64-bit OS
description=”HP-UX 11.11 Golden Image 64-bit (SERVER)”

archive_path=”server.gz”

replace “impacts” lines with archive_impact output from above

# vi server_disk.cfg

Remove second disk from vg00, ignite is not going to create a boot area on it anyway

init _hp_root_grp_disks=1

Delete the following entry.

physical_volume disk [X/X/X] {
….
}

Delete all the occurrences on disk[X/X/X] in logical_volume sections.

_hp_disk_layout=”HP-UX SERVER save_config layout”

Delete all hw_instance_num lines

In the “network” section delete all final lines expect for dns_

Add the new configuration file into Ignite-UX

# vi /var/opt/ignite/INDEX

cfg “HP-UX 11i Golden Image B.11.31” {

description “HP-UX 11i Golden Image B.11.31”

“/opt/ignite/data/Rel_B.11.11/config”

“/var/opt/ignite/recovery/golden_images/server.cfg”

“/var/opt/ignite/recovery/golden_images/server_disk.cfg”

“/var/opt/ignite/config.local”

}

Tags:

12 Jan 15 hpvm guest vlan reconfiguration after a clone

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.

Tags: ,

04 Dec 14 Quick and dirty hpvm network rebuild

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: , , ,