Archives For PA-RISC

When the HP-UX Itanium version was released  it came with a very handy tool named machinfo. This command prints number and type of CPUs, amount of memory, firmware revision, serial number, machine id and many more useful information about the server. Sadly on PA-RISC we didn’t have something similar, of course there is print_manifest and I have to say that it’s quite a tool but I always loved the simplicity of machinfo.

Dozens of posts have been thrown throughout the years on ITRC Forums asking for a PA-RISC machinfo version and many workarounds and even some binaries have been posted.

I tried a lot of them but since I discovered Patrick Reut‘s version a couple of years ago I never used another one. It works on 11.11 and 11.23 systems, I tried on 10.20 but didn’t wok. The binary can found in this post as an attachment.

Here it an example output of the command:

root@tst1:/# which machinfo
/usr/contrib/bin/machinfo
root@tst1:/# ll /usr/contrib/bin/machinfo
lrwx------   1 root       sys             34 Feb 17 10:15 /usr/contrib/bin/machinfo@ -> /usr/local/scripts/parisc_machinfo
root@tst1:/#
root@tst1:/# machinfo
OS info:
 sysname  = HP-UX
 nodename = sigtst1
 release  = B.11.23
 version  = U
 machine  = 9000/800
 idnumber = 11111111111

Platform info:
 model string = "9000/800/rp7420"
 machine id number = XXXXXXXXXXXXXX
 machine serial number = DEHxxxxxxxx

CPU info
 Number of CPUs = 4
 Clock speed    = 1000 MHz
 processor family: 532 pa-2.0
 processor model:  20 PA8900

Firmware info:
 Firmware revision = 22.2

Memory = 8165 MB (7 GB)
Disk info:
c0t6d0 : HP 146 GMA  (size = 146GB)
c0t5d0 : HP 146 GMA  (size = 146GB)
c45t0d1 : HP      HS  (size = 118GB)
c45t0d4 : HP      HS  (size = 118GB)
c45t0d5 : HP      HS  (size = 118GB)
c45t0d7 : HP      HS  (size = 15GB)
c45t1d0 : HP      HS  (size = 15GB)
c47t0d1 : HP      HS  (size = 118GB)
c47t0d4 : HP      HS  (size = 118GB)
c47t0d5 : HP      HS  (size = 118GB)
c47t0d7 : HP      HS  (size = 15GB)
c47t1d0 : HP      HS  (size = 15GB)

root@tst1:/#

Juanma.

Ten years or so ago the first HP-UX I worked with was a 10.20, it was an old D230 HP9000 server.

I never thought I would find a still running 10.20 server but when I came to the customer I am currently assigned I had a nice surprise. Hidden in the lab room next to the data-center was an old HP9000 D330 server with HP-UX 10.20 installed on it. And you know what? It’s still in production running an ancient version of Informix for a legacy service.

The server has one PA-7200LC 160MHz CPU, 192MB of RAM and four Seagate ST34572WC Ultra SCSI 4GB disks. Since I discovered it the Informix has become my favorite server above the Superdomes or the Integrity Blades and I even found bash and lsof depots for 10.20 :-D

Bash can be found on this FTP site and lsof and a lot more opensource software for 10.20 and 11.00 can be found at Merjin’s HP-UX.

Here it is screnshot of a PuTTY session and a couple of pictures of the beast taken with my E71:

Has any of you an old HP-UX server still around?

Juanma.

vg00 mirroring

January 27, 2010 — 2 Comments

This is a small cookbook about mirroring the vg00 I’ve compiled throughout the years, well it’s really more like a list with the commands but I believe it can be of usefulness for some of the newbies out there. It covers HP-UX 11.23 for PA-RISC and 11.23 and 11.31 for IA64.

  • PA-RISC 11.23:

First initialize the disk.

root@ayane:/# pvcreate -f -B /dev/rdsk/c0t6d0

Now make the disk bootable writing the LIF header.

root@ayane:/# mkboot -l /dev/dsk/c0t6d0

And the LIF files, I’m using the unenforced quorum option because in my example the vg00 has only two PVs.

root@ayane:/# mkboot -a 'hpux -lq' /dev/dsk/c0t6d0

Add the new PV to vg00.

root@ayane:/# vgextend vg00 /dev/dsk/c0t6d0

Create the mirrors of the logical volumes within vg00 in the new PV.

root@ayane:/# for i in $(vgdisplay -v vg00 | grep "LV Name" | awk '{ print $3 };')
> do
> lvextend -m 1 $i /dev/dsk/c0t6d0
> done

When the mirror is finished.

root@ayane:/# lvlnboot -r /dev/vg00/lvol3 /dev/vg00
root@ayane:/# lvlnboot -b /dev/vg00/lvol1 /dev/vg00
root@ayane:/# lvlnboot -s /dev/vg00/lvol2 /dev/vg00
root@ayane:/# lvlnboot -d /dev/vg00/lvol2 /dev/vg00

Specify the new disk as alternate boot path and add it to  /stand/bootconf.

root@ayane:/# setboot -a 0/0/0/3/0.6.0
root@ayane:/# cat /stand/bootconf
l  /dev/dsk/c0t5d0
l  /dev/dsk/c0t6d0
root@ayane:/#

