preload
May 20

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=0×000005 (/dev/pt/pt_disk11) vs minor2=0×000008 (/dev/rdisk/disk11)
checking disk12 – Minor numbers are probably incorrect
minor1=0×000006 (/dev/pt/pt_disk12) vs minor2=0×000009 (/dev/rdisk/disk12)
checking disk13 – Minor numbers are probably incorrect
minor1=0×000007 (/dev/pt/pt_disk13) vs minor2=0x00000a (/dev/rdisk/disk13)
checking disk14 – Minor numbers are probably incorrect
minor1=0×000008 (/dev/pt/pt_disk14) vs minor2=0x00000b (/dev/rdisk/disk14)
checking disk15 – Minor numbers are probably incorrect
minor1=0×000009 (/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=0×000017 (/dev/pt/pt_disk19) vs minor2=0×000013 (/dev/rdisk/disk19)
checking disk2 – OK
checking disk22 – Minor numbers are probably incorrect
minor1=0×000018 (/dev/pt/pt_disk22) vs minor2=0×000014 (/dev/rdisk/disk22)
checking disk23 – Minor numbers are probably incorrect
minor1=0×000019 (/dev/pt/pt_disk23) vs minor2=0×000015 (/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

Tagged with:
May 18

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

Tagged with:
Oct 27

 Important information in bold. Must run as root. Serial numbers changed to protect the innocent.

No electrons were harmed in the creation of this message.

root # fcmsutil /dev/fcd1

                           Vendor ID is = 0×001077
                           Device ID is = 0×002312
            PCI Sub-system Vendor ID is = 0x00103c
                   PCI Sub-system ID is = 0x0012c9
                               PCI Mode = PCI-X 133 MHz
                       ISP Code version = 3.3.18
                       ISP Chip version = 3
                      Previous Topology = UNINITIALIZED
                             Link Speed = UNKNOWN
                     Local N_Port_id is = None
                  Previous N_Port_id is = None
            N_Port Node World Wide Name = 0x50060b0000c1bd8b
            N_Port Port World Wide Name = 0x50060b0000c1bd8a
            Switch Port World Wide Name = 0×0000000000000000
            Switch Node World Wide Name = 0×0000000000000000
                           Driver state = AWAITING_LINK_UP
                       Hardware Path is = 3/0/12/1/0/4/1
                     Maximum Frame Size = 2048
         Driver-Firmware Dump Available = NO
         Driver-Firmware Dump Timestamp = N/A
                         Driver Version = @(#) libfcd.a HP Fibre Channel ISP 23xx & 24xx Driver B.11.23.06 /ux/core/isu/FCD/kern/src/common/wsio/fcd_init.c:Jun 23 2006,14:05:23

                           Driver state = AWAITING_LINK_UP (Sure sign of a dead card)

 

root  # fcmsutil /dev/fcd1 vpd
                V I T A L   P R O D U C T   D A T A
                ———   ————-   ——-

 Product Description    : “PCI-X 2-port 2Gb FC/2-port 1000B-T HBA                     ”

 Part number            : “AB465-60001″

 Engineering Date Code  : “A-4620″

 Part Serial number     : “PQR06501L0″

 Misc. Information      : “PW=25W;PCI 66MHZ;PCI-X 133MHZ”

 Mfd. Date              : “4651″

 Check Sum              : 0xf9

 EFI version            : “001.47″

 ROM Firmware version   : “003.003.154″

 Asset Tag              : “NA”

Tagged with:
Oct 26

Nothing huge today.

I just wanted my HP-UX systems to udpate the title bar when Linux systems or Putty terminal sessions come in.

——–begin code——

NAME=”$(uname -n):${PWD}”
LEN=`echo “$NAME\c” | wc -c`
if [ "$TERM" = "xterm" ]
then
    PROMPT_COMMAND=”\033]0;${NAME}\007″
    echo $PROMPT_COMMAND
fi
——–end code———–

Tested with Putty. Will test later today with Linux.

Tagged with:
Sep 30

Problem: After being Ignited superman lost most sd-ux functionality.

Note: superman (not its real name) is a vpar running on a superdome complex.  Only swlist works, swreg -l depot, swinstall -i, swverify all fail with the same error.

 

 

ERROR:   ”spuerman/”:  You do not have the required permissions to
         select this target.  Check permissions using the “swacl”
         command or see your system administrator for assistance.  Or,
         to manage applications designed and packaged for nonprivileged
         mode, see the “run_as_superuser” option in the “sd” man page.
       * Target connection failed for “zrtph0v0:/”.
ERROR:   More information may be found in the daemon logfile on this
         target (default location is
         superman:/var/adm/sw/swagentd.log).
       * Selection had errors.

Standard techniques say check:

/sbin/init.d/swagentd stop

/sbin/init.d/swagentd start

Check /etc/hosts networking is consistent.

Make sure /etc/nsswitch.conf is present and makes sense.

Check permissions on /var/tmp and all the swagent files.

None of this worked.

swlist -i -s $PWD in a depot generated the following error taken from ITRC because the system is already fixed.:

swacl -l host @ superman

 

 

List swacl generates this:

Util_Random internal error:  Read of /dev/urandom failed, rv=-1, size=8, No such device (19).

There were a series of other errors all pointing to /dev/urandom

lsdev showed that /urandom did not load the kernel module rng (Randome Number Generator).
Detail    root      /usr/sam/tui/kc/modulemod.sh rng
Detail    root      /usr/sbin/kcmodule -a -P ALL

This is normal output. Before the system was fixed the system did not show the module running.

lsdev | grep rng

138          -1         rng             pseudo

Fix was to unload the rng module in the kernel (using sam SEP cheats)
Then we loaded it. In spite of being listed as dynamic a reboot was required to restore sd-ux functionality.

Actual source of the problem: Ignite image of supergirl did not exclude the /dev/ “files” This cause the wrong kernel module to be loaded with the /dev/urandom “file” driver. Normally this is not a problem becuase /dev is crecreated but for some reason /dev/udandom was not loading the kernel module rng

Ignite excludes have been updated to exclude these files and the system will be re-ignited to make sure nothing else bad happens.

Tagged with:
Sep 04

Quick and Dirty Example here.

In our last example, we created a volume group vg03. It had thee disk, we expanded it to 4 because we planned proper capacity.

Our volume group now consists of 4 disks.

We are asked to create an approximately 10 GB files system in this SAN based volume group.

vgdisplay /dev/vg03

vgdisplay -v /dev/vg03

< Insert vgdisplay example here>

HP vgdisplay documentation link (Note this tends to change. I can’t help it if HP breaks the links)

This will show an empty volume group as we have not created any logical volumes

pvdisplay /dev/dsk/c10d0t1

… repeat for other disks …

<Insert pvdisplay examples here>

HP pvdisplay document link

Make sure nothing is on them.

Turns out 10 GB will fit quite nicely on a single disk. Since this is a SAN based disk, we need not worry here about raid configuration. If you are hosting an oracle rdbms, you should make sure the SAN admin sets up data, index and rollback as raid 1 or raid 10 to insure good performance.

lvcreate /dev/vg03

# Creates an empty logical volume on vg03. Uses default naming.

You can also do it this way if you like names.

lvcreate /dev/vg03 -n mydata

lvextend -L 10240 /dev/vg03/mydata /dev/dsk/c10t0d1

# This command creates an approximately 1024 MB logical volume and defines the disk it goes on. Always define the disk. Don’t let LVM or SAM decide where your data is going to go. Plan in advance. Note that LVM for Linux which is a feature port and not a binary recompile does let you define size 10 GB or 10240 MB. Still waiting for that feature on LVM for HP-UX.

newfs -F vxfs -o largefiles /dev/vg03/rmydata

# Why largefiles? Databases are big and the default limit on a file size in a file system is 2 GB. That is too small. I almost always set up my file systems these days for largefiles unless the file system itself is less than 2 GB

# Create a mount point.

mkdir /mydata

# mount it.

mount /dev/vg03/mydata /mydata

# This does not set an optimal JFS logging and recovery options, but that is a different article

bdf

# See if its there and the right capacity.

Next article: Edit /etc/fstab and set permanent mount options.

NOTE: This article needs to be checked and have vgdisplay and pvdisplay and other examples inserted into it.

Tagged with:
Sep 04

Volume group creation, done right need only be done once to last a long time. A few simple steps can make it a process you do once and then enjoy the long term benefits.

Step one is a little homework. Take a reasonable estimate at how many physical volumes the volume group is going to contain. Why is this important? Because by default lvm allocates resources as if there will be 255 physical volumes. Most volume groups don’t see that many disks, and the overall capacity is impacted by the default. For this example, we will pick a small volume group that is never anticipated to exceed 10 physical volumes. We will set the maximum volumes to 25 to have a fair amount of additional capacity but to more efficiently allocate scarce resources.

Now th fun begins. We will create a volume group called vg03

Discover the new disks, important if LUNS have been presented to the system.

insf -C disk (may not be needed on HP-UX 11.31)

ioscan -fnC disk

ioscan shows three disks for this example.

/dev/rdsk/c10t0d1 /dev/rdsk/c10t0d2 /dev/rdsk/c10t0d3

cd /dev

mkdir vg03

mknod /dev/vg03/group c 64 0×030000

# We have created a device file for the volume group.

We need to pvcreate the disks, which lablels the disk for use by LVM

pvcreate /dev/rdsk/c10t0d1

pvcreate /dev/rdsk/c10t0d2

pvcreate /dev/rdsk/c10t0d3

vgcreate -p25 /dev/vg03 /dev/dsk/c10t0d1 /dev/dsk/c12t0d1 /dev/dsk/c10t0d3

# alternative vgcreate -e 65535 -s 16 /dev/vg10 /dev/dsk/c10t0d1 /dev/dsk/c12t0d1 /dev/dsk/c16t0d1 /dev/dsk/c17t0d1

The option -s lets us set a larger PE size which can also increase capacity.

Now inevitably someone is going to decide to add another disk to this volume group. It may be immediately or it may be down the road. We are prepared.

The SAN admin and project manager want to create a scratch area within the volume group for oracle backups to disk.

They present a new lun disk /dev/rdsk/c16t0d5

We respond like lightning.

insf -C disk

ioscan -fnC disk

pvcreate /dev/rdsk/c16t0d5

vgextend vg03 /dev/dsk/c16t0d5

The disk is ready for use.

Different article for how we set up logical volumes and a file system.

Tagged with:
Oct 01

Welcome to the new look of hpux.ws

My intention when setting this site up was to provide a resource for the HP-UX community. What I lacked was a method of managing the content. While setting up a blog for a customer, I came to realize that the blog format is the perfect way to permit me to update content, maintain links to current content and expand the site no matter where my job takes me.

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

I will be setting other users that wish to contribute access to this site upon request. One thing that has always driven me up a wall is HP’s habit of moving documentation around. This site will contain community resources and the intent is to enable you to bookmark and stop worrying about the content disappearing. We’ll see how long I can maintain this.

If you want to reach out to me and bring me to work for you it is easy.

hpuxadmin in gtalk

hpuxconsulting in yahoo messenger

Click here

Click here

Regards,

Steven “Shmuel” Protter

Rosh Tzurim, Israel

Tagged with: