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

10 Nov 19 How to be a yes man

Learning something new is great. Joe Geiger taught me something cool that I should have learned years ago.

Serviceguard users ever wanted to script a cluster change such as a node add.

cmapplyconf -v -P <package file>

Ends with a y/n prompt do you want to apply? Normally that requires input. Not with the yes command:

cmcheckconf -v -P <package file>

rc=$?

# Check return code if not zero stop

if [ ${rc} -ne 0 ]

then

echo “Checkconf error ${rc}”

exit ${rc}

fi

yes | cmapplyconf -v -P <package file>

# Check return code here as well

Tags: , , , ,

04 Oct 18 Glance/midaemons wont start

Troublehooting steps:

1- Remove the /var/opt/perf/ttd.pid and try to start glance again

 

#rm /var/opt/perf/ttd.pid

#glance

 

2- If the above fails to fix it then stop and restart Glance as follows

 

# mwa stop

# midaemon -smdvss 4M -kths 1000 -pids 5000 -p # ps -ef | grep midaemon Make sure the midaemon is running, # mwa start

 

Modify MWA_START_COMMAND variable in /etc/rc.config.d/ovpa as follows to keep the changes across system reboot.

 

# grep MWA_START_COMMAND /etc/rc.config.d/ovpa MWA_START_COMMAND=”/opt/perf/bin/midaemon -smdvss 4M -kths 1000 -pids 5000 -p ; /opt/perf/bin/mwa start”

 

Tags: , , , ,

30 Nov 17 No downtme migration of mounted filesystem to new storage type

On LVM 1.0 Volume group, the task is no downtime storage migration.
 Hitachi to Pure Solid State storage. Mirror/UX required.
 Disks are almostthe same size:

dbrestore:root > diskinfo /dev/rdisk/disk42
 SCSI describe of /dev/rdisk/disk42:
 vendor: HITACHI
 product id: OPEN-V
 type: direct access
 size: 16777216 Kbytes
 bytes per sector: 512
 dbrestore:root > diskinfo /dev/rdisk/disk52
 SCSI describe of /dev/rdisk/disk52:
 vendor: PURE
 product id: FlashArray
 type: direct access
 size: 10485760 Kbytes
 bytes per sector: 512

pvcreate /dev/rdisk/disk52
 vgextend /dev/vgtest /dev/disk/disk52

Before state:
 dbrestore:root > vgdisplay -v vgtest
 --- Volume groups ---
 VG Name /dev/vgtest
 VG Write Access read/write
 VG Status available
 Max LV 255
 Cur LV 1
 Open LV 1
 Max PV 16
 Cur PV 2
 Act PV 2
 Max PE per PV 4095
 VGDA 4
 PE Size (Mbytes) 4
 Total PE 6654
 Alloc PE 1024
 Free PE 5630
 Total PVG 0
 Total Spare PVs 0
 Total Spare PVs in use 0
 VG Version 1.0
 VG Max Size 262080m
 VG Max Extents 65520

--- Logical volumes ---
 LV Name /dev/vgtest/lvtest
 LV Status available/syncd
 LV Size (Mbytes) 4096
 Current LE 1024
 Allocated PE 1024
 Used PV 1

--- Physical volumes ---
 PV Name /dev/disk/disk42
 PV Status available
 Total PE 4095
 Free PE 4095
 Autoswitch On
 Proactive Polling On

PV Name /dev/disk/disk52
 PV Status available
 Total PE 2559
 Free PE 1535
 Autoswitch On
 Proactive Polling On