And it’s done. To check that everything correct.

root@ayane:/# vgdisplay -v vg00
--- Volume groups ---
VG Name                     /dev/vg00
VG Write Access             read/write
VG Status                   available
Max LV                      255
Cur LV                      10
Open LV                     10
Max PV                      16
Cur PV                      2
Act PV                      2
Max PE per PV               4384
VGDA                        4
PE Size (Mbytes)            32
Total PE                    8748
Alloc PE                    4076
Free PE                     4672
Total PVG                   0
Total Spare PVs             0
Total Spare PVs in use      0

 --- Logical volumes ---
.
.
.
 --- Physical volumes ---
 PV Name                     /dev/dsk/c0t5d0
 PV Status                   available
 Total PE                    4374
 Free PE                     2336
 Autoswitch                  On
 Proactive Polling           On

 PV Name                     /dev/dsk/c0t6d0
 PV Status                   available
 Total PE                    4374
 Free PE                     2336
 Autoswitch                  On
 Proactive Polling           On

root@ayane:/#
root@ayane:/# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
 /dev/dsk/c0t5d0 (0/0/0/3/0.5.0) -- Boot Disk
 /dev/dsk/c0t6d0 (0/0/0/3/0.6.0) -- Boot Disk
Boot: lvol1     on:     /dev/dsk/c0t5d0
                        /dev/dsk/c0t6d0
Root: lvol3     on:     /dev/dsk/c0t5d0
                        /dev/dsk/c0t6d0
Swap: lvol2     on:     /dev/dsk/c0t5d0
                        /dev/dsk/c0t6d0
Dump: lvol2     on:     /dev/dsk/c0t5d0, 0

root@ayane:/#
root@ayane:/# setboot
Primary bootpath : 0/0/0/3/0.6.0
HA Alternate bootpath : 0/0/0/0/0.0.0
Alternate bootpath : 0/0/0/3/0.5.0

Autoboot is ON (enabled)
Autosearch is ON (enabled)

root@ayane:/#
root@ayane:/# lifls -l /dev/dsk/c0t6d0
volume ISL10 data size 7984 directory size 8 05/09/22 09:37:09
filename   type   start   size     implement  created
===============================================================
HPUX       -12928 584     1024     0          06/10/27 14:23:07
ISL        -12800 1608    242      0          05/09/22 09:37:09
AUTO       -12289 1856    1        0          05/09/22 09:37:09
PAD        -12290 1864    1468     0          05/09/22 09:37:09
LABEL      BIN    3336    8        0          07/07/17 19:42:29
root@ayane:/#
  • Itanium 11.23:

The procedure of mirroring the vg00 in an Itanium HP-UX 11.23, although shares some part with the PA-RISC differs in some critical area. The main difference is the partitioning of the disk, the boot disks in an Integrity server must have an specific layout with three paritions:

  1. EFI
  2. HPUX
  3. HPSP (HP Service Partition)

Preparation of the disk:

root@asoka:/# touch /tmp/partitionfile
root@asoka:/# cat <<EOF >> /tmp/partitionfile
> 3
> EFI 500MB
> HPUX 100%
> HPSP 400MB
> EOF
root@asoka:/# cat partitionfile
3
EFI 500MB
HPUX 100%
HPSP 400MB
root@asoka:/#
root@asoka:/# idisk -wqf /tmp/partitionfile /dev/rdsk/c1t1d0

Make it bootable and copy the AUTO file. As it can be viewed in the example below an s<number_of_partition> has been added to the device in order to identify the partition in which the operation will be executed.

root@asoka:/# insf -eCdisk
root@asoka:/# mkboot -e -l /dev/rdsk/c1t1d0
root@asoka:/# echo "boot vmunix -lq" >> /tmp/AUTO.lq
root@asoka:/# efi_cp -d /dev/rdsk/c1t1d0s1 /tmp/AUTO.lq /EFI/HPUX/AUTO

Create the HPSP partition.

root@asoka:/# dd if=/dev/rdsk/c0t1d0s3 of=/dev/rdsk/c1t1d0s3 bs=1024k

Like in PA-RISC initialize the PV and add it to the VG.

root@asoka:/# pvreate -f -B /dev/rdsk/c1t1d0s2
root@asoka:/# vgextend vg00 /dev/dsk/c1t1d0s2

Mirror the Logical Volumes.

root@asoka:/# for i in $(vgdisplay -v vg00 | grep "LV Name" | awk '{ print $3 };')
> do
> lvextend -m 1 $i /dev/dsk/c1t1d0s2
> done

Set the content of the LABEL file, edit the /stand/bootconf like in the PA-RISC procedure and add the new disk as alternate HA bootpath.

root@asoka:/# setboot -h <HW_PATH>

To check that everything is properly configured you can use the same commands as in PA-RISC and the command idisk to check the correct partitioning of the disk.

root@asoka:/# idisk -p /dev/rdsk/c1t1d0
idisk version: 1.32

