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

03 Sep 19 Add new dump device

add device called lvdump1

[root@stlam61p]

:/home/root # lvchange -r n /dev/vg00/lvdump1

Set dump lv to contiguous. SEP

lvcreate -L <size in MB> -n lvdump1 /dev/vg00

# lvchange -C y /dev/vg00/lvdump1
Logical volume “/dev/vg00/lvdump1” has been successfully changed.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

# crashconf -a /dev/vg00/lvdump1

:/home/root # crashconf -v

15 Aug 19 APA network pairings: How to find out fast what they are

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

!/bin/ksh

#
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

01 Aug 17 Need a longer hostname 8+ Don’t forget the kernel parameter

Host names need to be descriptive. The trend toward longer names has been going on for years.

 

As a legacy Unix, HP-UX CAN keep up.

kctune -v expanded_node_host_names

mygush0:root > kctune -v expanded_node_host_names
Tunable expanded_node_host_names
Description Enables expanded node and host names (read manpage for warnings)
Module sysconfig
Current Value 0 [Default]
Value at Next Boot 0 [Default]
Value at Last Boot 0
Default Value 0
Constraints expanded_node_host_names >= 0
expanded_node_host_names <= 1
Can Change Immediately or at Next Boot

hostname is set in /etc/rc.config.d/netconf

But to make the system fully compatible the kernel needs to be set.

mygush0:root > kctune expanded_node_host_names=1
==> Update the automatic ‘backup’ configuration first? y
* The automatic ‘backup’ configuration has been updated.
* Future operations will update the backup without prompting.
WARNING: Setting the expanded_node_host_names parameter to 1 will allow
administrators to set node and host names larger than 8 and 64
characters/bytes, respectively. It is strongly recommended
that all related manpages and documentation be understood
before setting larger names. Larger names can cause some
applications which use those names to behave incorrectly or
fail.
* The requested changes have been applied to the currently
running configuration.
Tunable Value Expression Changes
expanded_node_host_names (before) 0 Default Immed
(now) 1 1
mygush0:root > kctune -v expanded_node_host_names
Tunable expanded_node_host_names
Description Enables expanded node and host names (read manpage for warnings)
Module sysconfig
Current Value 1
Value at Next Boot 1
Value at Last Boot 0
Default Value 0
Constraints expanded_node_host_names >= 0
expanded_node_host_names <= 1
Can Change Immediately or at Next Boot

Good to go.

 

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:

28 Aug 11 Using Ignite-UX to improve quality assurance in a large HP-UX environment

  • Maintain a legacy golden image in case problem is discovered with a newly developed build image.
  • Maintain a current golden image that includes all the latest patches, kernel tweaks and version improvements. Improve the speed of system recovery from unforeseen problem. Improve build consistency.
  • Maintain two current Ignite images that are system specific for each HP-UX host. This is the first line of defense in any problem or DR situation
  • Maintain major patch sets on the Ignite server and enabled scripted, automated patch implementation.
  • Use audit scripts and health check scripts to insure all systems are always up to organizational audit standards.



Support
WhatsApp chat