Category: HP-UX

HP-UX – Import a volume group

To import a volume group in HP-UX you need to specify the disks that are part of this volume group. In the example below, the volume group only has one disk

root@hp-ux:/# vgimport /dev/vgomni /dev/disk/disk22
vgimport: Volume group “/dev/vgomni” has been successfully created.
Warning: A backup of this volume group may not exist on this machine.
Please remember to take a backup using the vgcfgbackup command after activating the volume group.

After activacting the volume groups

root@hp-ux:/# vgchange -a y
Volume group “/dev/vg00” is already active on this system.
Activated volume group.
Volume group “/dev/vgomni” has been successfully changed.

And I took a backup of the volume group configuration

root@hp-ux:/# vgcfgbackup /dev/vgomni
Volume Group configuration for /dev/vgomni has been saved in /etc/lvmconf/vgomni.conf

HP-UX vgdisplay: /etc/lvmtab: No such file or directory

root@hp-ux:/ # vgdisplay
vgdisplay: /etc/lvmtab: No such file or directory
vgdisplay: No volume group name could be read from “/etc/lvmtab”.

To recreate the /etc/lvmtab, run vgscan -a to make it rescan all the multipathed physical volumes

root@hp-ux:/ # vgscan -a
Creating “/etc/lvmtab”.

Following Physical Volumes belong to one Volume Group.
Unable to match these Physical Volumes to a Volume Group.
Use the vgimport command to complete the process.
/dev/dsk/c77t0d1
/dev/dsk/c79t0d1
/dev/dsk/c81t0d1
/dev/dsk/c83t0d1
/dev/dsk/c85t0d1
/dev/dsk/c89t0d1
/dev/dsk/c91t0d1
/dev/dsk/c87t0d1

The Volume Group /dev/vg01 was not matched with any Physical Volumes.
The Volume Group /dev/vgomni was not matched with any Physical Volumes.
*** LVMTAB has been created successfully.
*** If PV links are configured in the system.
*** Do the following to resync information on disk.
*** #1. vgchange -a y
*** #2. lvlnboot -R

Then depending on your system you may need to run vgimport against some disks in your server

Check WWPN on HP-UX

Check how much fibre channel adapters you have in your system

root@hp-ux:~ # ioscan -fnC fc
Class I H/W Path Driver S/W State H/W Type Description
====================================================================
fc 0 0/2/0/0/0/0 fclp CLAIMED INTERFACE HP AH403A 8Gb PCIe 2-port Fibre Channel Adapter
/dev/fclp0
fc 1 0/2/0/0/0/1 fclp CLAIMED INTERFACE HP AH403A 8Gb PCIe 2-port Fibre Channel Adapter
/dev/fclp1
fc 2 0/4/0/0/0/0 fclp CLAIMED INTERFACE HP AH403A 8Gb PCIe 2-port Fibre Channel Adapter
/dev/fclp2
fc 3 0/4/0/0/0/1 fclp CLAIMED INTERFACE HP AH403A 8Gb PCIe 2-port Fibre Channel Adapter
/dev/fclp3

Then inquiry each adapter to get the WWPN

root@hp-ux:~ # /opt/fcms/bin/fcmsutil /dev/fclp0