dbrestore:root > ioscan -NfnCdisk /dev/disk/disk42
 Class I H/W Path Driver S/W State H/W Type Description
 ===================================================================
 disk 42 64000/0xfa00/0x21 esdisk CLAIMED DEVICE HITACHI OPEN-V
 /dev/disk/disk42 /dev/rdisk/disk42
 dbrestore:root > ioscan -NfnCdisk /dev/disk/disk52
 Class I H/W Path Driver S/W State H/W Type Description
 ===================================================================
 disk 52 64000/0xfa00/0x35 esdisk CLAIMED DEVICE PURE FlashArray
 /dev/disk/disk52 /dev/rdisk/disk52
 dbrestore:root > bdf | grep test
 /dev/vgtest/lvtest 4194304 19544 3913845 0% /test
 dbrestore:root > lvdisplay -v /dev/vgtest/lvtest
 --- Logical volumes ---
 LV Name /dev/vgtest/lvtest
 VG Name /dev/vgtest
 LV Permission read/write
 LV Status available/syncd
 Mirror copies 0
 Consistency Recovery MWC
 Schedule parallel
 LV Size (Mbytes) 4096
 Current LE 1024
 Allocated PE 1024
 Stripes 0
 Stripe Size (Kbytes) 0
 Bad block on
 Allocation strict
 IO Timeout (Seconds) default

--- Distribution of logical volume ---
 PV Name LE on PV PE on PV
 /dev/disk/disk42 1024 1024

--- Logical extents ---
 LE PV1 PE1 Status 1
 00000 /dev/disk/disk42 00000 current
 00001 /dev/disk/disk42 00001 current
 00002 /dev/disk/disk42 00002 current
 ...
 01022 /dev/disk/disk42 01022 current
 01023 /dev/disk/disk42 01023 current

dbrestore:root > lvextend -m 1 /dev/vgtest/lvtest /dev/disk/disk52
 The newly allocated mirrors are now being synchronized.This operation will
 take some time. Please wait ....
 Logical volume "/dev/vgtest/lvtest" has been successfully extended.
 Volume Group configuration for /dev/vgtest has been saved in /etc/lvmconf/vgtest.conf
 dbrestore:root > lvdisplay -v /dev/vgtest/lvtest
 --- Logical volumes ---
 LV Name /dev/vgtest/lvtest
 VG Name /dev/vgtest
 LV Permission read/write
 LV Status available/syncd
 Mirror copies 1
 Consistency Recovery MWC
 Schedule parallel
 LV Size (Mbytes) 4096
 Current LE 1024
 Allocated PE 2048
 Stripes 0
 Stripe Size (Kbytes) 0
 Bad block on
 Allocation strict
 IO Timeout (Seconds) default

--- Distribution of logical volume ---
 PV Name LE on PV PE on PV
 /dev/disk/disk42 1024 1024
 /dev/disk/disk52 1024 1024

--- Logical extents ---
 LE PV1 PE1 Status 1 PV2 PE2 Status 2
 00000 /dev/disk/disk42 00000 current /dev/disk/disk52 00000 current
 00001 /dev/disk/disk42 00001 current /dev/disk/disk52 00001 current
 00002 /dev/disk/disk42 00002 current /dev/disk/disk52 00002 current
 ...
 01023 /dev/disk/disk42 01023 current /dev/disk/disk52 01023 current

dbrestore:root > bdf | grep test
 /dev/vgtest/lvtest 4194304 19544 3913845 0% /test
 dbrestore:root > lvreduce -m 0 /dev/vgtest/lvtest /dev/disk/disk42
 Logical volume "/dev/vgtest/lvtest" has been successfully reduced.
 Volume Group configuration for /dev/vgtest has been saved in /etc/lvmconf/vgtest.conf
 dbrestore:root > bdf | grep test
 /dev/vgtest/lvtest 4194304 19544 3913845 0% /test
 dbrestore:root > lvdisplay -v /dev/vgtest/lvtest
 --- Logical volumes ---
 LV Name /dev/vgtest/lvtest
 VG Name /dev/vgtest
 LV Permission read/write
 LV Status available/syncd
 Mirror copies 0
 Consistency Recovery MWC
 Schedule parallel
 LV Size (Mbytes) 4096
 Current LE 1024
 Allocated PE 1024
 Stripes 0
 Stripe Size (Kbytes) 0
 Bad block on
 Allocation strict
 IO Timeout (Seconds) default

--- Distribution of logical volume ---
 PV Name LE on PV PE on PV
 /dev/disk/disk52 1024 1024

--- Logical extents ---
 LE PV1 PE1 Status 1
 00000 /dev/disk/disk52 00000 current
 00001 /dev/disk/disk52 00001 current

...
 01023 /dev/disk/disk52 01023 current

