2.26.2007

HP-UX hangs at boot

Boot problems:
panic: lv_fixrootlv: Stale extent array overflow

cause: volume group header and /etc/lvmtab out of sync when logical volumes are mirrored.
fix:
  • boot into lvm maintenance mode: hpux -lm
  • activate vg00: vgchange -a y vg00
  • vgdisplay vg00 -- shows 3 current PV and 2 Active PV (or whatever the discrepancy is)
  • unmirror logical volumes:
    • for i in 1 2 3 4 5 6 7 8 9
    • do
    • lvreduce -A n -m 0 /dev/vg00/lvol$i
    • done
  • vgreduce -f vg00
  • now vgdisplay vg00 shows the same number of current and active PV

2.25.2007

logname error in rlogin session on particular tty

when you rlogin and your tty is pts/0 (/dev/pts/0) you might get the following message when trying to execute logname:

logname: could not get login name

It appears that rlogind doesn't update /etc/utmp This of course appears to be intermittent if you have several clients doing rlogins, the first one that uses /dev/pts/0 will have the problem, the other will probably be fine. This is more of a problem if you are using the logname command in something like /etc/profile

Only noticed this on 11.23 (both IA and PA platforms). Both had PHNE_32818 installed. A possible fix is PHNE_33792, but I couldn't test it. A workaround is to use the variable $LOGNAME instead of the command logname.

2.15.2007

get the timestamp formatted the way you want

ls in HPUX and most other *nix versions just plain sucks giving the output you need.  see the following section of the HPUX ls(1) man page:
           -l   (ell) List in long format, giving mode, number of links,
                owner, group, size in bytes, and time of last modification
                for each file (see further DESCRIPTION and Access Control
                Lists below).  If the time of last modification is greater
                than six months ago, or any time in the future, the year is
                substituted for the hour and minute of the modification
                time.  If the file is a special file, the size field


get the month day year Hour minute second of timestamp of a file (modification):

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=105260&admit=-682735245+1171602387200+28353475

I believe this uses the stat function.

2.13.2007

finding hard links / hard link count in file systems

link column (second column) in ls -l output (hard link count):
a directory will always have a minimum of 2 links.  One for the directory itself and one for the . (current directory) inside the directory.
any additional subdirectories directly under the directory count as an addition link for the directory because of the .. (parent) directory entries inside each subdirectory.


to find hard links:
ncheck -F vxfs /dev/vg00/lvol6 | sort -n | awk '$1==prev{print last;print $0}{prev=$1;last=$0}'

2.07.2007

HBA part number on HPUX systems

how to tell HBA part number in HP-UX using fcmsutil
fcmsutil /dev/<device>  ( find from ioscan -fnC fc )

Device ID  part number
0x001028   A5158A - 1GB
0x001029   A6795A - 2GB
0x002312   A6826A - 2GB dual port PCI-X

2.04.2007

uncommon serviceguard errors - coredump, IP netmask

cmcheckconf coredumps when "gathering network configuration"

this is because one of the standby lan interfaces on one of the nodes has been plumbed (ifconfig plumb) or is assigned an IP of 0.0.0.0 in netconf.  unplumb the interface (see ifconfig), or remove it from netconf before running cmcheckconf or cmapplyconf.



Error: IP netmasks don't match, interface lan0 on node0
Error: IP netmasks don't match, interface lan0 on node1

but if your netmasks do match properly and currently in netconf, then the cluster binary file needs to be deleted and recreated from the ascii file.

2.01.2007

get serial number of server hardware in Linux

In Redhat Enterprise or maybe other linuxes to poll the serial number of the server or workstation hardware from the bios using dmi:
dmidecode

May have to install the package from repositories.

1.17.2007

HP Itanium systems - EFI ref guide

EFI reference guide: http://docs.hp.com/en/5991-1247/ch04s13.html  and  http://docs.hp.com/en/A5201-90017/index.html

configure IP aliases on AIX

Navigate in smit:
Communications Applications and Services
 TCP/IP
  Further Configuration
   Network Interfaces
    Network Interface Selection
     Configure Aliases

OR
smit inetalias

chdev -l 'en1' -a alias4=x.x.x.x,y.y.y.y

where x.x.x.x is the address and y.y.y.y is the netmask

1.11.2007

fsadm error shrinking file system

HP-UX 11.00  - fsadm:  cannot shrink /dev/vg00/rlvol6 - upgraded fs - inodes are currently in use.