Vendor ID is = 0x10df
Device ID is = 0xf100
PCI Sub-system Vendor ID is = 0x103c
PCI Sub-system ID is = 0x3282
Chip version = 3
Firmware Version = 2.00A4 SLI-3 (U3D2.00A4)
EFI Version = UU5.03A10
EFI Boot = ENABLED
Driver-Firmware Dump Available = NO
Driver-Firmware Dump Timestamp = N/A
Topology = PTTOPT_FABRIC
Link Speed = 8Gb
Local N_Port_id is = 0x010600
Previous N_Port_id is = None
N_Port Node World Wide Name = 0x20000000c9e79dba
N_Port Port World Wide Name = 0x10000000c9e79dba
Switch Port World Wide Name = 0x2006000533a00080
Switch Node World Wide Name = 0x1000000533a00080
Driver state = ONLINE
Hardware Path is = 0/2/0/0/0/0
Maximum Frame Size = 2048
TYPE = PFC
NPIV Supported = NO
Driver Version = @(#) FCLP: PCIe Fibre Channel driver (FibrChanl-02), B.11.31.1203, Nov 30 2011, FCLP_IFC (3,2)

root@hp-ux:~ # /opt/fcms/bin/fcmsutil /dev/fclp1

Vendor ID is = 0x10df
Device ID is = 0xf100
PCI Sub-system Vendor ID is = 0x103c
PCI Sub-system ID is = 0x3282
Chip version = 3
Firmware Version = 2.00A4 SLI-3 (U3D2.00A4)
EFI Version = UU5.03A10
EFI Boot = ENABLED
Driver-Firmware Dump Available = NO
Driver-Firmware Dump Timestamp = N/A
Topology = PTTOPT_FABRIC
Link Speed = 8Gb
Local N_Port_id is = 0x020600
Previous N_Port_id is = None
N_Port Node World Wide Name = 0x20000000c9e79dbb
N_Port Port World Wide Name = 0x10000000c9e79dbb
Switch Port World Wide Name = 0x20060005339e0080
Switch Node World Wide Name = 0x10000005339e0080
Driver state = ONLINE
Hardware Path is = 0/2/0/0/0/1
Maximum Frame Size = 2048
TYPE = PFC
NPIV Supported = NO
Driver Version = @(#) FCLP: PCIe Fibre Channel driver (FibrChanl-02), B.11.31.1203, Nov 30 2011, FCLP_IFC (3,2)

root@hp-ux:~ # /opt/fcms/bin/fcmsutil /dev/fclp2

Vendor ID is = 0x10df
Device ID is = 0xf100
PCI Sub-system Vendor ID is = 0x103c
PCI Sub-system ID is = 0x3282
Chip version = 3
Firmware Version = 2.00A4 SLI-3 (U3D2.00A4)
EFI Version = UU5.03A10
EFI Boot = ENABLED
Driver-Firmware Dump Available = NO
Driver-Firmware Dump Timestamp = N/A
Topology = PTTOPT_FABRIC
Link Speed = 8Gb
Local N_Port_id is = 0x010500
Previous N_Port_id is = None
N_Port Node World Wide Name = 0x20000000c9e7a072
N_Port Port World Wide Name = 0x10000000c9e7a072
Switch Port World Wide Name = 0x2005000533a00080
Switch Node World Wide Name = 0x1000000533a00080
Driver state = ONLINE
Hardware Path is = 0/4/0/0/0/0
Maximum Frame Size = 2048
TYPE = PFC
NPIV Supported = NO
Driver Version = @(#) FCLP: PCIe Fibre Channel driver (FibrChanl-02), B.11.31.1203, Nov 30 2011, FCLP_IFC (3,2)

root@hp-ux:~ # /opt/fcms/bin/fcmsutil /dev/fclp3

Vendor ID is = 0x10df
Device ID is = 0xf100
PCI Sub-system Vendor ID is = 0x103c
PCI Sub-system ID is = 0x3282
Chip version = 3
Firmware Version = 2.00A4 SLI-3 (U3D2.00A4)
EFI Version = UU5.03A10
EFI Boot = ENABLED
Driver-Firmware Dump Available = NO
Driver-Firmware Dump Timestamp = N/A
Topology = PTTOPT_FABRIC
Link Speed = 8Gb
Local N_Port_id is = 0x020500
Previous N_Port_id is = None
N_Port Node World Wide Name = 0x20000000c9e7a073
N_Port Port World Wide Name = 0x10000000c9e7a073
Switch Port World Wide Name = 0x20050005339e0080
Switch Node World Wide Name = 0x10000005339e0080
Driver state = ONLINE
Hardware Path is = 0/4/0/0/0/1
Maximum Frame Size = 2048
TYPE = PFC
NPIV Supported = NO
Driver Version = @(#) FCLP: PCIe Fibre Channel driver (FibrChanl-02), B.11.31.1203, Nov 30 2011, FCLP_IFC (3,2)

HP-UX server information – Seeing how much memory is installed

I ran the command machinfo to check how much RAM memory this server has

root@hp-ux:/ # machinfo
CPU info:
2 Intel(R) Itanium 2 9100 series processors (1.67 GHz, 18 MB)
666 MT/s bus, CPU version A1
4 logical processors (2 per socket)

Memory: 8168 MB (7.98 GB)

Firmware info:
Firmware revision: 04.11
FP SWA driver revision: 1.18
IPMI is supported on this system.
BMC firmware revision: 5.25

Platform info:
Model: “ia64 hp server rx2660”
Machine ID number: b4b50b0f-9557-11df-9535-ac28e7df9788
Machine serial number: USE3650L39

OS info:
Nodename: hp-ux
Release: HP-UX B.11.31
Version: U (unlimited-user license)
Machine: ia64
ID Number: 3031763727
vmunix _release_version:
@(#) $Revision: vmunix: B.11.31_LR FLAVOR=perf

Error opening a SFTP session on WinSCP – User not logging to an HP-UX server

The user was able to login using ssh but whenever he tried to use WinSCP to transfer a file using SFTP, it didn’t connect

Checking the /var/adm/syslog/syslog.log file I saw the following entries

Feb 26 08:51:45 hp-ux sshd[28906]: SSH: Server;Ltype: Version;Remote: 10.32.28.42-61837;Protocol: 2.0;Client: WinSCP_release_4.1.9
Feb 26 08:51:46 hp-ux sshd[28906]: Accepted keyboard-interactive/pam for SFTP-USER from 10.32.28.42 port 61837 ssh2
Feb 26 08:51:46 hp-ux sshd[28906]: error: PAM: pam_open_session(): Can not make/remove entry for session

This problem was solved when I ran a command to unlock user

root@hp-ux:/ # /usr/lbin/modprpw -l -k SFTP-USER

HP-UX – route add and route delete

To add a route in HP-UX, use the following command

root@hp-ux:/ # route add net 10.32.12.128 netmask 255.255.255.128 10.32.32.1 1
add net 10.32.12.128: gateway 10.32.32.1

And to delete a route in HP-UX, use the following command

root@hp-ux:/ # route delete net 10.32.12.128 netmask 255.255.255.128 10.32.32.1 1
delete net 10.32.12.128: gateway 10.32.32.1

To permanently add the route, add the configuration to the file /etc/rc.config.d/netconf

ROUTE_DESTINATION[7]=”10.32.12.128″
ROUTE_MASK[7]=”255.255.255.128″
ROUTE_GATEWAY[7]=”10.32.32.1″
ROUTE_COUNT[7]=”1″
ROUTE_ARGS[7]=””

HP-UX Error Message: Magic number wrong (namelist mismatch?)

root@hp-ux:/ # dmesg | grep -i “magic number”
Magic number wrong (namelist mismatch?)

Check since when your system is up

root@hp-ux:/ # who -b
. system boot Mar 1 23:50

Check your kernel image that is on the disk. This error message usually appears when you recompile your kernel and don’t reboot to load the new kernel

root@hp-ux:/ # ls -l /stand/vmunix
-rwxr-xr-x 1 root sys 19094736 Mar 5 23:44 /stand/vmunix

End of life information about HP-UX, Solaris, AIX and Linux

If you need to know the if a release of an Unix operating system is still supported by the vendor, check these links for information

End of life information about HP-UX (PDF)

End of life information about Solaris

End of life information about AIX

End of life information about Red Hat Enterprise Linux

End of life information about Suse Linux Enterprise

HP-UX – fcmsutil – Error: FCP driver not loaded

I saw a message in syslog to check for an EMS Event Notification.

root@hp-ux:/ # cat /var/adm/syslog/syslog.log
Jul 23 11:33:07 hp-ux EMS [2596]: —— EMS Event Notification ——   Value: “SERIOUS (4)” for Resource: “/adapters/events/TL_adapter/0_2_1_0″     (Threshold:  >= ” 3″)    Execute the following command to obtain event details:   /opt/resmon/bin/resdata -R 170131458 -r /adapters/events/TL_adapter/0_2_1_0 -n 170131457 -a

root@hp-ux:/ # /opt/resmon/bin/resdata -R 170131458 -r /adapters/events/TL_adapter/0_2_1_0 -n 170131457 -a

CURRENT MONITOR DATA:

Event Time……….: Thu Jul 23 11:33:07 2009
Severity…………: SERIOUS
Monitor………….: dm_TL_adapter
Event #………….: 23
System…………..: hp-ux

Summary:
Adapter at hardware path 0/2/1/0 : Fibre Channel driver has gone into
non-participating mode
Description of Error:
lbolt value: 3207

The Fibre Channel Driver has gone into non-participating mode
Frame Manager Status Register =  0x200002ff
Probable Cause / Recommended Action:

A cable or hardware problem exists. This can also be caused due
to the Tachyon TL adapter changing its AL_PA across a LIP.
Do the following:
1. Verify that the fiber optic cable is functional and securely
attached to the Fibre Channel Mass Storage Adapter.
2. After checking the cabling, execute a loopback test using
fcmsutil.
Command syntax is as follows:
/opt/fcms/bin/fcmsutil <device_file> lb plm
If the problem persists after verifying fiber optic cabling,
replace the adapter

Additional Event Data:
System IP Address…: 10.122.100.24
Event Id…………: 0x4a6874a300000000
Monitor Version…..: B.01.00
Event Class………: I/O
Client Configuration File………..:
/var/stm/config/tools/monitor/default_dm_TL_adapter.clcfg
Client Configuration File Version…: A.01.00
Qualification criteria met.
Number of events..: 1
Associated OS error log entry id(s):
0x4a68739100000000
Additional System Data:
System Model Number………….: 9000/800/rp4440
OS Version………………….: B.11.11
EMS Version…………………: A.04.20
STM Version…………………: A.49.00
Latest information on this event:
http://docs.hp.com/hpux/content/hardware/ems/dm_TL_adapter.htm#23

v-v-v-v-v-v-v-v-v-v-v-v-v    D  E  T  A  I  L  S    v-v-v-v-v-v-v-v-v-v-v-v-v

Component Data:
Physical Device Path….: 0/2/1/0
Vendor Id……………: 0x0000103C
Serial Number(WWN)……: 50060B00005FCE46

I/O Log Event Data:

Driver Status Code………………: 0x00000017
Length of Logged Hardware Status….: 0 bytes.
Offset to Logged Manager Information: 0 bytes.
Length of Logged Manager Information: 61 bytes.

Manager-Specific Information:

Raw data from FCMS Adapter driver:
00000003 00000C87 00000001 00000001 200002FF 2F75782F 6B65726E 2F6B6973
752F544C 2F737263 2F636F6D 6D6F6E2F 7773696F 2F74645F 6973722E 63

Checking the device file.

root@hp-ux:/ # ioscan -fnC fc
Class     I  H/W Path  Driver S/W State   H/W Type     Description
=================================================================
fc        0  0/2/1/0   td   CLAIMED     INTERFACE    HP Tachyon XL2 Fibre Channel Mass Storage Adapter
/dev/td0
fc        1  0/6/1/0   td   CLAIMED     INTERFACE    HP Tachyon XL2 Fibre Channel Mass Storage Adapter
/dev/td1

I tried to pass td1 as argument but it needed the full path.

root@hp-ux:/ # /opt/fcms/bin/fcmsutil td1 lb plm
Error: FCP driver not loaded.

I passed the entire path and the fcmsutil worked:

root@hp-ux:/ # /opt/fcms/bin/fcmsutil /dev/td0 lb plm

WARNING: This is a DESTRUCTIVE test.
This might result in failure of current I/O requests.
Do you want to continue? (y/n) [n]…

Which file does HP-UX keep the number of past passwords

The parameter PASSWORD_HISTORY_DEPTH in the /etc/default/security file controls how many past passwords HP-UX will remember the password to prevent the user from using the same old passwords he uses. Set the number as you like.

root@hp-ux11.11:/ # passwd user
Changing password for user
Last successful password change for user: Wed Apr 23 00:06:26 2008
Last unsuccessful password change for user: Thu Feb  7 12:34:42 2008

New password:
You may not re-use a previously used password.