dbrestore:root > bdf | grep test
 /dev/vgtest/lvtest 4194304 19544 3913845 0% /test
 dbrestore:root >

Tags: , ,

28 Nov 17 An xpinfo that works in hpvm guests and on non Hitachi storage

Hitachi shops faced annoyance times two:
1. xpinfo does not work on non-Hitachi storage for example Pure storage
2. xpinfo does not work on hpvm guests depending on how the storage is passed through from the hpvm host

I now present xpinfonew which though raw and unfnished
The output:

myserv0:root > ./xpinfonew
Device path ldev
==========================================================================
/dev/rdisk/disk111 =:=
/dev/rdisk/disk12 30:86
/dev/rdisk/disk172 03:f3
/dev/rdisk/disk215 46:2c
/dev/rdisk/disk216 46:30
/dev/rdisk/disk217 46:34
/dev/rdisk/disk218 46:38
/dev/rdisk/disk219 46:28
/dev/rdisk/disk220 46:25
/dev/rdisk/disk221 46:27
/dev/rdisk/disk222 46:2a
/dev/rdisk/disk223 46:2e
/dev/rdisk/disk224 46:32
/dev/rdisk/disk225 46:2b
/dev/rdisk/disk226 46:2f
/dev/rdisk/disk227 46:33
/dev/rdisk/disk237 46:37
/dev/rdisk/disk238 46:36
/dev/rdisk/disk239 46:26
/dev/rdisk/disk240 46:29
/dev/rdisk/disk241 46:2d
/dev/rdisk/disk242 46:31
/dev/rdisk/disk243 46:35
/dev/rdisk/disk244 46:39
/dev/rdisk/disk4 aa:bf
/dev/rdisk/disk5 8b:c3
/dev/rdisk/disk6 03:a6
/dev/rdisk/disk9 01:00

myserv0:root > ./xpinfonew raw
Device path ldev
==========================================================================
/dev/rdisk/disk111 =
/dev/rdisk/disk12 3086
/dev/rdisk/disk172 03f3
/dev/rdisk/disk215 462c
/dev/rdisk/disk216 4630
/dev/rdisk/disk217 4634
/dev/rdisk/disk218 4638
/dev/rdisk/disk219 4628
/dev/rdisk/disk220 4625
/dev/rdisk/disk221 4627
/dev/rdisk/disk222 462a
/dev/rdisk/disk223 462e
/dev/rdisk/disk224 4632
/dev/rdisk/disk225 462b
/dev/rdisk/disk226 462f
/dev/rdisk/disk227 4633
/dev/rdisk/disk237 4637
/dev/rdisk/disk238 4636
/dev/rdisk/disk239 4626
/dev/rdisk/disk240 4629
/dev/rdisk/disk241 462d
/dev/rdisk/disk242 4631
/dev/rdisk/disk243 4635
/dev/rdisk/disk244 4639
/dev/rdisk/disk4 aabf
/dev/rdisk/disk5 8bc3
/dev/rdisk/disk6 03a6
/dev/rdisk/disk9 0100

cat xpinfonew
#!/bin/ksh
# Get ldev from any disk regardless of storage provider
#
# 10/26/2017 Steven “Shmuel” Protter steven.protter@hcl.com
#

echo “Device path \t\t ldev ”
echo “==========================================================================”

ioscan -NfnCdisk | awk ‘/rdisk/{ print $(NF) }’ | awk -F_ ‘{ print $1 }’ | sort -u |while read -r dv
do
ldev=$(/var/adm/bin/getldev.ksh ${dv} ${1} );
echo “${dv} \t ${ldev}”
done

The code:
cat /var/adm/bin/getldev.ksh
#!/bin/ksh
# Get ldev from any disk regardless of storage provider
#
# 10/26/2017 Steven “Shmuel” Protter steven.protter@hcl.com
#
argies=$#
if [ $argies -eq 0 ]
then
echo “———— 1 argument required device path ex: /dev/rdisk/disk101 ————-”
exit 1
fi
dv=$1
fmt=$2
## /usr/sbin/scsimgr lun_map -D ${dv} | awk ‘/World Wide Identifier/{ print $(NF) }’
rldev=$(/usr/sbin/scsimgr lun_map -D ${dv} | awk ‘/World Wide Identifier/{ print substr ( $NF, length($NF) – 3, length($NF) ) }’);