resolution: upgrade to 11.11 to get the new JFS 3.3 and related tools.

12.15.2006

EMC Clariion array - using powerpath vs pvlinks

I think I've found the answer to whether or not we should use Pvlinks when configuring our volume groups in HP-UX - the answer being no.  It's only recommended to use alternate links when booting from a storage array, which we don't do on any of our HPUX hosts.

From the powerpath admin guide:

EMC recommends using LVM alternate links (PVLinks) when you
boot from a storage system. If the primary path fails, an automatic
switch to the alternate path occurs. If PowerPath is not installed,
using alternate links increases availability in the event of hardware
problems.
PowerPath uses alternate links as part of its boot/root failover
strategy, but not for load balancing, path prioritization, or other
PowerPath-related reasons. Thus, EMC recommends that you use
LVM alternate links when booting from a storage system. Otherwise,
EMC recommends disabling PVLinks when using PowerPath.

12.10.2006

powerpath check force: "Cannot remove device that is in use"

removing some ports on a clariion on a HP-UX host running service guard, I received the following:
$ powermt check force
Warning: CLARiiON device path c13t2d3 is currently dead.
Cannot remove device that is in use: c13t2d3

Powerpath is pretty darn smart; the last port 0 linked to a disk device was part of the same lvm volume group as one of my cluster lock disks.  It wasn't even listed in as the lock disk for my cluster (in the cluster ascii file), but it was in the same volume group that the lock disk was in.

I had to stop the cluster services on the node, then powerpath allowed me to remove the connection.  This node of the cluster is currently the failover node, so I was able to bring er down without any impact.

HP codewords

codewords used for optional additional pay software in  HP-UX are stored  here in the following format:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=647238&admit=-682735245+1165692579832+28353475

/var/adm/sw/.codewords

#CD_part_number Customer_Id IdType Codeword

manuall set speed and duplex during ignite

set speed and duplex for ignite, instead of relaying on auto-Negotiation:
http://docs.hp.com/en/B2355-91049/ch05s07.html

12.04.2006

vgscan not working / ignite not recreating volume groups

I encountered a problem the other day with ignite not recreating the volume groups properly - it was caused by a component of service guard that was stuck on that machine.  For some reason (maybe because serviceguard was once installed on the box), the file /dev/slvmvg (serviceguard file for shared volume groups) also prevented vgscan from working.  Once I removed the file, vgscan created the volume groups without a problem.

12.02.2006

gig card on hp-ux 11.00 doesn't keep speed/duplex setting

A 1000Base-T card in an 11.00 box was giving me grief.  the switch port was set to 100 full duplex, but the card kept staying at AUTO even though the speed/duplex was changed via sam and verified in the /etc/rc.config.d/hpgelanconf file; that, of course, cause collisions and a bunch of network errors because the card negotiated 100 half duplex.  There's a patch that fixes the issue:  28995   make sure the config file has the speed and duplex value in uppercase:

HP_GELAN_SPEED[0]=100FD

11.24.2006

swinstall and rpc exception communications error

error when doing an swinstall:
       * Beginning Selection
ERROR:   RPC exception: "Communications failure (dce / rpc)" 11/24/06
         17:27:01 PST
ERROR:   A Remote Procedure Call to a daemon has failed.  Could not
         start a management session for "myhost:/".  Make sure the host
         is accessible from the network, and that its daemon, swagentd,
         is running.
       * Target connection failed for "myhost:/".
ERROR:   More information may be found in the daemon logfile on this
         target (default location is myhost:/var/adm/sw/swagentd.log).
       * Selection had errors.

fix by restarting swagentd:
/sbin/init.d/swagentd stop
/sbin/init.d/swagentd start

11.20.2006

mkboot complains about logical volumes when none exist

$ mkboot /dev/dsk/c2t6d0
There appear to be non-boot logical volumes on this device.
Overwriting them could destroy all the data on this device
Should the logical volumes be overwritten [y/n]? y

solution:
because PV isn't marked as bootable.   pvcreate -B /dev/dsk/c2t6d0
or
PV belongs (or thinks it does) to a volume group already.  (tread lightly here!):
Fix by using the -f (force) option:  pvcreate -Bf /dev/dsk/c2t6d0 

11.19.2006

upgrade vxfs online

update version 3 veritas JFS file system to version 4

vxupgrade -n 4 /mount_point

vxfsconvert -- offline version or to convert an HFS