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

06 Aug 14 Custom naming your bi-annual HP-UX patch sets

Having a name associated with your bi-annual patch file makes it easier to inventory than the default BUNDLE

This is based on doing a QPK download which requires a support agreement. Output is from 11.23 it worked with 11.31 as well.

./create_depot_hpux.11.23 -b”201407HPUXPATCHMINE” -t 201407HPUXPATCHMINE

< .. lots of boring output >

# DEST -s the destination of the patch set.

cd depot

swcopy -x enforce_dependencies=false -s $PWD \* @ $DEST

< .. lots of boring output >

mygush0:root > swlist -l bundle -s $DEST
# Initializing…
# Contacting target “mygush0″…
#
# Target:  mygush0:/Depots/B.11.23/2014midyear_depot
#

201407HPUXPATCHMINE         B.2014.08.06   201407HPUXPATCHMINE
DNSUPGRADE                    C.9.3.2.13.0   BIND UPGRADE
FEATURE11i                    B.11.23.1009.083 Feature Enablement Patches for HP-UX 11i v2, September 2010
HPSIM-HP-UX                   C.07.03.00.00.03 HP Systems Insight Manager Server Bundle
HWEnable11i                   B.11.23.1012.085a Hardware Enablement Patches for HP-UX 11i v2, October 2010
JAVAOOB                       2.05.00        Java2 Out-of-box for HP-UX
NodeHostNameXpnd              B.11.23.01     Nodename, Hostname expansion enhancement
OpenSSL                       A.00.09.08za.002 Secure Network Communications Protocol
QPKAPPS                       B.11.23.1012.086a Applications Patches for HP-UX 11i v2, December 2010
QPKBASE                       B.11.23.1012.086a Base Quality Pack Bundle for HP-UX 11i v2, December 2010

More fun

Tags: , ,

12 Jul 11 Migrate VXVM booted system to LVM

From the HP-UX Veritas Administration guide, buried on page 106

This example shows how to create an LVM root disk on physical disk c0t1d0
after removing the existing LVM root disk configuration from that disk.

BOOTBG=$(vxdg bootdg)

vxprint -htg $BOOTDG | grep ^dm

dm rootdisk01   disk233_p2   auto     1024     142450592 –
dm rootmirr     disk234_p2   auto     1024     142450592 –

# You get the boot disk from this command. Break off the s2 if you are using legacy devices you can use them or the agile SDF devices.

# You may need to use vxbrk_mirror to break the mirror. Make sure you know which disk you are booted from. Check syslog to be sure. setboot is not a good indicator.

# Due to a wordpress error I’ve been forced to take the path etc vx bin out of the commands. I will fix this when wordpress stops blowing chunks on this data. Where there are spaces there need to be slashes.
#  etc vx bin vxdestroy_lvmroot -v c0t1d0
# etc vx bin vxres_lvmroot -v -b c0t1d0
The -b option to vxres_lvmroot sets c0t1d0 as the primary boot device.
As these operations can take some time, the verbose option, -v, is specified to
indicate how far the operation has progressed.

This command takes care of setboot and all details. Then just boot from the console.

This procedure does not remove VxVM software. The daemon still runs. But your system now boots LVM and that makes using Dynamic Root Disk (DRD) much easier.

 

Tags: , , , , , ,

11 Apr 11 swlist check the state of patches

swlist -l fileset -a state | grep -v config | sed ‘/^#/d’

 

Output looks like this:
PHCO_36551.CORE2-64SLIB               transient
PHCO_36551.CORE2-SHLIBS               transient

Look for stuff that is in state installed instead of configured.

swconfig \* or swconfig PHCO_36551 may fix the issue.

Tags: , ,

18 May 10 swlist command to provide install date

New trick learned from HP support backline engineer.

swlist -l fileset -a revision -a title -a state -a install_date

———Sample output ——
# vmGuestLib B.04.00 Integrity VM vmGuestLib 200903081306.51
vmGuestLib.GUEST-LIB B.04.00 Integrity VM GUEST-LIB fileset 200903081306.51 configured
# vmProvider B.04.00 WBEM Provider for Integrity VM vmProvider 200903081306.59
vmProvider.VM-PROV-CORE B.04.00 WBEM Provider for Integrity VM VM-PROV-CORE 200903081306.59 configured

Tags: , , , , , , , ,

04 Sep 09 Combining patch sets and deploying as a single file (tape format)

I’ve had to deliver some absolutely enormous patch sets in my day and it can be a real pain to have to tar them all up and untar them.

Another real problem in high availability environments is the urgent need to limit the number of boots you schedule.

The way around it is to create a larger single file tape format patch. The key command is swpackage.

I generally like to set up a major system update bi-annually.

In this example, I keep a file system called /patch which has plenty of room.

cd /patch

mkdir June-2009

cd June-2009

I then proceed to gather new software.

http://software.hp.com

Patch database on http://itrc.hp.com

I download the software depots directly to /patch/June-2009/

If security restrictions permit, I use a HP-UX based browser to get the software.hp.com stuff. It just avoids errors in the file transfer process. filezilla works well, if you must use a PC with windows to gather patches.

In the patch database, I use the scripted ftp option. I normally combine the bi-annual QPK/gold pack with any patches required by security_patch_check or SWA.

The scripted ftp option is great, because it restarts, and comes with a build in script to build a depot at the end of the download.

First I use the create_depot script, usually using the -d option

create_depot_<unique name> -d June-2009-bi-annual.depot

Now I have everything in the same directory with the extension depot.

First i build a depot. I have a script named depmake2

for i in *.depot
do

swcopy -x enforce_dependencies=FALSE \
-x mount_all_filesystems=FALSE \
-x reinstall=TRUE \
-x write_remote_files=TRUE \
-x layout_version=1.0 \
-s ${PWD}/$i \* @ ${1}
done

The $1 parameter is once gain the name of the new, combined depot I wish to create

depmake2 June-2009-bi-annual.depot

This will pick up anything I’ve downloaded from software.hp.com

swpackage -s /patch/June-2009/June-2009-bi-annual.depot -d June-2009.bid.tape.depot -x target_type=tape -x media_capacity=8000

The maximum media capacity is 8 GB.

What I am left with is a single tape depot that I can install on any system or even copy into an Ignite patch server with a single command.

swinstall -x autoreboot=true -x reinstall=false -s /path/June-2009.bid.tape.depot \*

One deployment, one reboot.

Before you install, don’t forget to Ignite your system. Always have a backup plan.

#!/usr/bin/sh
/opt/ignite/bin/make_tape_recovery -Av -x inc_entire=vg00 -x exclude=/home -d “description”
# /usr/contrib/bin/eject.tape

Or backup to a central Ignite NFS share.

/opt/ignite/bin/make_net_recovery -s tzfat -x inc_entire=vg00 -a jufdev:/scratch/ignite/archives -C

Ignite is a separate article

Tags: , ,

sidebarbottom
sidebartop
sidebarbottom
WhatsApp chat