l1=$(echo ${rldev} | awk ‘{ print substr ( $NF, length($NF) – 3, 2 ) }’);
l2=$(echo ${rldev} | awk ‘{ print substr ( $NF, length($NF) – 1, length($NF) ) }’);

### echo “raw: ${rldev} l1: ${l1} l2: ${l2} …”
if [ “$fmt” = “raw” ]
then
echo ${rldev}
else
echo “${l1}:${l2}”
fi

Should work on any SAN based storage

Tags: , , , ,

15 Jan 16 Automated setboot check and correction

When you use drd to patch and update systems offline to reduce downtime there is an unintended impact: setboot issues.

Using HP best practices after you boot the new image the setboot -a (alternate) and -p (primary) settings are often the same.

Below is an audit and correction script that helps you track the issue and limit manual intervention and the human error it can introduce:
myserv0:root > cat 349_bootconf
#!/bin/ksh
#########################################################################
# default_umask

#HPUX_SCRIPTS=/opt/depots/scripts/system_build/HPUX
#COMMON=/opt/depots/scripts/system_build/COMMON
# Load common environment
. /var/adm/bin/.scriptenv

#
# The point here is there should be an a primary boot disk
# and an alternate boot disk and they need to be different
#
pboot=$(/usr/sbin/setboot | grep ^Primary | awk ‘{ print $NF }’ | awk -F\/ ‘{print $NF}’ |
awk -F\) ‘{print $1}’);
aboot=$(/usr/sbin/setboot | grep ^Alternate |awk ‘{ print $NF }’|awk -F\/ ‘{print $NF}’ |
awk -F\) ‘{print $1}’);

if [ “$aboot” = “$pboot” ]
then
echo “NOTICE – ${hn} The primary boot disk ${pboot} is the same as the alternate boot disk ${aboot}”
else
echo “pass – The primary boot disk ${pboot} is the different than the alternate boot disk ${aboot}”

fi

if [ “$1” = “-y” ];then
echo “This may need to be remediated manually.”

#
# attempt to figure this out in an automated fashion
#
#
# Determine what the boot dg is.
# Try to use DRD configuration to determine the alt. boot disk and set it.
> /tmp/drdstatus.tfile.txt
/opt/drd/bin/drd status -x logfile=/tmp/drdstatus.tfile.txt
CLONE_DISK=$(awk ‘/Clone Disk: /{ print $NF}’ /tmp/drdstatus.tfile.txt | awk -F\/ ‘{ print $4 }’ | awk -F\) ‘{ print $1 }’);
echo “Clone disk is ${CLONE_DISK}”
setboot -a /dev/rdisk/${CLONE_DISK}
fi

echo “#### end report $0 ${sn} ####”

There is an audit script:

myserver0:root > /var/adm/bin/audit/349_bootconf
Executing HP-UX specific environment parameters…
NOTICE – The primary boot disk disk1972 is the same as the alternate boot disk disk1972
#### end report /var/adm/bin/audit/349_bootconf myserv0 ####

mysys03:root > setboot
Primary bootpath : 2/0/2/1/0/4/1.0x50060e80166f4202.0x4001000000000000 (/dev/rdisk/disk2490)
HA Alternate bootpath :
Alternate bootpath : 2/0/2/1/0/4/0.0x50060e80166f4212.0x4001000000000000 (/dev/rdisk/disk2490)

Autoboot is ON (enabled)
Hyperthreading : ON
: ON (next boot)

This is wrong but is a known issue that results from my patch methodology

First step to fixing is to confirm current booted details and drd details

mysys03:root > lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/disk/disk2490_p2 — Boot Disk
Boot: lvol1 on: /dev/disk/disk2490_p2
Root: lvol3 on: /dev/disk/disk2490_p2
Swap: lvol2 on: /dev/disk/disk2490_p2
Dump: lvol2 on: /dev/disk/disk2490_p2, 0