EFI Primary Header:
        Signature                 = EFI PART
        Revision                  = 0x10000
        HeaderSize                = 0x5c
        HeaderCRC32               = 0xa498de56
        MyLbaLo                   = 0x1
        MyLbaHi                   = 0x0
        AlternateLbaLo            = 0x88aacbf
        AlternateLbaHi            = 0x0
        FirstUsableLbaLo          = 0x22
        FirstUsableLbaHi          = 0x0
        LastUsableLbaLo           = 0x88aac9c
        LastUsableLbaHi           = 0x0
        Disk GUID                 = 24e8312a-20cf-11dd-8001-d6217b60e588
        PartitionEntryLbaLo       = 0x2
        PartitionEntryLbaHi       = 0x0
        NumberOfPartitionEntries  = 0xc
        SizeOfPartitionEntry      = 0x80
        PartitionEntryArrayCRC32  = 0xae99dcc3

  Primary Partition Table (in 512 byte blocks):
    Partition 1 (EFI):
        Partition Type GUID       = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
        Unique Partition GUID     = 24e83378-20cf-11dd-8002-d6217b60e588
        Starting Lba Lo            = 0x22
        Starting Lba Hi            = 0x0
        Ending Lba Lo              = 0xfa021
        Ending Lba Hi              = 0x0
    Partition 2 (HP-UX):
        Partition Type GUID       = 75894c1e-3aeb-11d3-b7c1-7b03a0000000
        Unique Partition GUID     = 24e83396-20cf-11dd-8003-d6217b60e588
        Starting Lba Lo            = 0xfa022
        Starting Lba Hi            = 0x0
        Ending Lba Lo              = 0x87e2821
        Ending Lba Hi              = 0x0
    Partition 3 (HPSP):
        Partition Type GUID       = e2a1e728-32e3-11d6-a682-7b03a0000000
        Unique Partition GUID     = 24e833b4-20cf-11dd-8004-d6217b60e588
        Starting Lba Lo            = 0x87e2822
        Starting Lba Hi            = 0x0
        Ending Lba Lo              = 0x88aa821
        Ending Lba Hi              = 0x0
root@asoka:/#
  • Itanium 11.31:

The 11.31 section will be short since the procedure is almost equal to the 11.23 one. You have to take into account that if you have migrated to the new agile view (and you should have ;-D ) a few things will change. The new agile view use _p1,_p2 and _p3 to identify the partitions of the disk instead of the classic s1, s2 & s3 and the paths will change from dsk/rdsk to disk/rdisk, the names of the devices as well.

A few of examples will show it.

root@piroko:/# efi_cp -d /dev/rdisk/disk4_p1 /tmp/AUTO.lq /EFI/HPUX/AUTO
root@piroko:/# pvcreate -fB /dev/rdisk/disk4_p2
root@piroko:/# vgextend rootvg /dev/disk/disk_p2
root@piroko:/# for i in $(vgdisplay -v vg00| grep "LV Name" | awk '{ print $3 };')
> do
> lvextend -m 1 $i /dev/disk/disk4_p2
> done

And we are done. As always every comment or correction will be welcome.

See you next time.

Juanma.

idisk -p /dev/rdsk/c0t0d0
idisk version: 1.32EFI Primary Header:
Signature                 = EFI PART
Revision                  = 0x10000
HeaderSize                = 0x5c
HeaderCRC32               = 0xa498de56
MyLbaLo                   = 0x1
MyLbaHi                   = 0x0
AlternateLbaLo            = 0x88aacbf
AlternateLbaHi            = 0x0
FirstUsableLbaLo          = 0x22
FirstUsableLbaHi          = 0x0
LastUsableLbaLo           = 0x88aac9c
LastUsableLbaHi           = 0x0
Disk GUID                 = 24e8312a-20cf-11dd-8001-d6217b60e588
PartitionEntryLbaLo       = 0x2
PartitionEntryLbaHi       = 0x0
NumberOfPartitionEntries  = 0xc
SizeOfPartitionEntry      = 0x80
PartitionEntryArrayCRC32  = 0xae99dcc3

Primary Partition Table (in 512 byte blocks):
Partition 1 (EFI):
Partition Type GUID       = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
Unique Partition GUID     = 24e83378-20cf-11dd-8002-d6217b60e588
Starting Lba Lo            = 0x22
Starting Lba Hi            = 0x0
Ending Lba Lo              = 0xfa021
Ending Lba Hi              = 0x0
Partition 2 (HP-UX):
Partition Type GUID       = 75894c1e-3aeb-11d3-b7c1-7b03a0000000
Unique Partition GUID     = 24e83396-20cf-11dd-8003-d6217b60e588
Starting Lba Lo            = 0xfa022
Starting Lba Hi            = 0x0
Ending Lba Lo              = 0x87e2821
Ending Lba Hi              = 0x0
Partition 3 (HPSP):
Partition Type GUID       = e2a1e728-32e3-11d6-a682-7b03a0000000
Unique Partition GUID     = 24e833b4-20cf-11dd-8004-d6217b60e588
Starting Lba Lo            = 0x87e2822
Starting Lba Hi            = 0x0
Ending Lba Lo              = 0x88aa821
Ending Lba Hi              = 0x0