lvlnboot: Volume group not activated.
Cannot display volume group “/dev/vgAP1”.
lvlnboot: Volume group not activated.
Cannot display volume group “/dev/vgsapAP1”.
mysys03:root > cat /var/adm/bin/drd_data
DISK1=/dev/disk/disk2490
DISK2=/dev/disk/disk1951
mysys03:root > drd status

======= 01/14/16 14:15:17 PST BEGIN Displaying DRD Clone Image Information
(user=root) (jobid=mysys03)

* Clone Disk: /dev/disk/disk1951
* Clone EFI Partition: AUTO file present, Boot loader present
* Clone Rehost Status: SYSINFO.TXT not present
* Clone Creation Date: 01/07/16 15:00:27 PST
* Last Sync Date: None
* Clone Mirror Disk: None
* Mirror EFI Partition: None
* Original Disk: /dev/disk/disk2490
* Original EFI Partition: AUTO file present, Boot loader present
* Original Rehost Status: SYSINFO.TXT not present
* Booted Disk: Original Disk (/dev/disk/disk2490)
* Activated Disk: Original Disk (/dev/disk/disk2490)

======= 01/14/16 14:15:40 PST END Displaying DRD Clone Image Information
succeeded. (user=root) (jobid=mysys03)
Fix is currently manual

mysys03:root > setboot -a /dev/rdisk/disk1951
Alternate boot path set to 2/0/2/1/0/4/0.0x50060e80166f4212.0x4000000000000000 (/dev/rdisk/disk1951)
mysys03:root > setboot
Primary bootpath : 2/0/2/1/0/4/1.0x50060e80166f4202.0x4001000000000000 (/dev/rdisk/disk2490)
HA Alternate bootpath :
Alternate bootpath : 2/0/2/1/0/4/0.0x50060e80166f4212.0x4000000000000000 (/dev/rdisk/disk1951)

Autoboot is ON (enabled)
Hyperthreading : ON
: ON (next boot)

Possible automated fix (needs to be verified manually first use).

mysys00:root > ./349_bootconf -y
Executing HP-UX specific environment parameters…
NOTICE – The primary boot disk disk1972 is the same as the alternate boot disk disk1972
This may need to be remmediated manually.

======= 01/14/16 14:43:22 PST BEGIN Displaying DRD Clone Image Information
(user=root) (jobid=aappch0)

* Clone Disk: /dev/disk/disk2236
* Clone EFI Partition: AUTO file present, Boot loader present
* Clone Rehost Status: SYSINFO.TXT not present
* Clone Creation Date: 01/14/16 14:00:36 PST
* Last Sync Date: None
* Clone Mirror Disk: None
* Mirror EFI Partition: None
* Original Disk: /dev/disk/disk1972
* Original EFI Partition: AUTO file present, Boot loader present
* Original Rehost Status: SYSINFO.TXT not present
* Booted Disk: Original Disk (/dev/disk/disk1972)
* Activated Disk: Original Disk (/dev/disk/disk1972)

======= 01/14/16 14:43:45 PST END Displaying DRD Clone Image Information
succeeded. (user=root) (jobid=aappch0)

Clone disk is disk2236
Alternate boot path set to 3/0/4/0/0/0/0/4/0/0/1.0x50060e80166f4273.0x4001000000000000 (/dev/rdisk/disk2236)
#### end report ./349_bootconf aappch0 ####
myserv0:root > ./349_bootconf
Executing HP-UX specific environment parameters…
Pass – The primary boot disk disk1972 is the different than the alternate boot disk disk2236
#### end report ./349_bootconf aappch0 ####
myserv0:root > setboot
Primary bootpath : 3/0/6/0/0/0/0/4/0/0/0.0x50060e80166f4213.0x4000000000000000 (/dev/rdisk/disk1972)
HA Alternate bootpath :
Alternate bootpath : 3/0/4/0/0/0/0/4/0/0/1.0x50060e80166f4273.0x4001000000000000 (/dev/rdisk/disk2236)

Autoboot is ON (enabled)
Hyperthreading : ON
: ON (next boot)

Tags: , ,

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

15 Sep 14 Console information on an rx2660 (and probably others)

I found my console for an rx2660 ignite server offline. Was not able to ping it.

So I had to go a hunting on the Internet for a procedure to display the actual information from the running OS.

The IP addresses have been changed to protect the innocent.

/opt/propplus/bin/cprop -detail -c “Management Processor”

[Component]: Management Processor
[Table]: Management Processor
——————————————————-
****************************************************
[Hash ID]: Management Processor:c318dfa5x309885cd
< ClassName:HP_ManagementProcessor NameSpace:root/cimv2 >
[UniqueIdentifier]: 0.28.196.251.43.153
[ControllerType]: Unknown
[IPAddress]: 192.168.7.156
[URL]: https://192.168.7.156
[Dedicated]: Management
[CreationClassName]: HP_ManagementProcessor
[Name]: Management Processor
[EnabledState]: Enabled
[OperationalStatus]: OK
[FirmwareRevision]: F.002.025.000
[LEDColour]: 0
[LEDBlinkRate]: 0
[NICCondition]: 2
****************************************************

I found this output worthy of note as well:

 

hostname:root > /opt/propplus/bin/cprop -list
****************************************
STATUS | COMPONENT NAME
========================================
No status | Software Bundles
No status | System Summary
Normal | Cooling
Normal | Processors
Normal | FC HBA
No status | FRU Information
No status | Firmware Information
Normal | IOTree
Normal | Memory
No status | Mem Error
No status | Memory Utilization
Normal | Management Processor
Minor | Network Information
Minor | Power
No status | Process Information
No status | Software Products
Normal | Temperature
Normal | Voltage
No status | Boot Device Configuration
No status | Crash Dump Configuration
Unknown | RAIDSA HBA
Normal | SAS HBA
Unknown | SCSI HBA
Normal | Disk Drive
****************************************

Tags: , , ,

05 Jul 11 VxVM replace boot disk

Create a partition description file

(Need to update the EFI and HPSP size below according to the other root disk partition’s size)
This examples is where the new disk is disk85. Applies only to HP-UX 11.31 with VxVM as boot drive manager.

# vi /tmp/efipart

3
EFI 500MB
HPUX 100%
HPSP 400MB

Use the idisk(1M) command to partition the disk according to this file
# idisk -wf /tmp/efipart /dev/rdisk/disk85

Write EFI info to the EFI partition on the disk
# mkboot -e -l /dev/rdisk/disk85

Confirm the AUTO file entry is intact It should be  “boot vmunix”
# efi_cp -d /dev/rdisk/disk85_p1 -u /EFI/HPUX/AUTO /tmp/efi; cat /tmp/efi

If found any difference, edit /tmp/efi file  as below to update the entry “boot vmunix”
#echo “boot vmunix ” > /tmp/efi

Update auto file
#efi_cp -d /dev/rdisk/disk85_p1 /tmp/efi /EFI/HPUX/AUTO

Confirm the AUTO file entry again, It should be  “boot vmunix”
# efi_cp -d /dev/rdisk/disk85_p1 -u /EFI/HPUX/AUTO /tmp/efi; cat /tmp/efi

Initialize the disk as VXVM  boot disk

#### vxdisksetup -iB disk85_p2  ((lives in etc vx bin slashes removed due to Word Press error))

Add the disk to the existing rootdg
# vxdg -g rootdg adddisk rootdisk02=disk85_p2

Write Volume Manager volume information to the LABEL file:
# /opt/VRTS/bin/vxbootsetup rootdisk02

Display the LIF and Volume Manager label information:
# vxvmboot -v /dev/rdisk/disk85

Check the Mirror status  ( Each volume should be with two plex )
$ vxprint –htg rootdg |egrep –i “^v|^pl”

 

Tags: , , , ,

16 Mar 11 Preparation procedure for hpux boot disk (11.31)

# vi /tmp/idf
3
EFI 500MB
HPUX 100%
HPSP 400MB

Use the idisk command to initialize:

 

idisk -wf /tmp/idf /dev/rdsk/disk8

 

Replace disk with the disk you intend to use.

 

insf -e -C disk

# May need to be used in advance to insure the device is recognized.

Tags: , , , , , ,

20 May 10 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=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: , , , , , , ,

sidebarbottom
sidebartop
sidebarbottom
WhatsApp chat