HP-UX administration

De Wiki de Romain RUDIGER
Aller à : navigation, rechercher

Sommaire

Commands on disks, VG and LV

SAN

Get WWN:

for fcd in `ls /dev/fcd* | sort -n`;do printf "$(hostname) $fcd ";fcmsutil $fcd | awk '/N_Port Port World Wide Name/ {print $7}' | sed "s/0x//"; done
host1 /dev/fcd0 50060b0000c26a00
host1 /dev/fcd1 50060b0000c26a02

Generate a file to match agile and legacy disks:

IFS=$(echo -ne "\n\b")
( disk=;aliases=;for line in $(ioscan -m dsf); do echo "$line" | grep -Eq "^/dev/(rdisk|oracle)" && echo "$disk $aliases"; echo "$line" | grep -Eq "^/dev/(rdisk|oracle)" && disk=$(echo "$line" | awk '{print $1}') && aliases=$(echo "$line" | awk '{print $2}'); echo "$line" | grep -Eq "^[[:space:]]+/dev/rdsk" && aliases="$aliases $(echo "$line" | awk '{print $1}')"; done; echo "$disk $aliases"; ) | grep -Ev "(^$|c1t|c0t)" > /share/HPUX/$(hostname)_agile_list

cat /share/HPUX/$(hostname)_agile_list
/dev/rdisk/disk5 /dev/rdsk/c8t0d0 /dev/rdsk/c4t0d0 /dev/rdsk/c6t0d0 /dev/rdsk/c10t0d0
/dev/rdisk/disk26 /dev/rdsk/c8t0d1 /dev/rdsk/c4t0d1 /dev/rdsk/c6t0d1 /dev/rdsk/c10t0d1
/dev/rdisk/disk27 /dev/rdsk/c8t0d2 /dev/rdsk/c4t0d2 /dev/rdsk/c6t0d2 /dev/rdsk/c10t0d2
/dev/rdisk/disk28 /dev/rdsk/c8t0d3 /dev/rdsk/c4t0d3 /dev/rdsk/c6t0d3 /dev/rdsk/c10t0d3
/dev/rdisk/disk29 /dev/rdsk/c8t0d4 /dev/rdsk/c4t0d4 /dev/rdsk/c6t0d4 /dev/rdsk/c10t0d4
/dev/rdisk/disk30 /dev/rdsk/c8t0d5 /dev/rdsk/c4t0d5 /dev/rdsk/c6t0d5 /dev/rdsk/c10t0d5
/dev/rdisk/disk31 /dev/rdsk/c8t0d6 /dev/rdsk/c4t0d6 /dev/rdsk/c6t0d6 /dev/rdsk/c10t0d6
/dev/rdisk/disk32 /dev/rdsk/c8t0d7 /dev/rdsk/c4t0d7 /dev/rdsk/c6t0d7 /dev/rdsk/c10t0d7
/dev/rdisk/disk33 /dev/rdsk/c8t1d0 /dev/rdsk/c4t1d0 /dev/rdsk/c6t1d0 /dev/rdsk/c10t1d0
...

Scan and display all disks:

ioscan -fnC disk
Class     I  H/W Path       Driver S/W State   H/W Type     Description
=======================================================================
disk     21  0/0/8/0/0.16.27.218.0.0.0  sdisk   CLAIMED     DEVICE       NETAPP  LUN
                           /dev/dsk/c22t0d0   /dev/rdsk/c22t0d0
disk    112  0/0/8/0/0.16.27.218.0.0.1  sdisk   CLAIMED     DEVICE       NETAPP  LUN
                           /dev/dsk/c22t0d1   /dev/rdsk/c22t0d1
disk    107  0/0/8/0/0.16.27.218.0.0.2  sdisk   CLAIMED     DEVICE       NETAPP  LUN
                           /dev/dsk/c22t0d2   /dev/rdsk/c22t0d2
disk    114  0/0/8/0/0.16.27.218.0.0.3  sdisk   CLAIMED     DEVICE       NETAPP  LUN
                           /dev/dsk/c22t0d3   /dev/rdsk/c22t0d3

Display legacy devices by agile disk:

ioscan -m dsf
Persistent DSF           Legacy DSF(s)
========================================
/dev/rdisk/disk2         /dev/rdsk/c0t0d0
/dev/rdisk/disk3         /dev/rdsk/c1t0d0
/dev/rdisk/disk3_p1      /dev/rdsk/c1t0d0s1
/dev/rdisk/disk3_p3      /dev/rdsk/c1t0d0s3
/dev/rdisk/disk3_p2      /dev/rdsk/c1t0d0s2
/dev/rdisk/disk5         /dev/rdsk/c8t0d0
                         /dev/rdsk/c4t0d0
                         /dev/rdsk/c6t0d0
                         /dev/rdsk/c10t0d0
/dev/pt/pt9              /dev/rscsi/c7t0d0
                         /dev/rscsi/c3t0d0
                         /dev/rscsi/c5t0d0
                         /dev/rscsi/c9t0d0
/dev/rdisk/disk26        /dev/rdsk/c8t0d1
                         /dev/rdsk/c4t0d1
                         /dev/rdsk/c6t0d1
                         /dev/rdsk/c10t0d1
/dev/rdisk/disk27        /dev/rdsk/c8t0d2
                         /dev/rdsk/c4t0d2
                         /dev/rdsk/c6t0d2
                         /dev/rdsk/c10t0d2
...

Check the state of the different path for a device:

scsimgr lun_map -D /dev/rdisk/disk34

        LUN PATH INFORMATION FOR LUN : /dev/rdisk/disk34

Total number of LUN paths     = 4
World Wide Identifier(WWID)    = 0x60060e8015252600000125260000125f

LUN path : lunpath22
Class                         = lunpath
Instance                      = 22
Hardware path                 = 0/0/0/5/0/0/0.0x50060e8015252634.0x4068000000000000
SCSI transport protocol       = fibre_channel
State                         = ACTIVE
Last Open or Close state      = ACTIVE

LUN path : lunpath38
Class                         = lunpath
Instance                      = 38
Hardware path                 = 0/0/0/5/0/0/1.0x50060e8015252624.0x4068000000000000
SCSI transport protocol       = fibre_channel
State                         = ACTIVE
Last Open or Close state      = ACTIVE

LUN path : lunpath55
Class                         = lunpath
Instance                      = 55
Hardware path                 = 1/0/0/5/0/0/1.0x50060e8015252630.0x4068000000000000
SCSI transport protocol       = fibre_channel
State                         = ACTIVE
Last Open or Close state      = ACTIVE

LUN path : lunpath70
Class                         = lunpath
Instance                      = 70
Hardware path                 = 1/0/0/5/0/0/0.0x50060e8015252620.0x4068000000000000
SCSI transport protocol       = fibre_channel
State                         = ACTIVE
Last Open or Close state      = ACTIVE

Check load balancing policy:

scsimgr get_attr -D /dev/rdisk/disk34 -a load_bal_policy

        SCSI ATTRIBUTES FOR LUN : /dev/rdisk/disk34

name = load_bal_policy
current = round_robin
default = round_robin
saved =

For XP storage arry, display: dev, lun, agile path, minor, major and size:

for line in $(/share/HPUX/xpinfo -il | grep "/dev"); do ldisk=$(echo $line | awk '{print $1}'); ldev=$(echo $line | awk '{print $6}'); adisk=$(grep $ldisk /share/HPUX/$(hostname)_agile_list | grep -v oracle | awk '{print $1}'); major="$(ls -l $adisk|awk '{print $5}')"; minor="$(ls -l $adisk|awk '{print $6}')"; disksize="$(($(diskinfo -b $adisk) / 1024 / 1024))"; lun=$(echo $line | awk '{print $4}'); printf "%s %s %-18s %s %s %4d GB\n" $ldev $lun $adisk $major $minor $disksize; done | sort -u > /share/HPUX/$(hostname)_ldev_list

cat /share/HPUX/$(hostname)_ldev_list  | sort -k 2
11:10 00 /dev/rdisk/disk100 13 0x000008  685 GB
11:11 01 /dev/rdisk/disk101 13 0x000009  685 GB
11:12 02 /dev/rdisk/disk102 13 0x00000a  685 GB
11:13 03 /dev/rdisk/disk103 13 0x00000b  685 GB
11:14 04 /dev/rdisk/disk104 13 0x00000c  685 GB

Delete a legacy disk:

rmsf /dev/rdsk/cxtxdx /dev/dsk/cxtxdx

Remove a path:

rmsf [[-a|-k] [-m]] [-D directory] [-q|-v] [-c] special_file

rmsf -H 0/12/0/0.10.32.0.0.1.5

Create a device:

insf [-C class | -d driver] [-D directory] [-e] [-H hw-path]
           [-I instance] [-n npty] [-q|-v] [-s nstrpty]

LVM

Get PV of an inactive VG:

strings /etc/lvmtab
strings /etc/lvmconf/vgXXX.conf | grep disk
/dev/disk/disk121
/dev/disk/disk134

Create a physical volume (set the PVID):

pvcreate /dev/rdsk/cxtxdx


Create a VG:

vgcreate -V 2.2 -s 32 -S 1t vg_ora /dev/disk/disk117 /dev/disk/disk118 /dev/disk/disk119 /dev/disk/disk120 /dev/disk/disk121 /dev/disk/disk122

Delete a VG:

lvremove /dev/vg_temp/lv_1
vgreduce vg_temp /dev/disk/disk78
vgreduce vg_temp /dev/disk/disk75
vgremove vg_temp


Add a PV to a VG :

vgextend vgTEST /dev/disk/diskx


To activate or deactivate a VG:

vgchange -a [y|n] vgTEST

Create a LV:

Creating a Logical Volume
  /usr/sbin/lvcreate [-A autobackup] [-c mirror_consistency]
       [-C contiguous] [-d schedule] [-D distributed]
       [-i stripes [-I stripe_size]] [-l le_number | -L lv_size]
       [-m mirror_copies] [-M mirror_write_cache] [-n lv_name]
       [-p permission] [-r relocate] [-s strict] vg_name

Creating a Snapshot Volume on Volume Group Version 2.2 or Higher
  /usr/sbin/lvcreate -S snap_type
       [-A autobackup] [-c mirror_consistency] [-C contiguous]
       [-D distributed] [-e auto_prealloc_enabled]
       [-l prealloc_le_number | -L prealloc_le_size]
       [-m mirror_copies] [-M mirror_write_cache] [-n snap_lv_name]
       [-p permission] [-P threshold_value] [-s strict]
       [-t timestamp] original_lv

lvcreate -L 1024 -n lvTEST vgTEST


Create a JSF FS:

newfs -F vxfs [-o largefiles] /dev/vgTEST/lvTEST

Create a mirror (to secure or to move the VG to another PV):

vgextend vgTEST /dev/dsk/cxtxdNEW
lvextend -m 1 /dev/vgTEST/lvTEST /dev/dsk/cxtxdNEW
# wait PP to be synced (check with lvdisplay)
lvreduce -m 0 /dev/vgTEST/lvTEST /dev/dsk/cxtxdOLD

Export/Import a VG:

vgexport -p -m /tmp/vgTEST.map vgTEST
/usr/sbin/vgimport [-m mapfile] [-p] [-v] vg_name pv_path

Extend an vxfs on LVM with OnlineJFS

Check OnlineJFS and the license:

#swlist | grep -i jfs
  B3929GB                       B.05.01.03     OnlineJFS for Veritas File System 5.0.1 Bundle
#vxlicrep

Symantec License Manager vxlicrep utility version 3.02.34.0
Copyright (C) 1996-2008 Symantec Corporation. All rights reserved.

Creating a report on all VERITAS products installed on this system

 -----------------***********************-----------------

   License Key                         = AAAA-AAAA-AAAA-AAAA-AAAA-AAAA-0
   Product Name                        = VERITAS File System
   Serial Number                       = 1023
   License Type                        = PERMANENT
   OEM ID                              = 2006
   Editions Product                    = YES

 Features :=
   HP_OnlineJFS                        = Enabled

   CPU Count                           = Not Restricted
   Platform                            = HP-UX
   Version                             = 5.0
   Maximum number of file systems      = Not Restricted

Check the actual size:

# bdf /tmp
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol7    2097152 1458056  634200   70% /tmp
# lvdisplay /dev/vg00/lvol7
--- Logical volumes ---
LV Name                     /dev/vg00/lvol7
VG Name                     /dev/vg00
LV Permission               read/write
LV Status                   available/syncd
Mirror copies               0
Consistency Recovery        MWC
Schedule                    parallel
LV Size (Mbytes)            2048
Current LE                  64
Allocated PE                64
Stripes                     0
Stripe Size (Kbytes)        0
Bad block                   on
Allocation                  strict
IO Timeout (Seconds)        default

We want to add 32 Logical Extend:

# lvextend -l 96 /dev/vg00/lvol7
Logical volume "/dev/vg00/lvol7" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
# fsadm -F vxfs -b 3072m /tmp
UX:vxfs fsadm: INFO: V-3-25942: /dev/vg00/rlvol7 size increased from 2097152 sectors to 3145728 sectors
# bdf /tmp
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol7    3145728  825640 2302536   26% /tmp


Shrink an vxfs on LVM with OnlineJFS

Check OnlineJFS and the license:

#swlist | grep -i jfs
  B3929GB                       B.05.01.03     OnlineJFS for Veritas File System 5.0.1 Bundle
#vxlicrep

Symantec License Manager vxlicrep utility version 3.02.34.0
Copyright (C) 1996-2008 Symantec Corporation. All rights reserved.

Creating a report on all VERITAS products installed on this system

 -----------------***********************-----------------

   License Key                         = AAAA-AAAA-AAAA-AAAA-AAAA-AAAA-0
   Product Name                        = VERITAS File System
   Serial Number                       = 1023
   License Type                        = PERMANENT
   OEM ID                              = 2006
   Editions Product                    = YES

 Features :=
   HP_OnlineJFS                        = Enabled

   CPU Count                           = Not Restricted
   Platform                            = HP-UX
   Version                             = 5.0
   Maximum number of file systems      = Not Restricted

Check the actual size:

# bdf /home
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol5     131072    5480  124616    4% /home
# lvdisplay /dev/vg00/lvol5
--- Logical volumes ---
LV Name                     /dev/vg00/lvol5
VG Name                     /dev/vg00
LV Permission               read/write
LV Status                   available/syncd
Mirror copies               0
Consistency Recovery        MWC
Schedule                    parallel
LV Size (Mbytes)            128
Current LE                  4
Allocated PE                4
Stripes                     0
Stripe Size (Kbytes)        0
Bad block                   on
Allocation                  strict
IO Timeout (Seconds)        default

We want to remove one Logical Extend (32MB):

# fsadm -F vxfs -b 96m /home
UX:vxfs fsadm: INFO: V-3-23586: /dev/vg00/rlvol5 is currently 131072 sectors - size will be reduced
# bdf /home
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol5      98304    5480   92104    6% /home
# lvreduce -l 3 /dev/vg00/lvol5
When a logical volume is reduced useful data might get lost;
do you really want the command to proceed (y/n) : y
Logical volume "/dev/vg00/lvol5" has been successfully reduced.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
# lvdisplay /dev/vg00/lvol5
--- Logical volumes ---
LV Name                     /dev/vg00/lvol5
VG Name                     /dev/vg00
LV Permission               read/write
LV Status                   available/syncd
Mirror copies               0
Consistency Recovery        MWC
Schedule                    parallel
LV Size (Mbytes)            96
Current LE                  3
Allocated PE                3
Stripes                     0
Stripe Size (Kbytes)        0
Bad block                   on
Allocation                  strict
IO Timeout (Seconds)        default

Check IO rate by disk

Change the d to list the disks numbers. You can also display all XP array disks with d="OPEN-V". Set sample to change how long we wait between two samples.

d="(34|43|33|74)"
sample=60
IFS=$(echo -ne "\n\b")
for y in 1 2; do
    for disk in $(ioscan -m lun | grep esdisk | grep -Ew $d); do
        id=$(echo $disk | awk '{print $2}')
        path=$(echo $disk | awk '{print $3}')
        eval "r${y}_$id=$(scsimgr get_stat -H $path | awk '/Bytes r/{print $4}')"
        eval "w${y}_$id=$(scsimgr get_stat -H $path | awk '/Bytes w/{print $4}')"
        [[ $y -eq 2 ]] && rr=$(echo "scale=1; ( ( ( $(eval "echo \$r2_${id}") - $(eval "echo \$r1_${id}") ) / $sample ) / 1024 ) / 1024"|bc)
        [[ $y -eq 2 ]] && wr=$(echo "scale=1; ( ( ( $(eval "echo \$w2_${id}") - $(eval "echo \$w1_${id}") ) / $sample ) / 1024 ) / 1024"|bc)
        [[ $y -eq 2 ]] && printf "%-11s %10.1f   %10.1f\n" disk${id} $rr $wr
    done
    [[ $y -eq 1 ]] && sleep $sample
    [[ $y -eq 1 ]] && printf "%-11s %10s - %10s\n" "Disk" "Read MB/s" "Write MB/s"
done

Disk         Read MB/s - Write MB/s
disk33             0.0         21.2
disk34             0.0          0.0
disk43             0.0          0.0
disk74             0.0          0.0

Check IO rate by disk path

Change the d to list the disks numbers. You can also display all XP array disks with d="OPEN-V". Set sample to change how long we wait between two samples.

d="(34|43|33|74)"
sample=60
IFS=$(echo -ne "\n\b")
for y in 1 2; do
    for disk in $(ioscan -m lun | grep esdisk | grep -Ew $d); do
        id=$(echo $disk | awk '{print $2}')
        declare -i pi=1
        for path in $(ioscan -m lun /dev/disk/disk$id | grep -E "./././."); do
            eval "r${y}_${id}_$pi=$(scsimgr get_stat -H $path | awk '/Bytes r/{print $4}')"
            eval "w${y}_${id}_$pi=$(scsimgr get_stat -H $path | awk '/Bytes w/{print $4}')"
            [[ $y -eq 2 ]] && rr=$(echo "scale=1; ( ( ( $(eval "echo \$r2_${id}_$pi") - $(eval "echo \$r1_${id}_$pi") ) / $sample ) / 1024 ) / 1024"|bc)
            [[ $y -eq 2 ]] && wr=$(echo "scale=1; ( ( ( $(eval "echo \$w2_${id}_$pi") - $(eval "echo \$w1_${id}_$pi") ) / $sample ) / 1024 ) / 1024"|bc)
            [[ $y -eq 2 ]] && printf "%-11s %10.1f   %10.1f\n" disk${id}_$pi $rr $wr
            pi+=1
        done
    done
    [[ $y -eq 1 ]] && sleep $sample
    [[ $y -eq 1 ]] && printf "%-11s %10s - %10s\n" "Disk" "Read MB/s" "Write MB/s"
done

Disk         Read MB/s - Write MB/s
disk33_1           0.0         10.6
disk33_2           0.0         10.5
disk33_3           0.0         10.5
disk33_4           0.0         10.5
disk34_1           0.0          0.0
disk34_2           0.0          0.0
disk34_3           0.0          0.0
disk34_4           0.0          0.0
disk43_1           0.0          0.0
disk43_2           0.0          0.0
disk43_3           0.0          0.0
disk43_4           0.0          0.0
disk74_1           0.0          0.0
disk74_2           0.0          0.0
disk74_3           0.0          0.0
disk74_4           0.0          0.0

Network

Auto Port Aggregation - check the version

# swlist -l product | grep -i HP-APA
  HP-APA-FMT            B.11.31.71     HP Auto-Port Aggregation APA formatter product.
  HP-APA-KRN            B.11.31.71     HP Auto-Port Aggregation APA kernel products.
  HP-APA-LM             B.11.31.71     HP Auto-Port Aggregation APA LM commands.
  HP-APA-NETMOD         B.11.31.71     HP Auto-Port Aggregation nwmgr/NCweb libraries.
  HP-APA-RUN            B.11.31.71     HP Auto-Port Aggregation APA command products.

Auto Port Aggregation - setup an aggregate

Create the aggregate on links one and two and Save the current configuration:

# nwmgr -a -S apa -A links=1,2 –A mode=LAN_MONITOR -I 900
# nwmgr -s -S apa -A all --saved --from cu

Auto Port Aggregation - config files

The command 'nwmgr -s -S apa' will save the configuration to '/etc/lanmon/lanconfig.ascii':

LM_RAPID_ARP                    on
LM_RAPID_ARP_INTERVAL           1000000
LM_RAPID_ARP_COUNT              10
FAILOVER_GROUP                  lan900
        PRIMARY         lan0    5
        STANDBY         lan1    3
FAILOVER_GROUP                  lan901
        PRIMARY         lan2    5
        STANDBY         lan3    3
...

You also have configuration of the APA module in '/etc/rc.config.d/hp_apaconf':

HP_APA_START_LA_PPA=900
HP_APA_DEFAULT_PORT_MODE=MANUAL

And directives for each interface in '/etc/rc.config.d/hp_apaportconf':

HP_APAPORT_INIT_ARGS="HP_APAPORT_GROUP_CAPABILITY HP_APAPORT_PRIORITY HP_APAPORT_CONFIG_MODE HP_APAPORT_KEY HP_APAPORT_SYSTEM_PRIORITY"

HP_APAPORT_INTERFACE_NAME[0]=lan0
HP_APAPORT_GROUP_CAPABILITY[0]=5
HP_APAPORT_KEY[0]=0
HP_APAPORT_PRIORITY[0]=5
HP_APAPORT_CONFIG_MODE[0]=LAN_MONITOR
HP_APAPORT_SYSTEM_PRIORITY[0]=0

HP_APAPORT_INTERFACE_NAME[1]=lan1
HP_APAPORT_GROUP_CAPABILITY[1]=5
HP_APAPORT_KEY[1]=0
HP_APAPORT_PRIORITY[1]=3
HP_APAPORT_CONFIG_MODE[1]=LAN_MONITOR
HP_APAPORT_SYSTEM_PRIORITY[1]=0

HP_APAPORT_INTERFACE_NAME[2]=lan4
HP_APAPORT_GROUP_CAPABILITY[2]=5
HP_APAPORT_KEY[2]=0
HP_APAPORT_PRIORITY[2]=5
HP_APAPORT_CONFIG_MODE[2]=LAN_MONITOR
HP_APAPORT_SYSTEM_PRIORITY[2]=0
...

Auto Port Aggregation - remove all links from an aggregate

# nwmgr

Name/          Interface Station          Sub-   Interface      Related
ClassInstance  State     Address        system   Type           Interface
============== ========= ============== ======== ============== =========
lan0           UP        0x9A156BE25E25 igssn    1000Base-T     lan900
lan1           UP        0x9A156BE25E25 igssn    1000Base-T     lan900
lan2           UP        0xE6640B0C2A13 igssn    1000Base-T
lan3           UP        0x2EE05547F6A0 igssn    1000Base-T
lan900         UP        0x9A156BE25E25 hp_apa   hp_apa
lan901         DOWN      0x000000000000 hp_apa   hp_apa
lan902         DOWN      0x000000000000 hp_apa   hp_apa
lan903         DOWN      0x000000000000 hp_apa   hp_apa
lan904         DOWN      0x000000000000 hp_apa   hp_apa

# nwmgr -h -v -d -S apa

APA Subsystem Command Help:
Delete ports from an aggregate:
nwmgr -d -A links=ppa1,ppa2...
         [-f] {-c lan<aggregate_instance> | -I aggregate_instance} -S apa
Delete all ports from an aggregate:
nwmgr -d -A links=all
         [-f] {-c lan<aggregate_instance> | -I aggregate_instance} -S apa

# nwmgr -d -A links=all -c lan900
Deletion of links all ports from lan900 succeeded.

# nwmgr

Name/          Interface Station          Sub-   Interface      Related
ClassInstance  State     Address        system   Type           Interface
============== ========= ============== ======== ============== =========
lan0           UP        0x9A156BE25E25 igssn    1000Base-T
lan1           UP        0x9ED55F5D75A7 igssn    1000Base-T
lan2           UP        0xE6640B0C2A13 igssn    1000Base-T
lan3           UP        0x2EE05547F6A0 igssn    1000Base-T
lan900         DOWN      0x000000000000 hp_apa   hp_apa
lan901         DOWN      0x000000000000 hp_apa   hp_apa
lan902         DOWN      0x000000000000 hp_apa   hp_apa
lan903         DOWN      0x000000000000 hp_apa   hp_apa
lan904         DOWN      0x000000000000 hp_apa   hp_apa

# nwmgr -s -S apa -A all --saved --from cu

Auto Port Aggregation - remove one link from an aggregate

In case of some IP level 3 problems, you may want to remove a link from an APA.

Here I remove the lan4 from the apa lan901:

nwmgr -d -A links=4  -c lan901

Create and exploit a network trace

Start a dump on interfaces of the APA lan903 9 and 24:

nwmgr | grep 903
lan9           UP        0x0017A477080C iocxgbe  10GBASE-KR     lan903
lan24          UP        0x0017A477080A iocxgbe  10GBASE-KR     lan903
lan903         UP        0x0017A477080C hp_apa   hp_apa

nettl -tn pduin pduout -e iocxgbe -c 9, 24 -m 512 -tm 99999 -f /tmp/trace

This dump command will only keep the first 512bytes of each packet in order to reduce the dump file size and just keep relevant information.

Stop the dump:

nettl -tf -e all

Display all captured packets:

netfmt -N -n -l -1 -f /tmp/trace.TRC000

Filter informations:

cat /tmp/filterfile
filter ip_daddr 10.24.129.65
filter ip_daddr 10.24.129.1
filter ip_daddr 10.24.129.2
filter udp_sport 53
filter udp_dport 53

netfmt -N -n -l -1 -c /tmp/filterfile -f /tmp/trace.TRC000

---------------------- SUBSYSTEM FILTERS IN EFFECT -----------------


        ---------------- LAYER  1 -----------------

        ---------------- LAYER  2 -----------------

        ---------------- LAYER  3 -----------------
        filter ip_daddr          10.1.1.22
        filter ip_daddr          10.1.1.1
        filter ip_daddr          10.1.1.2

        ---------------- LAYER  4 -----------------
        filter udp_sport         53
        filter udp_dport         53

        ---------------- LAYER  5 -----------------

---------------------- END SUBSYSTEM FILTERS -----------------------

Ei 10.1.1.22.32762 > 10.1.1.1.53: [DF] udp 21 bind q question='cvpeora2.vis.eu 28'
Ei 10.1.1.1.53 > 10.1.1.22.32762: udp 64 bind qr question='cvpeora2.vis.eu 28'
Ei 10.1.1.22.32763 > 10.1.1.1.53: [DF] udp 1a bind q question='cvpeora2 28'
Ei 10.1.1.1.53 > 10.1.1.22.32763: [DF] udp 1a bind qr question='cvpeora2 28'
Ei 10.1.1.22.32764 > 10.1.1.2.53: [DF] udp 1a bind q question='cvpeora2 28'
Ei 10.1.1.22.32767 > 10.1.1.2.53: [DF] udp 1a bind q question='cvpeora2 28'
Ei 10.1.1.22.32768 > 10.1.1.1.53: [DF] udp 2a bind q question='_nfsv4idmapdomain.vis.eu TXT'
Ei 10.1.1.1.53 > 10.1.1.22.32768: [DF] udp 6d bind qr question='_nfsv4idmapdomain.vis.eu TXT'
Ei 10.1.1.22.32769 > 10.1.1.1.53: [DF] udp 23 bind q question='_nfsv4idmapdomain TXT'
Ei 10.1.1.1.53 > 10.1.1.22.32769: [DF] udp 23 bind qr question='_nfsv4idmapdomain TXT'
Ei 10.1.1.22.32770 > 10.1.1.2.53: [DF] udp 23 bind q question='_nfsv4idmapdomain TXT'
Ei 10.1.1.22.32771 > 10.1.1.2.53: [DF] udp 1a bind q question='cvpeora2 28'
Ei 10.1.1.22.32772 > 10.1.1.2.53: [DF] udp 23 bind q question='_nfsv4idmapdomain TXT'
Ei 10.1.1.22.32773 > 10.1.1.2.53: [DF] udp 23 bind q question='_nfsv4idmapdomain TXT'
Ei 10.1.1.22.32774 > 10.1.1.2.53: [DF] udp 1a bind q question='cvpeora2 28'
Ei 10.1.1.22.32775 > 10.1.1.2.53: [DF] udp 23 bind q question='_nfsv4idmapdomain TXT'

Check out this site for more informations: www.compute-aid.com/nettl.html.

Enable LDAP authentication on Active Directory with LDAP-UX

Softwares

Check the required softwares:

swlist | grep -E "(KRB5CLIENT|ixPAMmkdir|LDAPUX)"
  KRB5CLIENT                    E.1.6.2.10     Kerberos V5 Client Version 1.6.2.10
  LDAPUX                        B.05.01        LDAP-UX Integration
  ixPAMmkdir                    A.20.00-1.0.001 Home Directory Creation

If a software is missing, get it on HP Software Depot and install it:

  swinstall -s /depot/LDAPUX_B.05.01_HP-UX_B.11.31_IA_PA.depot \*
  swinstall -s /depot/HP-UX_11i_v3_-_E.1.6.2.10_KRB5CLIENT_E.1.6.2.10_HP-UX_B.11.31_IA_PA.depot \*
  swinstall -s /depot/ixPAMmkdir_ixPAMmkdir_A.20.00-1.0.001_HP-UX_B.11.31_IA_PA.depot \*

Set LDAP admin user credentials

Set the ldap admin account password:

read LDAP_BINDCRED

echo $LDAP_BINDCRED
Complex!Password!
export LDAP_BINDCRED 
echo $LDAP_BINDCRED > /etc/opt/ldapux/cred_tmp

Import the Active Directory certificate

The 'Active Directory Certificate Services - Certificate Authority' must be installed.

First way - get through remote desktop

  • On windows AD, start a mmc and add "Certificates - Current User" snap-in
  • go in Certificates - Current User -> Trusted Root Certification Authorities -> Certificates
  • right click on the AD-CA cert -> All Tasks -> Export
  • Next - Base-64 encoded - save it and copy it on the HP-UX server
  • Copy past on HP-UX server:
# cat /tmp/DC_CA_Cert.txt
-----BEGIN CERTIFICATE-----
MIIDYzCCAkugAwIBAgIQcS2b/rSoO7BP3SIZC1U6yDANBgkqhkiG9w0BAQUFADBE
...
z2PXDptvPWbDsYTq9ljSrJasZRU5Z29UKrXPMvYckCcb5j5obLe0djwMgxebtoOm
c5vDatnADA==
-----END CERTIFICATE-----

Second way - from HP-UX command line

Get the certificate:

/opt/ldapux/bin/ldapsearch -D "cn=ldap_admin,ou=Users,dc=company,dc=com" -j /etc/opt/ldapux/cred_tmp -s sub -T -h serverAD01.company.com -p 389 -b "CN=Certification Authorities,CN=Public Key Services,CN=Services,CN=Configuration,dc=company,dc=com" "(objectClass=certificationAuthority)" cACertificate | awk '/cACertificate::/ {print $2}' > /tmp/DC_CA_Cert_unformated.txt

Display it unformated:

cat /tmp/DC_CA_Cert_unformated.txt
MIIDY...43e9Q==

Format and display the certificate:

( echo "-----BEGIN CERTIFICATE-----"; cat /tmp/DC_CA_Cert_unformated.txt | sed -e "s/.\{64\}/&@/g" | tr '@' '\n'; echo "-----END CERTIFICATE-----" ) > /tmp/DC_CA_Cert.txt
cat /tmp/DC_CA_Cert.txt
-----BEGIN CERTIFICATE-----
MII...ADBE
...
z2P...Om
c5vDatnADA==
-----END CERTIFICATE-----

Check the certificate

openssl x509 -noout -issuer -startdate -enddate -in /tmp/DC_CA_Cert.txt
issuer= /DC=com/DC=company/CN=serverAD01-CA
notBefore=Nov  7 07:41:27 2013 GMT
notAfter=Nov  7 07:51:26 2023 GMT

Add the certificate in the database

Initially there is no database:

ls -la /etc/opt/ldapux/cert8.db /etc/opt/ldapux/key3.db
/etc/opt/ldapux/cert8.db not found
/etc/opt/ldapux/key3.db not found

Add this certificate to the ldap-ux cert database (for the cert name use the CN value from the last command):

/opt/ldapux/contrib/bin/certutil -A -n serverAD01-CA -t "CT,," -d /etc/opt/ldapux -a -i /tmp/DC_CA_Cert.txt
-> -A to add a certificate to the database
-> -n certificate name
-> -t flags C=valid and trusted CA, T=trusted client CA
-> -d DB folder
-> -a the input is an ASCII certificate
-> -u certificate file

ls -la /etc/opt/ldapux/cert8.db /etc/opt/ldapux/key3.db
-rw-------   1 root       sys          65536 Oct 31 15:58 /etc/opt/ldapux/cert8.db
-rw-------   1 root       sys          32768 Oct 31 15:58 /etc/opt/ldapux/key3.db

You can list the certificate:

/opt/ldapux/contrib/bin/certutil -d /etc/opt/ldapux -L
serverAD01-CA                                             CT,,


/opt/ldapux/contrib/bin/certutil -L -d /etc/opt/ldapux -n serverAD01-CA
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number:
            71:2...3a:c8
        Signature Algorithm: PKCS #1 SHA-1 With RSA Encryption
        Issuer: "CN=serverAD01-CA,DC=company,DC=com"
        Validity:
            Not Before: Thu Jun 27 08:52:00 2013
            Not After : Wed Jun 27 09:02:00 2018
        Subject: "CN=serverAD01-CA,DC=company,DC=com"
        Subject Public Key Info:
            Public Key Algorithm: PKCS #1 RSA Encryption
            RSA Public Key:
                Modulus:
                    98:...:88:
...
                Exponent: 65537 (0x10001)
        Signed Extensions:
            Name: Certificate Key Usage
            Usages: Digital Signature
                    Certificate Signing
                    CRL Signing

            Name: Certificate Basic Constraints
            Critical: True
            Data: Is a CA with no maximum path length.

            Name: Certificate Subject Key ID
            Data:
                68:...:77:
                83:...:e8

            Name: Microsoft CertServ CA version
            Data: 0 (0x0)

    Signature Algorithm: PKCS #1 SHA-1 With RSA Encryption
    Signature:
        3c:...:45:
...
    Fingerprint (MD5):
        11:...:CD
    Fingerprint (SHA1):
        11:...:31

    Certificate Trust Flags:
        SSL Flags:
            Valid CA
            Trusted CA
            Trusted Client CA
        Email Flags:
        Object Signing Flags:

Use autosetup to automatically deploy

The autoconfiguration utility will done:

  • search the Active Directory servers by checking the DNS SRV entry (dig -t srv company.com)
  • open TLS connection to the first AD server
  • check the CA certificate
  • check if the shared configuration profile (cn=ldapuxprofile,cn=System,dc=company,dc=com) exist. if yes, he will download it to /etc/opt/ldapux/ldapux_profile.* otherwise, he will store a default one.
if the profile exist you will get:
Found profile entry CN=ldapuxprofile,CN=system,DC=company,DC=com.
Successfully downloaded profile entry from AD server.
  • create the daemon startup file ldapux_client.conf
  • register the current server in the Computers CN
  • configure kerberos client
  • create the proxy credential file with the computer account (/etc/opt/ldapux/pcred)
  • setup pam.conf and nsswitch.conf (add libpam_krb5 in pam.conf and ldap in nsswitch.conf for passwd, group and host)
  • setup the ldapclientd config file (/etc/opt/ldapux/ldapclientd.conf) by setting the StartOnBoot to yes
  • start the ldapclientd daemon

Start the autosetup utility in silent mode:

/opt/ldapux/config/autosetup -q -v 3 -s 389 -x "company.com" -D "cn=ldap_admin,ou=Users,dc=company,dc=com"


Scanning DNS "company.com" domain for any registered LDAP directory servers...
**Found scalar(serverAD.company.com 389
) registered LDAP Directory servers in "company.com" domain.
*Searching rootDSE object on host serverAD.company.com, port 389...
**ldapsearch -h serverAD.company.com -p 389 -T -s base -b "" "(objectClass=*)" defaultNamingContext domainControllerFunctionality supportedCapabilities schemaNamingContext
***version: 1
 dn:
 defaultNamingContext: DC=company,DC=com
 schemaNamingContext: CN=Schema,CN=Configuration,DC=company,DC=com
 supportedCapabilities: 1.2.840.113556.1.4.800
 supportedCapabilities: 1.2.840.113556.1.4.1670
 supportedCapabilities: 1.2.840.113556.1.4.1791
 supportedCapabilities: 1.2.840.113556.1.4.1935
 supportedCapabilities: 1.2.840.113556.1.4.2080
 domainControllerFunctionality: 4

*Verifying user...
**ldapsearch -D cn\=ldap_admin\,ou\=Execution\,ou\=VISUSERS\,dc\=vis\,dc\=com -j /var/tmp/ldap/mgrpasswd_17779.txt -T -h serverAD.company.com -p 389 -ZZZ -P /etc/opt/ldapux/cert8.db -s base -b "" "(objectClass=*)"  dn >/dev/null 2>&1
***dir_manager: cn=ldap_admin,ou=Users,dc=company,dc=com
***host: serverAD.company.com
***host_domain: company.com
***host_fqdn: serverAD.company.com
***host_ipaddr: 1.1.1.1
***port: 389
***ssl_port: 389
***ads_mode: 4
***dc_domain: DC=company,DC=com
***dns_domain: company.com
***domain_base: DC=company,DC=com
***computer_container: CN=computers
***users_container: CN=Users
***schema: CN=Schema,CN=Configuration,DC=company,DC=com
***profile: CN=ldapuxprofile,CN=system,DC=company,DC=com
***passwd_file: /var/tmp/ldap/mgrpasswd_17779.txt
***computer: server01
***computer_fqdn: server01.company.com

*Searching for profile entry CN=ldapuxprofile,CN=system,DC=company,DC=com...
**ldapsearch -D cn\=ldap_admin\,ou\=Execution\,ou\=VISUSERS\,dc\=vis\,dc\=com -j /var/tmp/ldap/mgrpasswd_17779.txt -T -h serverAD.company.com -p 389 -b CN\=ldapuxprofile\,CN\=system\,DC\=vis\,DC\=com -ZZZ -P /etc/opt/ldapux/cert8.db -s base "(objectClass=DUAConfigProfile)" > /etc/opt/ldapux/ldapux_profile.ldif 2>&1

Found profile entry CN=ldapuxprofile,CN=system,DC=company,DC=com.

Successfully downloaded profile entry from AD server.
*Successfully created the binary profile /etc/opt/ldapux/ldapux_profile.bin.
*Modifying /etc/opt/ldapux/ldapux_client.conf...
*Searching rootDSE object on host serverAD.company.com, port 389...
**ldapsearch -h serverAD.company.com -p 389 -T -s base -b "" "(objectClass=*)" defaultNamingContext domainControllerFunctionality supportedCapabilities schemaNamingContext
***version: 1
 dn:
 defaultNamingContext: DC=company,DC=com
 schemaNamingContext: CN=Schema,CN=Configuration,DC=company,DC=com
 supportedCapabilities: 1.2.840.113556.1.4.800
 supportedCapabilities: 1.2.840.113556.1.4.1670
 supportedCapabilities: 1.2.840.113556.1.4.1791
 supportedCapabilities: 1.2.840.113556.1.4.1935
 supportedCapabilities: 1.2.840.113556.1.4.2080
 domainControllerFunctionality: 4

*Creating environment variable file /var/tmp/ldap/server01.env...
***LDAP_BINDDN=cn=ldap_admin,ou=Users,dc=company,dc=com
***LDAP_BINDCRED=@8'oB!uTf@d~6eE
***LDAP_HOSTCRED=Q7ybMAY9eUUE
*Checking if computer account server01 exists...
**ldaphostlist -L -n server01
*Creating computer account server01 in AD server...
**ldaphostmgr -a -I -f -X -P -E /var/tmp/ldap/server01.env server01 userPrincipalName=host/server01.company.com@COMPANY.COM servicePrincipalName=host/server01.company.com samAccountName=server01

Created "server01.company.com" computer account.
*Modifying computer account server01 in AD server...
**ldaphostmgr -E /var/tmp/ldap/server01.env -m server01 userAccountControl=65536

Modified UserAccountControl of "server01.company.com" computer account.
*Keeping proxy user information in file /var/tmp/ldap/server01.proxy...
*Retrieving computer account server01...
**ldaphostlist -h serverAD.company.com -p 389 -b CN\=server01\,CN\=computers\,DC\=vis\,DC\=com -s base "(objectClass=*)" msDS-KeyVersionNumber
***Stored computer account information in file /var/tmp/ldap/server01.info:
***dn: CN=server01,CN=Computers,DC=company,DC=com
 cn: server01
 ipHostNumber: 1.1.1.50
 ipHostNumber: 1.1.2.50
 ipHostNumber: 1.1.3.50
 ipHostNumber: 1.1.4.50
 msDS-KeyVersionNumber: 1

 userPrincipalName: host/server01.company.com@COMPANY.COM

*Creating keytab file for computer server01...
**addhost -p /var/tmp/ldap/server01.proxy -c /var/tmp/ldap/server01.info -k /var/tmp/ldap/server01.keytab -d
Reading proxy information from /var/tmp/ldap/server01.proxy...
computer DN:CN=server01,CN=computers,DC=company,DC=com, len 42
computer password:..., len 12
Reading account information from /var/tmp/ldap/server01.info...
Attribute kvno=1
Attribute krb5Princ=host/server01.company.com@COMPANY.COM
Generating keytab file /var/tmp/ldap/server01.keytab...
*Merging with existing /etc/krb5.keytab...
*Querying DNS for the SRV records of _kerberos in domain...
***Found kdc host: serverAD.company.com, port: 88
*Querying DNS for the SRV records of _kpasswd in domain...
***Found kpasswd host: serverAD.company.com, port: 464
*Modifying Kerberos configuration file /etc/krb5.conf...
***---------------------------------------------
***[libdefaults]
     default_realm = COMPANY.COM
     default_tgs_enctypes = AES256-CTS-HMAC-SHA1-96 AES128-CTS-HMAC-SHA1-96 DES-CBC-CRC DES-CBC-MD5 RC4-HMAC
     default_tkt_enctypes = AES256-CTS-HMAC-SHA1-96 AES128-CTS-HMAC-SHA1-96 DES-CBC-CRC DES-CBC-MD5 RC4-HMAC
     ccache_type = 2

 [realms]
 COMPANY.COM = {
        kdc = serverAD.company.com:88
        kpasswd_server = serverAD.company.com:464
 }


 [domain_realm]
 .company.com = COMPANY.COM

 [logging]
     kdc = FILE:/var/log/krb5kdc.log
     admin_server = FILE:/var/log/kadmin.log
     default = FILE:/var/log/krb5lib.log

***---------------------------------------------

The Kerberos configuration file /etc/krb5.conf has been modified.
*Configuring the proxy user with file /var/tmp/ldap/server01.proxy...
**ldap_proxy_config -i -f /var/tmp/ldap/server01.proxy

Configured "server01.company.com" as LDAP-UX proxy.
*Configuring NSS and PAM Kerberos...
**configNssPam -C both -A kerberos
*Modifying /etc/opt/ldapux/ldapclientd.conf...
***---------------------------------------------
***#!/sbin/sh
 # @(#) $Revision: 1.12 $
 # ldap client daemon configuration.
 #
 # Please note, the below keys are case sensitive.
 #
 # Example:
 #
 # [passwd]
 # enable=yes
 # poscache_ttl=600
 # negcache_ttl=600
 #
 # Note that "TTLs" (time to live) values are in seconds.
 # Note that cache sizes are in bytes.
 #
 [StartOnBoot]
 enable=yes

 [general]
 # If the proxy user is used and defined in /etc/opt/ldapux/pcred, this
 # flag indicates if the proxy user does not hold privileged LDAP
 # credentials, meaning the proxy user is restricted in it's rights to
 # access "private" information in the directory server.  Because
 # ldapclientd provides an interface to access arbitrary information
 # (attributes), ldapclientd needs to know if the proxy credential has
 # more rights that it should.
 #
 # By default, and if set to zero, ldapclientd assumes the proxy user
 # has privledged credentials, and thus will not allow access to attributes
 # beyond that of the RFC2307 schema.  However, you can ammend the list of
 # allowed attributes using the allowed_attribute paramter defined below.
 #
 # If proxy_is_restricted is set to 1, then you are attesting that the
 # directory server is restricting access to private or other confidential
 # information from access by the proxy user.
 proxy_is_restricted=1

 # Allows the ldapclientd interface to return attributes that are associated
 # with RFC2307-based services (such as users and groups), but that those
 # attributes are not specifically part of the RFC2307 schema.  Any attribute
 # specified below should be considered public information.
 allowed_attribute=hosts:sshPublicKey
 allowed_attribute=passwd:sshPublicKey

 # Maximum number of connections ldapclientd can establish to
 # the directory server (or multiple servers when in a multi-domain
 # environment).
 #
 max_conn=100

 #
 # Time between an inactive connection to the directory server is
 # brought down and cleaned up.
 #
 connection_ttl=300

 #
 # Number of threads in ldapclientd.
 #
 num_threads=10

 #
 # Time to clean up socket files created by client applications that
 # were terminated abnormally.
 #
 socket_cleanup_time=300

 #
 # Interval between how often ldapclientd identifies and cleans up
 # stale cache entries.
 #
 cache_cleanup_time=10

 #
 # How often ldapclientd should re-read the ldapux-clientd.conf file.
 #
 update_ldapux_conf_time=600

 #
 # Maximum number of bytes that should be cached by ldapclientd.
 # This value is the maximum upper limit of memory that can be
 # used by ldapclientd.  If this limit is reached, new entries are
 # not cached, until enough expired entries are freed.
 #
 cache_size=10000000

 #
 # A state, a virtual connection between the client and LDAP server,
 # is created for the setXXent() request, and stays for the subsequent
 # getXXent() requests. If no getXXent() requests are received in the
 # specified time interval (seconds), the state will be removed.
 state_dump_time=300

 #
 # Maximum number of states ldapclientd allows. "States" are the number
 # of enumerations ldapclientd will handle simultaneously. This number
 # must be less than max_conn and it is configured as % of max_conn.
 #
 max_enumeration_states=80%

 #
 # How often ldapclientd should re-build the compat information to
 # reflect changes of "+/-" entries in /etc/passwd and /etc/group, as
 # well as changes of netgroup configuration.
 # The default value is 86400 seconds (1 day), the allowed range is
 # from 600 seconds (10 minutes) to 2592000 seconds (30 days).
 #
 flush_compat_info_time=86400

 #
 [passwd]
 enable=yes

 [group]
 enable=yes

 [netgroup]
 enable=yes

 [uiddn]
 enable=yes

 [domain_pwd]
 enable=yes

 [domain_grp]
 enable=yes

 [automount]
 enable=yes

 [automountmap]
 enable=yes

 [dynamic_group]
 # "dynamic_group" has its own default cache_size, poscache_ttl and negcache_ttl.
 cache_size=10000000
 enable=yes
 poscache_ttl=43200
 negcache_ttl=43200

 [longterm_cache]
 #     Should long term cache enabled ?
 # enable=no
 #     How long before data is considered stale and not usabled. 1,209600 = 2 weeks.
 # longterm_expired_interval=1209600
 #     How frequently should save long term data to permanemt storage. 900 = 15 minutes.
 # longterm_cache_backup_interval=900
 #     How much memory to allocate fpr the long term cache, which stores user and group
 #     information. This cache is only used by the working set of users and groups. The
 #     working set means any user or group being used or displayed on the system. If you
 #     have enumerous large groups with enumerous members, this value should be at least
 #     twice as large as the combined size of all those groups.
 # longterm_cache_size=50000000
 #     Should long term caching support enumeration of users and groups. If getpwent()
 #     and getgrent() are not required, this can be disabled.
 # longterm_enum_enable=no
 #     How frequently should the HP-UX client go to the directory server to refresh the
 #     enumeration cache. 86400 = one per day.
 # longterm_enum_search_interval=86400
 #

 #enable=no
 #longterm_expired_interval=1209600
 #longterm_cache_backup_interval=900
 #longterm_cache_size=50000000
 #longterm_enum_enable=no
 #longterm_enum_search_interval=86400

 [printers]
 #  Define the status of the printer configurator when ldapclientd starts.
 #  Option "yes" means the printer configurator service will be activated
 #  when ldapclientd starts. "no" means the printer configurator will be
 #  disabled when ldapclientd starts. Default is "yes".
 start=yes

 # Define the maximum printer objects that the printer configurator service
 # will handle. The value must be greater than 0.
 # Default value is 50.
 max_printers=50

 # Define the interval, in seconds, before the printer configurator service
 # searches for printer objects. The minimum value is 1800 (30 minutes) and the
 # maximum value is 1209600 (14 day). Default value is 86440 seconds.
 search_interval=86400

 # User defined lpadmin options. If the lpadmin_option field is empty or the
 # lpadmin_option is commended out, the default lpadmin options are used.
 #
 # "-mrmodel -v/dev/null -ocmrcmodel -osmrsmodel"
 #
 # Please DO NOT INCLUDE the -p -orm -orp options in the option field.
 # The required information of printer name (-p), remote machine name (-orm) and
 # remote printer name (-orp) will be provided by printer configurator during
 # the run time.
 #
 # To enable the user define lpadmin options,
 # remove the followng # sign and customize the lpadmin options.
 # lpadmin_option=-mrmodel -v/dev/null -ocmrcmodel -osmrsmodel

***---------------------------------------------
*Starting ldapclientd daemon...
*Starting ldapconfd daemon...

Your LDAP-UX client has been successfully configured and
is now a member of the "company.com" domain.

Finalize the configuration

Check that the ldapclientd agent is running:

ps -ef | grep ldap | grep -v grep
    root 17858     1  0 14:15:51 ?         0:00 /opt/ldapux/bin/ldapclientd

Test the proxy user:

/opt/ldapux/config/ldap_proxy_config -v
File Credentials verified - valid

Setup pam_mkdir (add in pam.conf between hpsec and krb5):

login        session    required        /usr/lib/security/hpux64/libpam_mkdir.so.1 skel=/etc/skel/ umask=0022
sshd         session    required        /usr/lib/security/hpux64/libpam_mkdir.so.1 skel=/etc/skel/ umask=0022

Remove the admin credentials:

unset LDAP_BINDCRED
rm /etc/opt/ldapux/cred_tmp

Test a user lookup:

nsquery passwd username ldap
Using "ldap" for the passwd policy.

Searching ldap for username
User name: username
User Id: 10301
Group Id: 10100
Gecos: username
Home Directory: /home/username
Shell: /bin/bash

Troubleshoot LAPD-UX commands

Display all computer objects:

/opt/ldapux/bin/ldapsearch -D "cn=ldap_admin,ou=Users,dc=company,dc=com" -j /etc/opt/ldapux/cred_tmp -s sub -T -h serverAD.company.com -p 389 -ZZZ -b "dc=company,dc=com" "objectClass=computer" *  version: 1

Display only HPUX servers:

/opt/ldapux/bin/ldapsearch -D "cn=ldap_admin,ou=Users,dc=company,dc=com" -j /etc/opt/ldapux/cred_tmp -s sub -T -h serverAD.company.com -p 389 -ZZZ -b "dc=company,dc=com" "(&(operatingSystemVersion=HP*)(objectClass=computer))" *
version: 1
dn: CN=server01,CN=Computers,DC=company,DC=com
dn: CN=server02,CN=Computers,DC=company,DC=com

Display all fileds of a Computer created by the autosetup:

/opt/ldapux/bin/ldapsearch -D "cn=ldap_admin,ou=Users,dc=company,dc=com" -j /etc/opt/ldapux/cred_tmp -s sub -T -h serverAD.company.com -p 389 -ZZZ -b "dc=company,dc=com" "(&(operatingSystemVersion=HP*)(objectClass=computer)(cn=server01))"
version: 1
dn: CN=server01,CN=Computers,DC=company,DC=com
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
objectClass: computer
cn: server01
distinguishedName: CN=server01,CN=Computers,DC=company,DC=com
instanceType: 4
whenCreated: 20131030141551.0Z
whenChanged: 20131030141551.0Z
uSNCreated: 186266
uSNChanged: 186270
name: server01
objectGUID:: ZmgP2QvfskOQ1nzuuPcyIw==
userAccountControl: 66048
badPwdCount: 0
codePage: 0
countryCode: 0
badPasswordTime: 0
lastLogoff: 0
lastLogon: 0
pwdLastSet: 130276161510489571
primaryGroupID: 513
objectSid:: AQUAAAAAAAUVAAAAnwpzSt/J2tU3CsuPggQAAA==
accountExpires: 9223372036854775807
logonCount: 0
sAMAccountName: server01
sAMAccountType: 805306368
operatingSystemVersion: HP-UX B.11.31
managedBy: CN=ldap_admin,OU=Execution,OU=Users,DC=company,DC=com
userPrincipalName: host/server01.company.com@COMPANY.COM
servicePrincipalName: host/server01.company.com
objectCategory: CN=Computer,CN=Schema,CN=Configuration,DC=company,DC=com
dSCorePropagationData: 16010101000000.0Z
lastLogonTimestamp: 130276161518445571
msSFU30Aliases: server01.company.com
ipHostNumber: 1.1.1.50

Get the LDAP Proxy user used in the credential file /etc/opt/ldapux/pcred:

/opt/ldapux/config/ldap_proxy_config -p
PROXY DN: CN=server01,CN=computers,DC=company,DC=com

Display registered IP:

/opt/ldapux/bin/ldaphostlist
dn: CN=server01,CN=Computers,DC=company,DC=com
cn: server01
ipHostNumber: 1.1.1.50

dn: CN=server02,CN=Computers,DC=company,DC=com
cn: server02
ipHostNumber: 1.1.1.55

LDAP client is aware that the proxy account has limited rights:

/etc/opt/ldapux/ldapclientd.conf
proxy_is_restricted=1

Check if the ldapux profile exist on the LDAP:

/etc/opt/ldapux# /opt/ldapux/bin/ldapsearch -D "cn=ldap_admin,ou=Users,dc=company,dc=com" -j /etc/opt/ldapux/cred_tmp -s base -T -h serverAD.company.com -p 389 -ZZZ -b "cn=ldapuxprofile,cn=System,dc=company,dc=com" "objectClass=*" *
version: 1
dn: cn=ldapuxprofile,cn=System,dc=company,dc=com

Display all attributes in the ldapux profile directly from the LDAP:

/etc/opt/ldapux# /opt/ldapux/bin/ldapsearch -D "cn=ldap_admin,ou=Users,dc=company,dc=com" -j /etc/opt/ldapux/cred_tmp -s sub -T -h serverAD.company.com -p 389 -ZZZ -b "cn=ldapuxprofile,cn=System,dc=company,dc=com" "objectClass=*"
version: 1
dn: CN=ldapuxprofile,CN=System,DC=company,DC=com
objectClass: top
objectClass: DUAConfigprofile
cn: ldapuxprofile
distinguishedName: CN=ldapuxprofile,CN=System,DC=company,DC=com
instanceType: 4
whenCreated: 20130627092055.0Z
whenChanged: 20130627092055.0Z
uSNCreated: 32844
uSNChanged: 32844
name: ldapuxprofile
objectGUID:: kpKSxmPvi0KZjFr4d+GAmA==
objectCategory: CN=DUAConfigprofile,CN=Schema,CN=Configuration,DC=company,DC=com
dSCorePropagationData: 16010101000000.0Z
preferredServerList: 1.1.1.1:389
credentialLevel: proxy
bindTimeLimit: 5
authenticationMethod: tls:simple
serviceSearchDescriptor: passwd:CN=Users,?sub?(&(objectclass=user)(uidNumber=*))
serviceSearchDescriptor: shadow:CN=Users,?sub?(&(objectclass=user)(uidNumber=*))
serviceSearchDescriptor: group:CN=Users,?sub?(&(objectclass=group)(gidNumber=*))
serviceSearchDescriptor: pam:CN=Users,?sub?(&(objectclass=user)(uidNumber=*))
serviceSearchDescriptor: rpc:cn=system,?sub?(objectclass=oncRpc)
serviceSearchDescriptor: protocols:cn=system,?sub?(objectclass=ipProtocol)
serviceSearchDescriptor: networks:cn=system,?sub?(objectclass=ipNetwork)
serviceSearchDescriptor: hosts:CN=computers,?sub?(&(objectclass=computer)(ipHostNumber=*))
serviceSearchDescriptor: services:cn=system,?sub?(objectclass=ipService)
serviceSearchDescriptor: printers:?sub?(objectclass=printerlpr)
serviceSearchDescriptor: automount:cn=configuration,?sub?(objectclass=automount)
attributeMap: passwd:gecos=cn location telephoneNumber
attributeMap: passwd:userpassword=*NULL*
attributeMap: passwd:homedirectory=unixHomeDirectory
attributeMap: shadow:userpassword=*NULL*
attributeMap: group:userpassword=*NULL*
attributeMap: pam:userpassword=*NULL*
attributeMap: rpc:cn=cn msSFU30Aliases
attributeMap: protocols:cn=cn msSFU30Aliases
attributeMap: networks:cn=cn msSFU30Aliases
attributeMap: hosts:cn=cn msSFU30Aliases
attributeMap: services:cn=cn msSFU30Aliases
defaultSearchBase: DC=company,DC=com
profileTTL: 14400

Alternatively, you can display the current profil content from the one in the cache:

/etc/opt/ldapux# /opt/ldapux/config/display_profile_cache
LDAP-UX Client Services

Global Information from the Configuration Profile
=================================================
    host[:port]:          1.1.1.1:389
    default search base:  DC=company,DC=com
    auth:                 tls:simple
    profilecachettl:      14400 seconds
    follow referrals:     enabled
    search time limit:    0 = no limit
    bind time limit:      5 seconds
    credential level:     proxy

PASSWD service configuration
============================
    Attribute:            is mapped to:
    ----------            -------------
    name:                 uid
    uid number:           uidnumber
    primary gid:          gidnumber
    login shell:          loginshell
    passwd:               *NULL*
    home directory:       unixHomeDirectory
    gecos 1:              cn
    gecos 2:              location
    gecos 3:              telephoneNumber
    gecos 4:
    gecos 5:

    Search Descriptor
    -----------------
    search[0]:            CN=Users,DC=company,DC=com?sub?(&(objectclass=user)(uidNumber=*))
...

You can update the local profile cache with the current one in the LDAP (the profileTTL define when this is automatically done by all clients):

/etc/opt/ldapux# ll ldapux_profile.*
-rw-r--r--   1 root       root         40148 Oct 31 08:58 ldapux_profile.bin
-rw-r--r--   1 root       root          1942 Oct 31 08:58 ldapux_profile.ldif
/etc/opt/ldapux# /opt/ldapux/config/get_profile_entry -s nss
---OR---
/etc/opt/ldapux# /opt/ldapux/config/get_profile_entry -s nss -D  "cn=ldap_admin,ou=Users,dc=company,dc=com" -w $LDAP_BINDCRED
/etc/opt/ldapux# ll ldapux_profile.*
-rw-r--r--   1 root       root         40148 Oct 31 10:20 ldapux_profile.bin
-rw-r--r--   1 root       root          1942 Oct 31 10:20 ldapux_profile.ldif
 >In the log, you will get these entries at log level 2:
[Oct/31/2013 12:50:38  7:    control.c: 253:             control_execute: called]
[Oct/31/2013 12:50:38  7:    control.c: 334:             control_execute: Control: setting new profile]
[Oct/31/2013 12:50:38  7: connection.c: 919:              free_ldap_conn: _hp_ldap_unbind(0x40511bc0, TRUE)]
[Oct/31/2013 12:50:38  7:     daemon.c: 400:                   reply_msg: called]

To debug the ldapuxclient:

 >kill the current daemon
/opt/ldapux/bin/ldapclientd -k
 >start a new one in debug level 2 and prevent it to daemonize
/opt/ldapux/bin/ldapclientd -d 2 -o stdout -z
 >disable the passwd cache
/opt/ldapux/bin/ldapclientd -D passwd
 >make a request and check the logs
nsquery passwd username ldap
Using "ldap" for the passwd policy.

Searching ldap for username
User name: username
User Id: 10307
Group Id: 10100
Gecos: username
Home Directory: /home/username
Shell: /bin/bash

Switch configuration: Terminates Search
 >re-enable passwd cache
/opt/ldapux/bin/ldapclientd -E passwd

Steps to change the ldapux profile in command line without ASIedit on Windows:

 >Get the current attributes from the ldap object:
/etc/opt/ldapux# /opt/ldapux/bin/ldapsearch -D "cn=ldap_admin,ou=Users,dc=company,dc=com" -j /etc/opt/ldapux/cred_tmp -s sub -T -h serverAD.company.com -p 389 -ZZZ -b "cn=ldapuxprofile,cn=System,dc=company,dc=com" "objectClass=*" > ldapuxprofile.before
 >Edit the ldapux_profile object
/etc/opt/ldapux# /opt/ldapux/bin/ldapentry  -D "cn=ldap_admin,ou=Users,dc=company,dc=com" -h serverAD.company.com -m "CN=ldapuxprofile,CN=System,DC=company,DC=com"
Apply the changes and replace entry in directory? (y/n): y
modifying entry CN=ldapuxprofile,CN=System,DC=company,DC=com

Modified.
 >Get again the attributes to check the changes:
/etc/opt/ldapux# /opt/ldapux/bin/ldapsearch -D "cn=ldap_admin,ou=Users,dc=company,dc=com" -j /etc/opt/ldapux/cred_tmp -s sub -T -h serverAD.company.com -p 389 -ZZZ -b "cn=ldapuxprofile,cn=System,dc=company,dc=com" "objectClass=*" > ldapuxprofile.after
 >Display the changes:
/etc/opt/ldapux# diff ldapuxprofile.before ldapuxprofile.after
9c9
< whenChanged: 20131031104707.0Z
---
> whenChanged: 20131031140510.0Z
11c11
< uSNChanged: 188572
---
> uSNChanged: 188623
21,24c21,24
< serviceSearchDescriptor: passwd:CN=Users,?sub?(&(objectclass=user)(uidNumber=*))
< serviceSearchDescriptor: shadow:CN=Users,?sub?(&(objectclass=user)(uidNumber=*))
< serviceSearchDescriptor: group:CN=Users,?sub?(&(objectclass=group)(gidNumber=*))
< serviceSearchDescriptor: pam:CN=Users,?sub?(&(objectclass=user)(uidNumber=*))
---
> serviceSearchDescriptor: pam:OU=Users,?sub?(&(objectclass=user)(uidNumber>=1000)(memberOf=CN=sys_admin,OU=Groups,OU=Users,DC=company,DC=com))
> serviceSearchDescriptor: passwd:OU=Users,?sub?(&(objectclass=user)(uidNumber>=1000)(memberOf=CN=sys_admin,OU=Groups,OU=Users,DC=company,DC=com))
> serviceSearchDescriptor: shadow:OU=Users,?sub?(&(objectclass=user)(uidNumber>=1000)(memberOf=CN=sys_admin,OU=Groups,OU=Users,DC=company,DC=com))
> serviceSearchDescriptor: group:OU=Groups,OU=Users,?sub?(&(objectclass=group)(gidNumber=*))

MC/SG Serviceguard cluster

Basic Commands

Activate a cluster VG:

vgchange -a e vgTEST

Put a VG in cluster mode:

vgchange -a n /dev/vgTEST
Volume group "/dev/vgTEST" has been successfully changed.

vgchange -c y /dev/vgTEST
Configuration change completed.
Volume group "/dev/vgTEST" has been successfully changed.

Display the cluster status:

cmviewcl

CLUSTER        STATUS
CLUSTER_NAME   up

  NODE           STATUS       STATE
  s1             up           running

    PACKAGE        STATUS           STATE            AUTO_RUN    NODE
    p1             up               running          enabled     s1
    p2             up               running          disabled    s1
    p3             up               running          disabled    s1

  NODE           STATUS       STATE
  s2             up           running

    PACKAGE        STATUS           STATE            AUTO_RUN    NODE
    p4             up               running          enabled     s2
    p5             up               running          enabled     s2


Config files are in /etc/cmcluster


The configuration of the cluster is a binary file /etc/cmcluster/cmclconfig

You can a text version of the current running cluster with cmgetconf:

cmgetconf -c clu | grep -Ev "^(#|$)"

CLUSTER_NAME            clu1
HOSTNAME_ADDRESS_FAMILY         IPV4
FIRST_CLUSTER_LOCK_VG           /dev/vg_nfs
NODE_NAME               node01
  NETWORK_INTERFACE     lan900
    STATIONARY_IP       10.1.64.20
  NETWORK_INTERFACE     lan901
    HEARTBEAT_IP        10.1.65.20
  NETWORK_INTERFACE     lan902
    HEARTBEAT_IP        10.1.72.20
  NETWORK_INTERFACE     lan903
    STATIONARY_IP       10.1.129.20
  FIRST_CLUSTER_LOCK_PV /dev/disk/disk23
NODE_NAME               node02
  NETWORK_INTERFACE     lan900
    STATIONARY_IP       10.1.64.25
  NETWORK_INTERFACE     lan901
    HEARTBEAT_IP        10.1.65.25
  NETWORK_INTERFACE     lan902
    HEARTBEAT_IP        10.1.72.25
  NETWORK_INTERFACE     lan903
    STATIONARY_IP       10.1.129.25
  FIRST_CLUSTER_LOCK_PV /dev/disk/disk18
MEMBER_TIMEOUT          14000000
AUTO_START_TIMEOUT      600000000
NETWORK_POLLING_INTERVAL        2000000
NETWORK_FAILURE_DETECTION               INOUT
NETWORK_AUTO_FAILBACK           YES
SUBNET 10.1.64.0
  IP_MONITOR OFF
SUBNET 10.1.65.0
  IP_MONITOR OFF
SUBNET 10.1.72.0
  IP_MONITOR OFF
SUBNET 10.1.129.0
  IP_MONITOR OFF
MAX_CONFIGURED_PACKAGES         300
USER_NAME               ANY_USER
USER_HOST               ANY_SERVICEGUARD_NODE
USER_ROLE               monitor
VOLUME_GROUP            /dev/vg_nfs
VOLUME_GROUP            /dev/vg_1
VOLUME_GROUP            /dev/vg_2


Display the current package configuration:

cmgetconf -p p1


Put a package in autostart on node s1:

cmmodpkg -e -n s1 p1


Disable a package:

cmhaltpkg p1


Start a package on a specific node:

cmrunpkg -n s2 p1


Move a package to another node:

cmhaltpkg p1
cmrunpkg -n s2 p1
cmmodpkg -e -n s1 p1


To delete a package:

cmhaltpkg p1
cmdeleteconf -p p1

Then, you need to:

-remove packages configuration files
-remove the corresponding LV and VG
-remove mount points

Create a cluster

I was using the following version of SG:

swlist | grep Serviceguard
  B5140BA                       A.11.31.08     Serviceguard NFS Toolkit
  SG-IVS-Toolkit                B.02.00        Serviceguard Toolkit for Integrity Virtual Servers
  T1905CA                       A.11.20.00.01  Serviceguard

We need to export the VG created on the node one to the other node(s):

vgexport -v -p -s -m vg_nfs.map /dev/vg_nfs

We need to create the same special file with identical minor & major numbers:

node1# ls -laF /dev/*/group | grep nfs
crw-r-----   1 root       sys        128 0x002000 Sep  2 13:04 /dev/vg_nfs/group

node2# mkdir /dev/vg_nfs
node2# mknod /dev/vg_nfs/group c 128 0x002000

We can now import the VG on the second node (the -N option take care to scan only agile devices for PVID):

node2# vgimport -v -s -N -m vg_nfs.map /dev/vg_nfs

Change identd timeout:

grep iden /etc/inetd.conf
auth         stream tcp6 wait   bin  /usr/lbin/identd   identd -T120

Change authorised node/user to communicate with the cluster daemon:

printf "node1 root\nnode2 root\n" > /etc/cmcluster/cmclnodelist

Correctly configure nsswith.conf and resolv.conf. I decided to not rely on the DNS service and use the hosts file in first:

cat /etc/nsswitch.conf
passwd:       files
group:        files
hosts:        files [NOTFOUND=continue UNAVAIL=continue] dns [NOTFOUND=return UNAVAIL=return]
ipnodes:      files [NOTFOUND=continue UNAVAIL=continue] dns [NOTFOUND=return UNAVAIL=return]
services:     files
networks:     files
protocols:    files
rpc:          files
publickey:    files
netgroup:     files
automount:    files
aliases:      files

The /etc/hosts file must look like this:

1.1.10.50     node1           node1.domain.com
1.1.14.50     node1-cli       node1   node1-cli.domain.com
1.1.22.50     node1-priv      node1   node1-priv.domain.com

1.1.10.55     node2           node2.domain.com
1.1.14.55     node2-cli       node2   node2-cli.domain.com
1.1.22.55     node2-priv      node2   node2-priv.domain.com

You can now create the initial cluster configuration file:

cmquerycl -v -C /etc/cmcluster/CLU1.conf -n node1 -n node2

Here is the result:

egrep -v "^(#|$)" /etc/cmcluster/CLU1.conf
CLUSTER_NAME            clu
HOSTNAME_ADDRESS_FAMILY         IPV4
FIRST_CLUSTER_LOCK_VG           /dev/vg_nfs
NODE_NAME               node1
  NETWORK_INTERFACE     lan900
    HEARTBEAT_IP        1.1.10.50
  NETWORK_INTERFACE     lan901
    HEARTBEAT_IP        1.1.14.50
  NETWORK_INTERFACE     lan902
    STATIONARY_IP       1.1.22.50
  FIRST_CLUSTER_LOCK_PV /dev/disk/disk67
NODE_NAME               node2
  NETWORK_INTERFACE     lan900
    HEARTBEAT_IP        1.1.10.55
  NETWORK_INTERFACE     lan901
    HEARTBEAT_IP        1.1.14.55
  NETWORK_INTERFACE     lan902
    STATIONARY_IP       1.1.22.55
  FIRST_CLUSTER_LOCK_PV /dev/disk/disk67
MEMBER_TIMEOUT          14000000
AUTO_START_TIMEOUT      600000000
NETWORK_POLLING_INTERVAL        2000000
NETWORK_FAILURE_DETECTION               INOUT
NETWORK_AUTO_FAILBACK           YES
SUBNET 1.1.10.0
  IP_MONITOR OFF
SUBNET 1.1.14.0
  IP_MONITOR OFF
SUBNET 1.1.22.0
  IP_MONITOR OFF
MAX_CONFIGURED_PACKAGES         300
USER_NAME       ANY_USER
USER_HOST       ANY_SERVICEGUARD_NODE
USER_ROLE       MONITOR
VOLUME_GROUP            /dev/vg_nfs

Enable autostart of cmcluster with the OS:

ch_rc -a -p AUTOSTART_CMCLD=1 /etc/rc.config.d/cmcluster

Check the status and run the cluster:

cmviewcl

CLUSTER                     STATUS
clu   down

  NODE                STATUS       STATE
  node1               down         unknown
  node2               down         unknown

cmruncl
cmruncl: Validating network configuration...
cmruncl: Network validation complete
cmruncl: Validating cluster lock disk .... Done
Waiting for cluster to form .... done
Cluster successfully formed.
Check the syslog files on all nodes in the cluster to verify that no warnings occurred during startup.

It's a good idea to check syslog for errors...

cmviewcl

CLUSTER                     STATUS
clu                         up

  NODE                STATUS       STATE
  node1               up           running
  node2               up           running

Legacy package

A legacy package contain:

/etc/cmcluster/p1/p1.cntl
/etc/cmcluster/p1/p1.conf

The cntl file is executed directly, no need to reapply a change.

Create and configure a legacy cluster package:

cmmakepkg -p /etc/cmcluster/p1/p1.conf

grep -Ev "^(#|[[:space:]]*$)" /etc/cmcluster/p1/p1.conf
PACKAGE_NAME    P1
PACKAGE_TYPE                    FAILOVER
NODE_NAME       node01
NODE_NAME       node02
AUTO_RUN                        YES
NODE_FAIL_FAST_ENABLED                  NO
RUN_SCRIPT      /etc/cmcluster/p1/p1.cntl
HALT_SCRIPT     /etc/cmcluster/p1/p1.cntl
RUN_SCRIPT_TIMEOUT                      NO_TIMEOUT
HALT_SCRIPT_TIMEOUT                     NO_TIMEOUT
SUCCESSOR_HALT_TIMEOUT                  NO_TIMEOUT
FAILOVER_POLICY                 CONFIGURED_NODE
FAILBACK_POLICY                 MANUAL
PRIORITY                        NO_PRIORITY
LOCAL_LAN_FAILOVER_ALLOWED                      YES

Example of cntl file:

VG[0]="/dev/vgTEST"
VXVM_DG_RETRY="NO"
DEACTIVATION_RETRY_COUNT=2
KILL_PROCESSES_ACCESSING_RAW_DEVICES="NO"
LV[0]="/dev/vgTEST/lv1"; FS[0]="/TEST/1"; FS_MOUNT_OPT[0]="-o rw"; FS_UMOUNT_OPT[0]="-s "; FS_FSCK_OPT[0]="-s"; FS_TYPE[0]="vxfs"
LV[1]="/dev/vgTEST/lv2"; FS[1]="/TEST/2"; FS_MOUNT_OPT[1]="-o rw"; FS_UMOUNT_OPT[1]="-s"; FS_FSCK_OPT[1]="-s"; FS_TYPE[1]="vxfs"
LV[2]="/dev/vgTEST/lv3"; FS[2]="/TEST/3"; FS_MOUNT_OPT[2]="-o rw"; FS_UMOUNT_OPT[2]="-s"; FS_FSCK_OPT[2]="-s"; FS_TYPE[2]="vxfs"
VXVOL="vxvol -g \$DiskGroup startall"      # Default
FS_UMOUNT_COUNT=1
FS_MOUNT_RETRY_COUNT=0
CONCURRENT_VGCHANGE_OPERATIONS=1
ENABLE_THREADED_VGCHANGE=0
CONCURRENT_FSCK_OPERATIONS=1
CONCURRENT_MOUNT_AND_UMOUNT_OPERATIONS=1
IP[0]="10.131.0.232"
SUBNET[0]="10.131.0.0"
IP[1]="10.1.83.232"
SUBNET[1]="10.1.83.0"
SERVICE_NAME[0]="DBS_TEST"
SERVICE_CMD[0]="/usr/bin/sleep 222222211"
SERVICE_RESTART[0]="-r 2"

log_file=${SG_SCRIPT_LOG_FILE:-$0.log}
function customer_defined_run_cmds
{
: # do nothing instruction, because a function must contain some command.
        /etc/cmcluster/TEST/DBS_TEST.sh start
        test_return 51
}

function customer_defined_halt_cmds
{
: # do nothing instruction, because a function must contain some command.
        /etc/cmcluster/TEST/DBS_TEST.sh shutdown
        test_return 52
}

You must manually copy the package files on all packages' nodes with cmsync or scp.

To add the package to the cluster:

cmcheckconf -v -P /etc/cmcluster/p1/p1.conf
Begin package verification...
Checking existing configuration ... Done
/etc/cmcluster/p1/p1.conf: A legacy package is being used.
Attempting to add package oauattcsdb.
Maximum configured packages parameter is 30.
Configuring 1 package(s).
Adding the package configuration for package oauattcsdb.
cmcheckconf: Verification completed with no errors found.
Use the cmapplyconf command to apply the configuration

cmapplyconf -P /etc/cmcluster/p1/p1.conf
Begin package verification...
Checking existing configuration ... Done
/etc/cmcluster/p1/p1.conf: A legacy package is being used.
Attempting to add package p1.
Maximum configured packages parameter is 30.
Configuring 1 package(s).
Adding the package configuration for package p1.

Modify the package configuration ([y]/n)? y
Completed the cluster update

Modular package with external script and dependency

To create the package:

mkdir /etc/cmcluster/NFS-CLIENT
cmmakepkg -m sg/external -m sg/external_pre -m sg/dependency /etc/cmcluster/NFS-CLIENT-01/NFS-CLIENT-01.conf

Then you need to configure the following elements:

package name
package description
node name
external script path
dependency name
dependency condition

For the external script template, use this one: /etc/cmcluster/examples/external_script.template

You can see dependency information with a verbose cmviewcl:

cmviewcl -v -p NFS-CLIENT-01

    PACKAGE            STATUS           STATE            AUTO_RUN    NODE
    NFS-CLIENT-01      up               running          enabled     node01

      Policy_Parameters:
      POLICY_NAME     CONFIGURED_VALUE
      Failover        configured_node
      Failback        manual

      Node_Switching_Parameters:
      NODE_TYPE    STATUS       SWITCHING    NAME
      Primary      up           enabled      node01 (current)

      Dependency_Parameters:
      DEPENDENCY_NAME         NODE_NAME           SATISFIED
      NFS-SERVER-DEP          node01              yes

      Other_Attributes:
      ATTRIBUTE_NAME                          ATTRIBUTE_VALUE
      Style                                   modular
      Priority                                no_priority

NFS package with Serviceguard NFS Toolkit

Create the package configuration file with the good modules:

cmmakepkg -m sg/all -m nfs/hanfs /etc/cmcluster/NFS-SERVER/NFS-SERVER.conf

Edit the configuration to change the package name, node_name, IP address, VG, LV, NFS export:

grep -E "^(package_name|node_name|ip_|fs_name|vg|nfs/hanfs_export/XFS|fs_directory)" /etc/cmcluster/NFS-SERVER/NFS-SERVER.conf
package_name                    NFS-SERVER
node_name                       node01
node_name                       node02
ip_subnet       10.1.5.0
ip_address      10.1.5.11
vgchange_cmd                    "vgchange -a e"
vg      vg_nfs
fs_name /dev/vg_nfs/lv_ftp
fs_directory /nfs_server/
nfs/hanfs_export/XFS    "-o root=@10.1.5 /nfs_server/ftp"

Change NFS configuration to have:

grep -E "^(NFS_SERVER|PCNFS_SERVER|START_MOUNTD)" /etc/rc.config.d/nfsconf
NFS_SERVER=1
PCNFS_SERVER=1
START_MOUNTD=1

Create the mount point and the folders for the modules:

mkdir -p /nfs_server/MOUNT_POINT_DO_NOT_USE
vgchange -a e vg_nfs
mount /dev/vg_nfs/lv_ftp /nfs_server/
mkdir -p /nfs_server/cmpkg/nfsv4
mkdir -p /nfs_server/cmpkg/sm
mkdir -p /nfs_server/ftp
umount /nfs_server/
vgchange -a n vg_nfs

On the other nodes, create the mount point:

mkdir -p /nfs_server/MOUNT_POINT_DO_NOT_USE

Spread the configuration to the other nodes:

cmsync -r /etc/cmcluster/NFS-SERVER

Add and enable the package on the cluster:

cmapplyconf -P /etc/cmcluster/NFS-SERVER/NFS-SERVER.conf
cmmodpkg -e NFS-SERVER


Check the syslog:

root@node01:/etc/cmcluster/NFS-SERVER# cmmodpkg -e NFS-SERVER
Sep 23 12:07:45 node01 syslog: cmrunpkg NFS-SERVER
Sep 23 12:07:45 node01 syslog: Request from root on node node01 to start package NFS-SERVER
Sep 23 12:07:45 node01 cmcld[7432]: Request from root on node node01 to start package NFS-SERVER
Sep 23 12:07:45 node01 cmcld[7432]: Request from node node01 to start package NFS-SERVER on node node01.
Sep 23 12:07:45 node01 cmcld[7432]: Executing '/etc/cmcluster/scripts/mscripts/master_control_script.sh start' for package NFS-SERVER, as service PKG*89603.
Sep 23 12:07:45 node01 cmserviced[7438]: Request to start package NFS-SERVER
Sep 23 12:07:45 node01 LVM[25023]: vgchange -a e vg_nfs
Sep 23 12:07:45 node01 syslog: cmmodnet -a -i 10.1.5.11 10.1.5.0
Sep 23 12:07:45 node01 syslog: cmrunserv nfs.monitor.ftp >> /var/adm/cmcluster/log/NFS-SERVER.log 2>&1 /etc/cmcluster/scripts/nfs/nfs_upcc.mon
Sep 23 12:07:45 node01 cmserviced[7438]: Request to run service nfs.monitor.ftp
Sep 23 12:07:45 node01 cmserviced[7438]: Package Script for NFS-SERVER completed successfully with an exit(0).
Sep 23 12:07:45 node01 cmcld[7432]: Started package NFS-SERVER on node node01.

check the package status

root@node01:/etc/cmcluster/NFS-SERVER# df /nfs_server/
/nfs_server          (/dev/vg_nfs/lv_ftp  ): 234764030 blocks   31301868 i-nodes
root@node01:/etc/cmcluster/NFS-SERVER# netstat -in | grep 10.1.5.11
lan901:1  1500 10.1.5.0     10.1.5.11    0                  0     0                  0     0
root@node01:/etc/cmcluster/NFS-SERVER# ps -efx | grep nfs_upcc.mon | grep -v grep
    root 12754  7438  0 11:15:12 ?         0:00 /usr/bin/sh /etc/cmcluster/scripts/nfs/nfs_upcc.mon
root@node01:/etc/cmcluster/NFS-SERVER# share
-               /nfs_server/ftp   root=@10.1.5   ""

I describe a way to mount this HA resource here: #Setup_a_NFS_direct_auto_mount_rule

Rename cluster nodes

Here the steps followed to rename the hostname of cluster nodes:

#Get the current cluster configuration
cmgetconf -c PRD1 > /etc/cmcluster/PRD1.conf.131030
cp -p /etc/cmcluster/PRD1.conf.131030 /etc/cmcluster/PRD1.conf.131030.rename
# stop SG
cmhaltcl -f
#switch to single user on both nodes
init 1
# rename each nodes
node01:# uname -S "node01"
node01:# hostname "node01"
node01:# vi /etc/hosts
node01:# vi /etc/rc.config.d/netconf
node02:# uname -S "node02"
node02:# hostname "node02"
...
# edit the nodelist file to change the hostname 
vi /etc/cmcluster/cmclnodelist
# change the hostname in the configuration file
vi /etc/cmcluster/PRD1.conf.131030.rename
# change nodename for each package configuration file
vi /etc/cmcluster/PKG1/PKG1.conf
vi /etc/cmcluster/PKG2/PKG2.conf
# edit the cluster configuration file to change the nodename (write down the VG and PV lock informations)
vi /etc/cmcluster/PRD1.conf
# on both nodes remove the binary cluster configuration file
mv /etc/cmcluster/cmclconfig /etc/cmcluster/cmclconfig.old
# start ssh and spread the changed files to the other node
/sbin/init.d/secsh start
scp -p /etc/hosts /etc/cmcluster/cmclnodelist /etc/cmcluster/PKG1/PKG1.conf /etc/cmcluster/PKG2/PKG2.conf /etc/cmcluster/PRD1.conf /etc/cmcluster/PRD1.conf.131030 /etc/cmcluster/PRD1.conf.131030.rename 1.1.1.2:
# disable cmcluster autostart
ch_rc -a -p AUTOSTART_CMCLD=0 /etc/rc.config.d/cmcluster
# return to runlevel3
init 3
# reset the PV lock (check in the cluster config file)
vgchange -c n vg_a
vgchange -a y vg_a
cmdisklock reset /dev/vg_a:/dev/disk/disk66
vgchange -a n vg_a
# recreate cluster binary configuration file
cmapplyconf -v -C /etc/cmcluster/PRD1.conf.131030.rename
# disable cluster mode of the VG
vgchange -c n vg_1
vgchange -c n vg_2
# start the cluster
cmruncl
# add the packages
cmapplyconf -P /etc/cmcluster/PKG1/PKG1.conf
cmapplyconf -P /etc/cmcluster/PKG2/PKG2.conf
# start the packages
cmmodpkg -e PKG1
cmmodpkg -e PKG2
# enable cmcluster autostart
ch_rc -a -p AUTOSTART_CMCLD=1 /etc/rc.config.d/cmcluster

Software and patch

Install a depot file

swinstall -s /tmp/patch/PHCO_40381.depot \*

Show the installed patch:

[root@srv:/share/HPUX]$ swlist PHCO_40381
# Initializing...
# Contacting target "srv"...
#
# Target:  srv:/
#

# PHCO_40381                    1.0            diskowner(1M) cumulative patch
  PHCO_40381.C-INC              1.0            ProgSupport.C-INC
  PHCO_40381.CORE-ENG-A-MAN     1.0            OS-Core.CORE-ENG-A-MAN
  PHCO_40381.CORE2-SHLIBS       1.0            OS-Core.CORE2-SHLIBS
  PHCO_40381.UX-CORE            1.0            OS-Core.UX-CORE
  PHCO_40381.UX2-CORE           1.0            OS-Core.UX2-CORE

Rollback a patch

Get patch informations:

[root@srv:/]$ swlist PHCO_43004
# Initializing...
# Contacting target "srv"...
#
# Target:  srv:/
#

# PHCO_43004                            1.0            diskowner(1M) cumulative patch
  PHCO_43004.C-INC                      1.0            ProgSupport.C-INC
  PHCO_43004.CORE-ENG-A-MAN             1.0            OS-Core.CORE-ENG-A-MAN
  PHCO_43004.CORE2-SHLIBS               1.0            OS-Core.CORE2-SHLIBS
  PHCO_43004.UX-CORE                    1.0            OS-Core.UX-CORE
  PHCO_43004.UX2-CORE                   1.0            OS-Core.UX2-CORE

Check the patch status:

[root@srv:/]$ swlist -a patch_state PHCO_43004
# Initializing...
# Contacting target "srv"...
#
# Target:  srv:/
#

# PHCO_43004
  PHCO_43004.C-INC                      applied
  PHCO_43004.CORE-ENG-A-MAN             applied
  PHCO_43004.CORE2-SHLIBS               applied
  PHCO_43004.UX-CORE                    applied
  PHCO_43004.UX2-CORE                   applied

Check if sw has the old files:

[root@srv:/]$ ll -d /var/adm/sw/save/PHCO_43004
drwxr-xr-x   7 root       sys           8192 May 14 08:01 /var/adm/sw/save/PHCO_43004

Preview the change:

[root@srv:/]$ swremove -p PHCO_43004

=======  07/05/13 09:10:02 CDT  BEGIN swremove SESSION
         (non-interactive) (jobid=srv-0018)

       * Session started for user "root@srv".

       * Beginning Selection
       * Target connection succeeded for "srv:/".
       * Software selections:
             PHCO_43004.C-INC,l=/,r=1.0,a=HP-UX_B.11.31_IA/PA,v=HP,fr=1.0,fa=HP-UX_B.11.31_IA/PA
             PHCO_43004.CORE-ENG-A-MAN,l=/,r=1.0,a=HP-UX_B.11.31_IA/PA,v=HP,fr=1.0,fa=HP-UX_B.11.31_IA/PA
             PHCO_43004.CORE2-SHLIBS,l=/,r=1.0,a=HP-UX_B.11.31_IA/PA,v=HP,fr=1.0,fa=HP-UX_B.11.31_IA
             PHCO_43004.UX-CORE,l=/,r=1.0,a=HP-UX_B.11.31_IA/PA,v=HP,fr=1.0,fa=HP-UX_B.11.31_IA/PA
             PHCO_43004.UX2-CORE,l=/,r=1.0,a=HP-UX_B.11.31_IA/PA,v=HP,fr=1.0,fa=HP-UX_B.11.31_IA
       * Selection succeeded.


       * Beginning Analysis
       * Session selections have been saved in the file
         "/.sw/sessions/swremove.last".
ERROR:   "srv:/":  The software dependencies for 1 products or
         filesets cannot be resolved.
       * "srv:/":  4 software objects were determined to be
         skipped in the analysis phase.
       * The analysis phase failed for "srv:/".
       * Analysis had errors.


NOTE:    More information may be found in the agent logfile using the
         command "swjob -a log srv-0018 @ srv:/".

=======  07/05/13 09:10:04 CDT  END swremove SESSION (non-interactive)
         (jobid=srv-0018)

Get the dependencies:

[root@srv:/]$ swjob -a log srv-0019 @ srv:/
=======  07/05/13 14:10:45 UTC  BEGIN remove AGENT SESSION (pid=4164)
         (jobid=srv-0019)

       * Agent session started for user "root@srv". (pid=4164)

       * Beginning Analysis Phase.
       * Target:           srv:/
       * Target logfile:   srv:/var/adm/sw/swagent.log
       * Reading source for file information.
       * The fileset "PHCO_42144.CORE-JPN-E-MAN,l=/,r=1.0" requires the
         selected fileset "PHCO_43004.CORE-ENG-A-MAN,l=/,r=1.0" as a
         corequisite.
       * The fileset "PHCO_42144.CORE-JPN-S-MAN,l=/,r=1.0" requires the
         selected fileset "PHCO_43004.CORE-ENG-A-MAN,l=/,r=1.0" as a
         corequisite.

Check the patch PHCO_42144:

[root@srv:/]$ swlist PHCO_42144
# Initializing...
# Contacting target "srv"...
#
# Target:  srv:/
#

# PHCO_42144                            1.0            diskowner(1M) Japanese manpage cumulative patch
  PHCO_42144.CORE-JPN-E-MAN             1.0            OS-Core.CORE-JPN-E-MAN
  PHCO_42144.CORE-JPN-S-MAN             1.0            OS-Core.CORE-JPN-S-MAN

Rollback the patches:

[root@srv:/]$ swremove PHCO_43004 PHCO_42144

=======  07/05/13 09:12:29 CDT  BEGIN swremove SESSION
         (non-interactive) (jobid=srv-0021)

       * Session started for user "root@srv".

       * Beginning Selection
       * Target connection succeeded for "srv:/".
       * Software selections:
             PHCO_42144.CORE-JPN-E-MAN,l=/,r=1.0,a=HP-UX_B.11.31_IA/PA,v=HP,fr=1.0,fa=HP-UX_B.11.31_IA/PA
             PHCO_42144.CORE-JPN-S-MAN,l=/,r=1.0,a=HP-UX_B.11.31_IA/PA,v=HP,fr=1.0,fa=HP-UX_B.11.31_IA/PA
             PHCO_43004.C-INC,l=/,r=1.0,a=HP-UX_B.11.31_IA/PA,v=HP,fr=1.0,fa=HP-UX_B.11.31_IA/PA
             PHCO_43004.CORE-ENG-A-MAN,l=/,r=1.0,a=HP-UX_B.11.31_IA/PA,v=HP,fr=1.0,fa=HP-UX_B.11.31_IA/PA
             PHCO_43004.CORE2-SHLIBS,l=/,r=1.0,a=HP-UX_B.11.31_IA/PA,v=HP,fr=1.0,fa=HP-UX_B.11.31_IA
             PHCO_43004.UX-CORE,l=/,r=1.0,a=HP-UX_B.11.31_IA/PA,v=HP,fr=1.0,fa=HP-UX_B.11.31_IA/PA
             PHCO_43004.UX2-CORE,l=/,r=1.0,a=HP-UX_B.11.31_IA/PA,v=HP,fr=1.0,fa=HP-UX_B.11.31_IA
       * Selection succeeded.


       * Beginning Analysis
       * Session selections have been saved in the file
         "/.sw/sessions/swremove.last".
       * The analysis phase succeeded for "srv:/".
       * Analysis succeeded.


       * Beginning Execution
       * The execution phase succeeded for "srv:/".
       * Execution succeeded.


NOTE:    More information may be found in the agent logfile using the
         command "swjob -a log srv-0021 @ srv:/".

=======  07/05/13 09:12:42 CDT  END swremove SESSION (non-interactive)
         (jobid=srv-0021)

[root@srv:/]$ swlist -l patch -x show_superseded_patches=true -a patch_state PHCO_43004 PHCO_42144
# Initializing...
# Contacting target "srv"...
ERROR:   Software "PHCO_43004" was not found on host "srv:/".
ERROR:   Software "PHCO_42144" was not found on host "srv:/".

Install and customize bash on HP-UX

You need to install the following packages (get them on the HP-UX porting and archiving centre):

swinstall -s /depot/termcap-1.3.1-ia64-11.31.depot \*
swinstall -s /depot/libiconv-1.14-ia64-11.31.depot \*
swinstall -s /depot/gettext-0.18.1.1-ia64-11.31.depot \*
swinstall -s /depot/bash-4.2.039-ia64-11.31.depot.tar \*

Output of the bash version:

# /usr/local/bin/bash --version
GNU bash, version 4.2.39(1)-release (ia64-hp-hpux11.31)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

We need to add '/usr/local/bin' in the PATH:

# vi /etc/PATH
"/etc/PATH" [Read only] 1 line, 679 characters
/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/usr/local/bin:...

Also in the MANPATH:

# vi /etc/MANPATH
/usr/share/man/%L:/usr/share/man:/usr/contrib/man/%L:/usr/contrib/man:/usr/local/man/%L:/usr/local/man:/usr/local/share/man/%L:...

I also edit my profile and the default one for the backspace key:

/etc/skel/.profile
<       stty erase "^H" kill "^U" intr "^C" eof "^D"
>       stty erase "^?" kill "^U" intr "^C" eof "^D"

At the end of the root user profile, I also added a switch to bash. Useful when you open an interactive session as root (so you let sh as default shell, recommended (mandatory?) for single user!).

># Set another shell
>       SHELL=/usr/local/bin/bash
>       export SHELL
>       case $- in *i*) exec $SHELL;; esac

Here is the complete NEW default profile file:

# @(#)B.11.31_LR

# Default user .profile file (/usr/bin/sh initialization).

# Set up the terminal:
        if [ "$TERM" = "" ]
        then
                eval ` tset -s -Q -m ':?hp' `
        else
                eval ` tset -s -Q `
        fi
        stty erase "^?" kill "^U" intr "^C" eof "^D"
        stty hupcl ixon ixoff
        tabs

# NOTE: '.' is added to $PATH for compatibility reasons only. This
#       default will be changed in a future release. If "." is not
#       needed for compatibility it is better to omit this line.
#       Please edit .profile according to your site requirements.

# Set up the search paths:
        PATH=$PATH:.

# Set up the shell environment:
        set -u
        trap "echo 'logout'" 0

# Set up the shell variables:
        EDITOR=vi
        export EDITOR

# Set another shell
        SHELL=/usr/local/bin/bash
        export SHELL
        case $- in *i*) [[ -x $SHELL ]] && exec $SHELL;; esac

Here is the used user '.bashrc' file:

# ~/.bashrc: by RUDIGER Romain

# If this is not an interactive shell, we don't customize anything
[ -z "$PS1" ] && return

# Keep only one occurence for the same command in the bash history
export HISTCONTROL=ignoredups

# Keep more bash history than the default 500 lines
export HISTFILESIZE=2000

# Check the window size after each command to resize the term (LINES and COLUMNS)
shopt -s checkwinsize

# Set a nice prompt
case "$TERM" in
xterm*)
        PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
        ;;
*)
        PS1='\u@\h:\w\$ '
        ;;
esac

# Change the xterm title
case "$TERM" in
xterm*|rxvt*)
        PROMPT_COMMAND='echo -ne "\033]0;${LOGNAME}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
        ;;
*)
        ;;
esac

# Aliases
alias ll='ls -la'

The prompt is like that:

root@zouper-server:/home/oracle#

The window title is like:

root@zouper-server:~home/oracle

Manage HP Performance

Check the HPOV package (result from HPUX11i-HA-OE B.11.31.1303):

swlist -R | grep HPOv
# TC097CA.HPOvEa                                                        11.11.000      HP OpenView Event/Action Stack
  TC097CA.HPOvEa.HPOVAGTLC                                              11.11.025      HP Operations agent L10N Package
  TC097CA.HPOvEa.HPOVEAAGT                                              11.11.025      HP Software E/A Agent
  TC097CA.HPOvEa.HPOVOPSAGT                                             11.11.025      HP OpenView E/A Agent
  TC097CA.HPOvEa.HPOVOPSAGTLIC                                          11.11.025      HP OpenView E/A Agent
# TC097CA.HPOvAcc                                                       2.11.000       HP Software Accessories
  TC097CA.HPOvAcc.HPOVPERLA                                             5.08.096       HP Software Perl
# TC097CA.HPOvPerf                                                      11.11.000      HP Performance
  TC097CA.HPOvPerf.HPOVGLANC                                            11.11.025      HP Software Performance Glance
  TC097CA.HPOvPerf.HPOVPACC                                             11.11.025      HP Software Performance Access
  TC097CA.HPOvPerf.HPOVPERFAGT                                          11.11.025      HP Software Performance Agent
  TC097CA.HPOvPerf.HPOVPERFMI                                           11.11.025      HP Software Measurement Interface
# TC097CA.HPOvLcore                                                     11.11.000      HP Software Core Functionality
  TC097CA.HPOvLcore.HPOVBBC                                             11.11.025      HP Software HTTP Communication
  TC097CA.HPOvLcore.HPOVCONF                                            11.11.025      HP Software Configuration
  TC097CA.HPOvLcore.HPOVCTRL                                            11.11.025      HP Software Process Control
  TC097CA.HPOvLcore.HPOVDEPL                                            11.11.025      HP Software Deployment
  TC097CA.HPOvLcore.HPOVSECCC                                           11.11.025      HP Software Certificate Management Client
  TC097CA.HPOvLcore.HPOVSECCO                                           11.11.025      HP Software Security Core
  TC097CA.HPOvLcore.HPOVXPL                                             11.11.025      HP Software Cross Platform Component

Check the status of the performance agents with perstat:

perfstat
**********************************************************
*** perfstat for host on Fri Oct 11 13:04:03 UTC 2013
*** HP-UX host B.11.31 U ia64 1267849086 unlimited-user license
**********************************************************

list of performance tool processes:
----------------------------------

 Perf Agent status:
    Running scopeux               (Perf Agent data collector) pid 4736
    Running midaemon              (Measurement Interface daemon) pid 4744
    Running ttd                   (ARM registration daemon) pid 4725

 Perf Agent Server status:

    Running ovcd                  (OV control component) pid 5142
    Running ovbbccb               (BBC5 communication broker) pid 5143
    Running coda                  (perf component) pid(s) 5150
       Configured DataSources(1)
                  SCOPE

    Running perfalarm             (alarm generator) pid(s) 4745
    Running perfd                 (perfd daemon (real time server)) pid 4811
OV Operation Agent status:
coda        OV Performance Core                 COREXT       (5150)   Running
ovbbccb     OV Communication Broker             CORE         (5143)   Running
ovcd        OV Control                          CORE         (5142)   Running
ovconfd     OV Config and Deploy                COREXT       (5144)   Running

Directly with mwa:

/opt/perf/bin/mwa status
 Perf Agent status:
    Running scopeux               (Perf Agent data collector) pid 4736
    Running midaemon              (Measurement Interface daemon) pid 4744
    Running ttd                   (ARM registration daemon) pid 4725

 Perf Agent Server status:

    Running ovcd                  (OV control component) pid 5142
    Running ovbbccb               (BBC5 communication broker) pid 5143
    Running coda                  (perf component) pid(s) 5150
       Configured DataSources(1)
                  SCOPE

    Running perfalarm             (alarm generator) pid(s) 4745

Stop/Start the agents with ovpa

/sbin/init.d/ovpa

Stop/Start the agents with mwa

/opt/perf/bin/mwa

Get the actual performance data retention:

utility -xs

Process Summary Report:  10/08/13 23:17    to 10/11/13 13:07
There were 61.8 hours of process data
Process records were logged for the following reasons:

Log Reason      Records   Percent  Recs/hr
--------------- -------   -------  -------
New Processes     14069     14.5%    227.5
Killed Processes  13912     14.3%    224.9
CPU Threshold     96979    100.0%   1568.0
Disk Threshold       53      0.1%      0.9
ProcMem Thresh.     233      0.2%      3.8

NOTE: A process may be logged for more than one reason at a time.
Record counts and percentages will not add up to 100% of the process records.


The total time covered was      :  50/15:23:35 out of 51/01:26:12
Time lost when collector was off:     10:02:37   0.82%
The scope collector was started :           11 times

            ------Total------  --Each Full Day-- -------Dates-------   Full
Type        Records MegaBytes  Records MegaBytes  Start       Finish   Days
Global        14598      7.77    288.1     0.153 08/21/13 to 10/11/13   50.7
Application   32680      4.31    645.2     0.085 08/21/13 to 10/11/13   50.7
Process       97000     28.91  37639.6    11.217 10/08/13 to 10/11/13    2.6
Disk          57749      4.85   6610.4     0.555 10/02/13 to 10/11/13    8.7
NETIF         93129      7.82  10656.0     0.895 10/02/13 to 10/11/13    8.7
CPU           30204      3.50   3456.0     0.401 10/02/13 to 10/11/13    8.7
Filesystem    32710      4.19   3742.7     0.479 10/02/13 to 10/11/13    8.7
Tran          15332      8.59    576.2     0.323 09/14/13 to 10/11/13   26.6
Overhead                 1.63
            ------- ---------  ------- ---------
TOTAL        373402     71.57  63614.3    14.108

The Global      file is now  26.2% full with room for 144.5 more full days
The Application file is now  22.5% full with room for 181.9 more full days
The Process     file is now  97.7% full with room for   0.1 more full days
The Device      file is now 106.1% full with room for   0.0 more full days
The Transaction file is now  86.6% full with room for   4.2 more full days
****************************************************************

Change the file size:

utility -xr glob|appl|proc|dev|tran  [size =<nnn>|days =<nnn>]
                                     [empty=<nnn>|space=<nnn>]
                                     [yes|no|maybe]

Edit the parameter file:

vi /var/opt/perf/parm
# change logged stuff:
log global application process device=disk,cpu,filesystem transaction
# change data file size
size global=30, application=20, process=30, device=20, transaction=10
# change the threshold:
procthreshold cpu = 10, memory = 900, disk = 5, nonew, nokilled

Reread the configuration by restarting the agent:

#check the agent
/opt/perf/bin/mwa status
#restart
/opt/perf/bin/mwa restart
#check the agent
/opt/perf/bin/mwa status

Extract data to make a later investigation or to provide to HP-UX Support:

/opt/perf/bin/extract -xt -gpdznuy -b "06/03/2013 07:00:00" -e "06/03/2013 12:00:00" -f $(hostname)-extract-$(date +%m%d-%H%M)
	-gapkdzcntuyGADZNTUY
	   Selects types of data to extract/export
		g = global detail
		a = application detail
		p = process detail
		k = process                (killed records only)
		d = disk device detail
		z = logical volume detail
		c = configuration detail
		n = netif detail
		t = transaction detail     (Not in Tru64 UNIX)
		u = CPU detail
		y = filesystem detail
		i = logical system detail
		G = global summary         (Export only)
		A = application summary    (Export only)
		D = disk device summary    (Export only)
		Z = logical volume summary (Export only)
		N = netif summary          (Export only)
		I = logical system summary
		T = transaction summary    (Export only)

Report the global activity (CPU, DISK, MEM, SWAP, NET):

cat > global_cpu-disk-mem-net.rept << EOF
REPORT "OVPA Export !DATE !TIME Logfile: !LOGFILE !COLLECTOR !SYSTEM_ID"
FORMAT ASCII
HEADINGS ON
SEPARATOR="|"
SUMMARY=60
MISSING=0
DATA TYPE GLOBAL
DATE
TIME
GBL_ACTIVE_CPU
GBL_CPU_TOTAL_UTIL
GBL_DISK_PHYS_IO_RATE
GBL_DISK_PHYS_IO
GBL_MEM_FREE
GBL_MEM_UTIL
GBL_MEM_USER_UTIL
GBL_SWAP_SPACE_UTIL
GBL_MEM_PAGEOUT_BYTE
GBL_MEM_PAGEOUT_BYTE_RATE
GBL_NET_IN_PACKET
GBL_NET_IN_PACKET_RATE
GBL_NET_OUT_PACKET
GBL_NET_OUT_PACKET_RATE
EOF

/opt/perf/bin/extract -g -xp -r global_cpu-disk-mem-net.rept -f $(hostname)-global_cpu-disk-mem-net-$(date +%m%d-%H%M) -b "TODAY-1" -e "TODAY-1"

head $(hostname)-global_cpu-disk-mem-net-$(date +%m%d-%H)*
OVPA Export 10/11/13 13:47    Logfile: /var/opt/perf/datafiles/logglob SCOPE/UX 11.11.025(1) host
          |        |Active|      |   Phys   |   Phys    |  Free   |Memory| User |      |  Pg Out   |  Pg Out  |   Input   |  In Pkt   |  Output   |  Out Pkt  |
   Date   |  Time  | CPUs |CPU % |  IO Rt   |    IOs    |   Mem   |  %   |Mem % |Swap %|    KB     |  KB Rt   |    Pkt    |   Rate    |    Pkt    |   Rate    |
10/10/2013|00:00:00|    12|  2.83|      46.0|      13767|    48152| 50.92| 30.44| 26.00|          0|       0.0|     135403|      452.4|     103677|      346.4|
10/10/2013|00:05:00|    12|  2.74|      40.5|      12150|    48104| 50.97| 30.48| 27.00|          0|       0.0|     113370|      377.9|      86970|      289.9|
10/10/2013|00:10:00|    12|  2.68|      36.1|      10858|    48131| 50.94| 30.45| 26.00|          0|       0.0|     105520|      350.8|      79712|      265.0|
10/10/2013|00:15:00|    12|  2.73|      36.5|      10950|    48166| 50.91| 30.42| 26.00|          0|       0.0|     147510|      491.7|     127380|      424.6|
10/10/2013|00:20:00|    12|  2.68|      36.4|      10920|    48165| 50.91| 30.42| 26.00|          0|       0.0|     107130|      357.1|      81300|      271.0|
10/10/2013|00:25:00|    12|  2.71|      36.1|      10830|    48162| 50.91| 30.42| 26.00|          0|       0.0|     110760|      369.2|      84840|      282.8|
10/10/2013|00:30:00|    12|  3.39|      38.4|      11520|    48163| 50.91| 30.41| 26.00|          0|       0.0|     105420|      351.4|      80490|      268.3|

Report all process that reach a threshold (very verbose but useful to find what process was using the resources):

cat > global_proc.rept << EOF
REPORT "OVPA Export !DATE !TIME Logfile: !LOGFILE !COLLECTOR !SYSTEM_ID"
FORMAT ASCII
HEADINGS ON
SEPARATOR="|"
SUMMARY=60
MISSING=0
DATA TYPE PROCESS
DATE
TIME
PROC_PROC_ID
PROC_PROC_NAME
PROC_PARENT_PROC_ID
PROC_INTEREST
PROC_STOP_REASON
PROC_CPU_TOTAL_UTIL
PROC_MEM_RES
PROC_MEM_VIRT
PROC_PAGEFAULT
PROC_MEM_WAIT_PCT
PROC_MEM_WAIT_TIME
EOF

/opt/perf/bin/extract -xp -p -r global_proc.rept -f $(hostname)-process-$(date +%m%d-%H%M) -b "TODAY-1" -e "TODAY-1"

Writing PROCESS data to file host-process-1011-1351

head $(hostname)-process-$(date +%m%d-%H)*
OVPA Export 10/11/13 13:51    Logfile: /var/opt/perf/datafiles/logglob SCOPE/UX 11.11.025(1) host
          |        |          |    Process     |          |  Interest  |   Stop   |       |   Res    | Virtual  |  Page  |Memory |    Mem    |
   Date   |  Time  |   PID    |      Name      |   PPID   |   Reason   |  Reason  | CPU % |   Mem    |  Memory  | Faults |Wait % |   Wait    |
10/10/2013|00:00:00|        87|fcachedaemon    |         0|  C         |     SLEEP|   0.21|       128|       144|       0|   0.00|      0.000|
10/10/2013|00:00:00|        99|pm_schedcpu     |         0|  C         |     SLEEP|   0.13|       832|       936|       0|   0.00|      0.000|
10/10/2013|00:00:00|      4265|sendmail        |         1|  C         |     SLEEP|   0.40|      4168|      6132|       0|   0.00|      0.000|
10/10/2013|00:00:00|      4811|perfd           |         1|  C         |     SLEEP|   0.24|     24788|     31396|       0|   0.00|      0.000|
10/10/2013|00:00:00|       127|ora_lgwr_DB     |         1|  C         |     SLEEP|   0.11|     84860|    468520|       0|   0.11|      0.065|
10/10/2013|00:00:00|      5106|ohasd.bin       |         1|  C         |     SLEEP|   0.75|    111436|    152132|       0|   0.00|      0.000|
10/10/2013|00:00:00|      5206|utild           |         1|  C         |     SLEEP|   0.79|      3700|      4036|       0|   0.00|      0.000|

Check the wiki-ux page for more and nice examples: [1].

Management Processor (MP)

Go in the Command Menu:

[serv] MP> CM


                Enter HE to get a list of available commands

                      (Use ^B to return to main menu.)




[serv] MP:CM>

Power management

Display the power state:

[serv] MP:CM> PS

Display detailed status of the selected MP bus device.


The following MP bus devices were found:
+---+----+----+-----+-----+-------+-----+
|   |    |    |     |     |       |     |
|   |    |LAN\| Sys |     |  IO   |     |
|Cab| MP |SCSI|Bkpln|Cells|Chassis| BPS |
| # |M  S|0  1|     | 0 1 | 0   1 | 0 1 |
+---+----+----+-----+-----+-------+-----+
| 0 |*   |   *|  *  | * * | *   * | * * |
+---+----+----+-----+-----+-------+-----+

You may display detailed power and hardware status for the following items:

    T - Cabinet
    S - System Backplane
    G - MP (Core I/O)
    P - IO Chassis
    C - Cell
        Select Device: T

HW status for rp7440 cabinet : NO FAILURE DETECTED

Master/Slave failover is Enabled
Power switch is on
Right Door is closed
Top Door is closed
Left Door is closed

Total Power Available 7200 VA
Total Power Needed 2269 VA
Power Redundancy : redundant
Power Viability : viable


 Power Status
---------------+-----+-----+-------+-----+
               |     |     |       |     |
               | Sys |     |  IO   |     |
               |Bkpln|Cells|Chassis| BPS |
               |     | 0 1 | 0   1 | 0 1 |
---------------+-----+-----+-------+-----+
 Populated     |  *  | * * | *   * | * * |
 Enabled       |  *  | * * | *   * | * * |
 Power OK      |  *  | * * | *   * | * * |
 Warning/Fault |     |     |       |     |
 Attention LED |     |     |       |     |


 AC Line status:
  Line A0 Present
  Line A1 Present
  Line B0 Present
  Line B1 Present

               -- Press <CR> to continue, or 'Q' to Quit --

Front Fan Speed   : normal
Rear Fan speed    : normal
I/O Bay Fan Speed : normal
Temperature state : normal
Main Fan Redundancy   : redundant
I/O Fan Redundancy    : redundant
Overtemp Shutdown Enabled


            | BPS |     PCI     |
            | Fans|     Fans    |
            | 0 1 | 0 1 2 3 4 5 |
+-----------+-----+-------------+
  Populated | * * | * * * * * * |
  Failing   |     |             |
  Failed    |     |             |

            | Standby/Main Fans |
            |                   |
            | 0 1 2 3           |
+-----------+-------------------+
  Populated | * * * *           |
  Failing   |                   |
  Failed    |                   |

            |  Cell Fans |
            |   CPU    C |
            | 0 1 2 3  C |
+-----------+------------+
 Cell 0     |            |
  Populated | * * * *  * |
  Failing   |            |
  Failed    |            |
 Cell 1     |            |
  Populated | * * * *  * |
  Failing   |            |
  Failed    |            |

[serv] MP:CM>

Go in the power management:

[serv] MP:CM> PE

This command controls power enable to a hardware device.

    T - Cabinet
    C - Cell
    P - IO Chassis
    R - Partition
        Select Device: T

    The power state is ON for Cabinet 0.
    In what state do you want the power? (ON/OFF) OFF

[serv] MP:CM> PS

Display detailed status of the selected MP bus device.


The following MP bus devices were found:
+---+----+----+-----+-----+-------+-----+
|   |    |    |     |     |       |     |
|   |    |LAN\| Sys |     |  IO   |     |
|Cab| MP |SCSI|Bkpln|Cells|Chassis| BPS |
| # |M  S|0  1|     | 0 1 | 0   1 | 0 1 |
+---+----+----+-----+-----+-------+-----+
| 0 |*   |   *|  *  | * * | *   * | * * |
+---+----+----+-----+-----+-------+-----+

You may display detailed power and hardware status for the following items:

    T - Cabinet
    S - System Backplane
    G - MP (Core I/O)
    P - IO Chassis
    C - Cell
        Select Device: T

HW status for rp7440 cabinet : NO FAILURE DETECTED

Master/Slave failover is Enabled
Power switch is OFF
Right Door is closed
Top Door is closed
Left Door is closed

Total Power Available 7200 VA
Total Power Needed 2269 VA
Power Redundancy : redundant
Power Viability : viable


 Power Status
---------------+-----+-----+-------+-----+
               |     |     |       |     |
               | Sys |     |  IO   |     |
               |Bkpln|Cells|Chassis| BPS |
               |     | 0 1 | 0   1 | 0 1 |
---------------+-----+-----+-------+-----+
 Populated     |  *  | * * | *   * | * * |
 Enabled       |     |     |       |     |
 Power OK      |     |     |       |     |
 Warning/Fault |     |     |       |     |
 Attention LED |     |     |       |     |


 AC Line status:
  Line A0 Present
  Line A1 Present
  Line B0 Present
  Line B1 Present

               -- Press <CR> to continue, or 'Q' to Quit --

Front Fan Speed   : low
Rear Fan speed    : off
I/O Bay Fan Speed : off
Temperature state : normal
Main Fan Redundancy   : redundant
I/O Fan Redundancy    : redundant
Overtemp Shutdown Enabled


            | BPS |     PCI     |
            | Fans|     Fans    |
            | 0 1 | 0 1 2 3 4 5 |
+-----------+-----+-------------+
  Populated | * * | * * * * * * |
  Failing   |     |             |
  Failed    |     |             |

            | Standby/Main Fans |
            |                   |
            | 0 1 2 3           |
+-----------+-------------------+
  Populated | * * * *           |
  Failing   |                   |
  Failed    |                   |

            |  Cell Fans |
            |   CPU    C |
            | 0 1 2 3  C |
+-----------+------------+
 Cell 0     |            |
  Populated | * * * *  * |
  Failing   |            |
  Failed    |            |
 Cell 1     |            |
  Populated | * * * *  * |
  Failing   |            |
  Failed    |            |


[serv] MP:CM> PE

This command controls power enable to a hardware device.

    T - Cabinet
    C - Cell
    P - IO Chassis
    R - Partition
        Select Device: T

    The power state is ON for Cabinet 0.
    In what state do you want the power? (ON/OFF) ON
[serv] MP:CM>

[serv] MP:CM> PE

This command controls power enable to a hardware device.

    T - Cabinet
    C - Cell
    P - IO Chassis
    R - Partition
        Select Device: T

    The power state is OFF for Cabinet 0.
    In what state do you want the power? (ON/OFF) ON

Check again the power state:

[serv] MP:CM> PS

Display detailed status of the selected MP bus device.


The following MP bus devices were found:
+---+----+----+-----+-----+-------+-----+
|   |    |    |     |     |       |     |
|   |    |LAN\| Sys |     |  IO   |     |
|Cab| MP |SCSI|Bkpln|Cells|Chassis| BPS |
| # |M  S|0  1|     | 0 1 | 0   1 | 0 1 |
+---+----+----+-----+-----+-------+-----+
| 0 |*   |   *|  *  | * * | *   * | * * |
+---+----+----+-----+-----+-------+-----+

You may display detailed power and hardware status for the following items:

    T - Cabinet
    S - System Backplane
    G - MP (Core I/O)
    P - IO Chassis
    C - Cell
        Select Device: T

HW status for rp7440 cabinet : NO FAILURE DETECTED

Master/Slave failover is Enabled
Power switch is on
Right Door is closed
Top Door is closed
Left Door is closed

Total Power Available 7200 VA
Total Power Needed 2269 VA
Power Redundancy : redundant
Power Viability : viable


 Power Status
---------------+-----+-----+-------+-----+
               |     |     |       |     |
               | Sys |     |  IO   |     |
               |Bkpln|Cells|Chassis| BPS |
               |     | 0 1 | 0   1 | 0 1 |
---------------+-----+-----+-------+-----+
 Populated     |  *  | * * | *   * | * * |
 Enabled       |  *  | * * | *   * | * * |
 Power OK      |  *  | * * | *   * | * * |
 Warning/Fault |     |     |       |     |
 Attention LED |     |     |       |     |


 AC Line status:
  Line A0 Present
  Line A1 Present
  Line B0 Present
  Line B1 Present

               -- Press <CR> to continue, or 'Q' to Quit --

Front Fan Speed   : normal
Rear Fan speed    : normal
I/O Bay Fan Speed : normal
Temperature state : normal
Main Fan Redundancy   : redundant
I/O Fan Redundancy    : redundant
Overtemp Shutdown Enabled


            | BPS |     PCI     |
            | Fans|     Fans    |
            | 0 1 | 0 1 2 3 4 5 |
+-----------+-----+-------------+
  Populated | * * | * * * * * * |
  Failing   |     |             |
  Failed    |     |             |

            | Standby/Main Fans |
            |                   |
            | 0 1 2 3           |
+-----------+-------------------+
  Populated | * * * *           |
  Failing   |                   |
  Failed    |                   |

            |  Cell Fans |
            |   CPU    C |
            | 0 1 2 3  C |
+-----------+------------+
 Cell 0     |            |
  Populated | * * * *  * |
  Failing   |            |
  Failed    |            |
 Cell 1     |            |
  Populated | * * * *  * |
  Failing   |            |
  Failed    |            |

Go in the VFP

[serv] MP:CM> MA
[serv] MP:CM>

    MP MAIN MENU:

         CO: Consoles
        VFP: Virtual Front Panel
         CM: Command Menu
         CL: Console Logs
         SL: Show Event Logs
         FW: Firmware Update
         HE: Help
          X: Exit Connection

[serv] MP>
[serv] MP> VFP

        Welcome to the Virtual Front Panel (VFP).
        Use ^B to exit.


    Partitions available:

     #   Name
    ---  ----
     0)  Partition 0
     S)  System (all partitions)

Please select partition number: 0
  #  Partition state               Activity
  -  ---------------               --------
  0  OS heartbeat:                                                    277 Logs

  #  Cell state                    Activity
  -  ----------                    --------
  0  Cell has joined partition                                       2149 Logs
  1  Cell has joined partition                                       2159 Logs

E indicates error since last boot
[serv] MP:VFP (Use '?' to display help or ^B to Quit) >

Go on the console

[serv] MP> CO

    Partitions available:

     #   Name
    ---  ----
     0)  Partition 0
     Q)  Quit

    Please select partition number: 0


         Connecting to OS Console: Partition 0

        (Use <Ctrl-b> to return to main menu.)


- - - - - - - - - - Prior Console Output - - - - - - - - - -


Closing open logical volumes...
Done


Cells have been reset (Boot Is Blocked (BIB) is not set).



- - - - - - - - - - - - Live Console - - - - - - - - - - - -
043.007.000

Duplex Console IO Dependent Code (IODC) revision 1
   --------------------------------------------------------------------------
     (c) Copyright 1995-2006, Hewlett-Packard Company, All rights reserved
   --------------------------------------------------------------------------


          Cab/      Cell      ------- Processor --------    Cache Size
    Cell  Slot      State      #    Speed       State      Inst    Data
    ----  ----  ------------  ---  --------  -----------  ------  ------
      0   0/0   Idle           0A  1068 MHz  Idle         64 MB   64 MB
                               0B  1068 MHz  Idle         64 MB   64 MB
                               1A  1068 MHz  Idle         64 MB   64 MB
                               1B  1068 MHz  Idle         64 MB   64 MB
                               2A  1068 MHz  Idle         64 MB   64 MB
                               2B  1068 MHz  Idle         64 MB   64 MB
                               3A  1068 MHz  Idle         64 MB   64 MB
                               3B  1068 MHz  Idle         64 MB   64 MB
      1   0/1   Active         0A  1068 MHz  Active       64 MB   64 MB
                               0B  1068 MHz  Idle         64 MB   64 MB
                               1A  1068 MHz  Idle         64 MB   64 MB
                               1B  1068 MHz  Idle         64 MB   64 MB
                               2A  1068 MHz  Idle         64 MB   64 MB
                               2B  1068 MHz  Idle         64 MB   64 MB
                               3A  1068 MHz  Idle         64 MB   64 MB
                               3B  1068 MHz  Idle         64 MB   64 MB


     Primary Boot Path:  1/0/0/3/0.6
          Boot Actions:  Boot from this path.
                         If unsuccessful, go to BCH.

HA Alternate Boot Path:  1/0/1/1/0/4/1.6
          Boot Actions:  Go to BCH.

   Alternate Boot Path:  1/0/1/1/0/4/1.6
          Boot Actions:  Go to BCH.

          Console Path:  1/8/1.0


Attempting to boot using the primary path.
-------------------------------------------------------------


 To discontinue, press any key within 10 seconds.

 10 seconds expired.
 Proceeding...


Initializing boot Device.


Boot IO Dependent Code (IODC) Revision 2


Boot Path Initialized.


HARD Booted.

ISL Revision A.00.44  Mar 12, 2003

ISL booting  hpux

Boot
: disk(1/0/0/3/0.6.0.0.0.0.0;0)/stand/vmunix
14340096 + 3534848 + 4915080 start 0x14d7e8
DoCalllist done
...

Change MP password

   MP MAIN MENU:

         CO: Consoles
        VFP: Virtual Front Panel (partition status)
         CM: Command Menu
         CL: Console Logs
         SL: Show chassis Logs
         HE: Help
          X: Exit Connection

MP> CM


                Enter HE to get a list of available commands



MP:CM> HE


Management Processor Firmware revision  4.9, Feb 28 2003 at 08:40:26


Detailed help on commands is available from the main menu (MP> he)

The following are the Service commands that are available

BO      : Boot a partition.
DATE    : Set the time and date
DF      : Display FRU information of an Entity.
FW      : Firmware Update Utility
MA      : Return to the Main menu.
MR      : Modem Reset
OSP     : Onboard Scan Programming Utility
PE      : Power entities on or off.
PWRGRD  : Allows user to configure the power grid
RE      : Reset entity.
RR      : Reset a partition for reconfiguration.
RS      : Reset a partition.
SYSREV  : Returns all System Revisions
TC      : Send a TOC signal to a partition.

Press q to quit or <CR> to continue...


Management Processor Firmware revision  4.9, Feb 28 2003 at 08:40:26


Detailed help on commands is available from the main menu (MP> he)

The following are the Service commands that are available

TE      : Broadcast a message to all users of the MP Command Handler.
WHO     : Display a list of MP connected users













Press q to quit or <CR> to continue...


Management Processor Firmware revision  4.9, Feb 28 2003 at 08:40:26


Detailed help on commands is available from the main menu (MP> he)

The following are the Status commands that are available

CP      : Display partition cell assignments
DE      : Display entity status
DU      : Display devices on bus
HE      : Display the list of available commands
LS      : Display LAN connected console status
MS      : Display the status of the Modem
PS      : Display detailed power and hardware configuration status.








Press q to quit or <CR> to continue...


Management Processor Firmware revision  4.9, Feb 28 2003 at 08:40:26


Detailed help on commands is available from the main menu (MP> he)

The following are the System and Access Config commands that are available

CA      : Configure Asynchronous and Modem parameters
CC      : Initiate a Complex Configuration
CG      : Generate ssl key pair and self signed certificate
CP      : Display partition cell assignments
DC      : Reset parameters to default configuration
DI      : Disconnect Remote or LAN Console
DL      : Disable Lan console access
DS      : Disable SSL (Secure Sockets Layer)
DW      : Disable Web console access
EL      : Enable Lan console access
ER      : Configure remote/modem port access options
ES      : Enable SSL (Secure Sockets Layer)
EW      : Enable Web console access
ID      : Change certain stable complex configuration profile fields

Press q to quit or <CR> to continue...


Management Processor Firmware revision  4.9, Feb 28 2003 at 08:40:26


Detailed help on commands is available from the main menu (MP> he)

The following are the System and Access Config commands that are available

IF      : Displays network interface information
IT      : Modify command interface inactivity timeout
LC      : Configure LAN connections
LS      : Display LAN connected console status
ND      : Enable/Disable Network Diagnostics
PD      : Modify default Partition for this login session.
RL      : Rekey Complex Profile Lock
RU      : Reset MP bus device
SO      : Configure Security Options and Access Control
XD      : MP Diagnostics and Reboot




MP:CM>

Choisir "SO" pour Configure Security Options and Access Control puis répondre aux questions :

MP:CM> SO

    1. MP wide parameters
    2. User parameters
       Which do you wish to modify? ([1]/2) 2

Current users:

     LOGIN            USER NAME                 ACCESS        PART.  STATUS

  1   Admin            Administrator             Admin
  2   Oper             Operator                  Operator

1 to 2 to edit, A to add, D to delete, Q to quit : 1

    Current User parameters are:
    Login             : Admin
    Name              : Administrator
    Organization      :
    Access Level      : Administrator
    Mode              : Multiple Use
    State             : Enabled
    Default Partition :
    Dialback          : (disabled)

    Enter Login [Admin] :

    Enter Name [Administrator] :

    Enter Organization [] :

    Valid Access Levels:  Administrator, Operator, Single Partition User
    Enter Access Level ([A]/O/S) :

    Valid Modes:  Single Use, Multiple Use
    Enter Mode (S/[M]) :

    Valid States:  Disabled, Enabled
    Enter State (D/[E]) :

    Enable Dialback ? (Y/[N])

    Enter Password [unchanged] : <Changer en mettant le nouveau mot de passe>
    Re-Enter Password :<Changer en mettant le nouveau mot de passe>
    New User parameters are:
    Login             :
    Name              : Administrator
    Organization      :
    Access Level      : Administrator
    Mode              : Multiple Use
    State             : Enabled
    Default Partition :
    Dialback          : (disabled)

    Changes do not take affect until the command has finished.
    Save changes to user number 1? (Y/[N]) Y

Current users:

     LOGIN            USER NAME                 ACCESS        PART.  STATUS

  1          Administrator             Admin
  2   Oper             Operator                  Operator

1 to 2 to edit, A to add, D to delete, Q to quit : Q

    Saving user parameter changes.

MP:CM>

Setup IP

MP MAIN MENU:
 
         CO: Consoles
        VFP: Virtual Front Panel (partition status)
         CM: Command Menu
         CL: Console Logs
         SL: Show chassis Logs
         HE: Help
          X: Exit Connection
 
MP> CM
 
 
                Enter HE to get a list of available commands
 
 
 
MP:CM> HE
 
 
Management Processor Firmware revision  4.9, Feb 28 2003 at 08:40:26
 
 
Detailed help on commands is available from the main menu (MP> he)
 
The following are the Service commands that are available
 
BO      : Boot a partition.
DATE    : Set the time and date
DF      : Display FRU information of an Entity.
FW      : Firmware Update Utility
MA      : Return to the Main menu.
MR      : Modem Reset
OSP     : Onboard Scan Programming Utility
PE      : Power entities on or off.
PWRGRD  : Allows user to configure the power grid
RE      : Reset entity.
RR      : Reset a partition for reconfiguration.
RS      : Reset a partition.
SYSREV  : Returns all System Revisions
TC      : Send a TOC signal to a partition.
 
Press q to quit or <CR> to continue...
 
 
Management Processor Firmware revision  4.9, Feb 28 2003 at 08:40:26
 
 
Detailed help on commands is available from the main menu (MP> he)
 
The following are the Service commands that are available
 
TE      : Broadcast a message to all users of the MP Command Handler.
WHO     : Display a list of MP connected users
 
 
 
 
 
 
 
 
 
 
 
 
 
Press q to quit or <CR> to continue...
 
 
Management Processor Firmware revision  4.9, Feb 28 2003 at 08:40:26
 
 
Detailed help on commands is available from the main menu (MP> he)
 
The following are the Status commands that are available
 
CP      : Display partition cell assignments
DE      : Display entity status
DU      : Display devices on bus
HE      : Display the list of available commands
LS      : Display LAN connected console status
MS      : Display the status of the Modem
PS      : Display detailed power and hardware configuration status.
 
 
 
 
 
 
 
 
Press q to quit or <CR> to continue...
 
 
Management Processor Firmware revision  4.9, Feb 28 2003 at 08:40:26
 
 
Detailed help on commands is available from the main menu (MP> he)
 
The following are the System and Access Config commands that are available
 
CA      : Configure Asynchronous and Modem parameters
CC      : Initiate a Complex Configuration
CG      : Generate ssl key pair and self signed certificate
CP      : Display partition cell assignments
DC      : Reset parameters to default configuration
DI      : Disconnect Remote or LAN Console
DL      : Disable Lan console access
DS      : Disable SSL (Secure Sockets Layer)
DW      : Disable Web console access
EL      : Enable Lan console access
ER      : Configure remote/modem port access options
ES      : Enable SSL (Secure Sockets Layer)
EW      : Enable Web console access
ID      : Change certain stable complex configuration profile fields
 
Press q to quit or <CR> to continue...
 
 
Management Processor Firmware revision  4.9, Feb 28 2003 at 08:40:26
 
 
Detailed help on commands is available from the main menu (MP> he)
 
The following are the System and Access Config commands that are available
 
IF      : Displays network interface information
IT      : Modify command interface inactivity timeout
LC      : Configure LAN connections
LS      : Display LAN connected console status
ND      : Enable/Disable Network Diagnostics
PD      : Modify default Partition for this login session.
RL      : Rekey Complex Profile Lock
RU      : Reset MP bus device
SO      : Configure Security Options and Access Control
XD      : MP Diagnostics and Reboot
 
 
MP:CM>
 
MP:CM> LC
 
This command modifies the LAN parameters.
 
Current configuration of MP LAN interface
  MAC address   : 00:30:6e:a7:8c:e3
  IP address    : 10.1.x.x
  Hostname      : serv
  Subnet mask   : 255.255.255.0   (0xffffff00)
  Gateway       : 10.1.x.x
  Status        : UP and RUNNING
  AutoNegotiate : Enabled
  Data Rate     : 100 Mb/s
  Duplex        : Half
  Error Count   : 97
  Last Error    : frame miss
 
 
    Do you want to modify the configuration for the customer LAN? (Y/[N])

Backup and Restore a HP-UX system by tape

Backup

Get the tape drive connected to the server:

serv# ioscan -fnC tape
Class     I  H/W Path     Driver S/W State   H/W Type     Description
=====================================================================
tape      0  0/1/1/1.3.0  stape CLAIMED     DEVICE       HP      Ultrium 2-SCSI
                         /dev/rmt/0m            /dev/rmt/0mn           /dev/rmt/c3t3d0BEST    /dev/rmt/c3t3d0BESTn   /dev/rmt/c3t3d0DDS     /dev/rmt/c3t3d0DDSn
                         /dev/rmt/0mb           /dev/rmt/0mnb          /dev/rmt/c3t3d0BESTb   /dev/rmt/c3t3d0BESTnb  /dev/rmt/c3t3d0DDSb    /dev/rmt/c3t3d0DDSnb

The type of device are:

  • /nb - Best density, no autorewind
  • /b - Best density, autorewind
  • /n - Best density, no autorewind
  • / - Best density, autorewind


To mount the tape in RW:

serv# mt rew


Try to write on this tape:

serv# echo "BlaBla" > /tmp/tmpfile
serv# ls -l /tmp/tmpfile
-rw-r--r--   1 root       sys              7 Feb  1 10:52 /tmp/tmpfile
serv# tar cvf /dev/rmt/0m /tmp/tmpfile
a /tmp/tmpfile 1 blocks
serv#  tar tvf /dev/rmt/0m
rw-r--r--   0/3      7 Feb  1 10:52 2011 /tmp/tmpfile


Start the system backup:

serv# /opt/ignite/bin/make_tape_recovery -A -v -x inc_entire=vg00
       * Creating local directories for configuration files and archive.

=======  02/01/11 10:57:55 MET  Started /opt/ignite/bin/make_tape_recovery.
         (Tue Feb 01 10:57:55 MET 2011)
         @(#) Ignite-UX Revision C.6.7.79
         @(#) net_recovery (opt) $Revision: 10.778 $

       * Testing for necessary pax patch.
       * Passed pax tests.
       * Recovery Archive Description = Recovery Archive

       * Recovery Archive Location    = /dev/rmt/0mn

       * Number of Archives to Save   = 2

       * Pax type  = tar


        In?     dsk/vg  name                    minor#  Associated disks/mountpoints
        2       v       /dev/vg00               0x00    /dev/dsk/c2t0d0 /dev/dsk/c2t1d0
                                                /dev/vg00/lvol1 /stand  2
                                                /dev/vg00/lvol2
                                                /dev/vg00/lvol3 /       2
                                                /dev/vg00/lvol4 /tmp    2
                                                /dev/vg00/lvol5 /home   2
                                                /dev/vg00/lvol6 /opt    2
                                                /dev/vg00/lvol7 /usr    2
                                                /dev/vg00/lvol8 /var    2
                                                /dev/vg00/lvol9
                                                /dev/vg00/lvol10        /home1  2

        ** 0 - The Volume Group or Filesystem is Not included in the
               System Recovery Archive
        ** 1 - The Volume Group or Filesystem is Partially included in the
               System Recovery Archive
        ** 2 - The Volume Group or Filesystem is Fully included in the
               System Recovery Archive

       * Checking Versions of Ignite-UX filesets

       * Creating System Configuration.
       * /opt/ignite/bin/save_config -f
         /var/opt/ignite/recovery/2011-02-01,10:57/system_cfg vg00
       * Backing Up Volume Group /dev/vg00
       * /usr/sbin/vgcfgbackup /dev/vg00
       * Creating Map Files for Volume Group /dev/vg00
       * /usr/sbin/vgexport -s -p -m /etc/lvmconf/vg00.mapfile /dev/vg00

       * Creating Control Configuration.
       * Creating Archive File List
WARNING: list_expander returned a warning; please check the recovery.log file
         for details.
       * Creating Archive Configuration

       * /opt/ignite/lbin/make_arch_config -c
         /var/opt/ignite/recovery/2011-02-01,10:57/archive_cfg -g
         /var/opt/ignite/recovery/2011-02-01,10:57/flist -n 2011-02-01,10:57 -r
         pa -b 64 -d Recovery\ Archive -t 1 -i 1 -m t
       * Saving the information about archive to
         /var/opt/ignite/recovery/previews
       * Creating The Tape Archive
       * Checking configuration file for Syntax
       * Writing boot LIF to tape
50424+0 records in
50424+0 records out
       * Complete writing boot LIF onto tape.
       * /opt/ignite/data/scripts/make_sys_image -c n -d /dev/rmt/0mn -t n -s
         local -n 2011-02-01,10:57 -m t -w
         /var/opt/ignite/recovery/2011-02-01,10:57/recovery.log -u -R -g
         /var/opt/ignite/recovery/2011-02-01,10:57/flist -a 10802270

       * Preparing to create a system archive.

       * Archiving contents of serv via tar image to local device/dev/rmt/0mn.
       * Creation of system archive complete.

       * Cleaning up old configuration file directories

=======  02/01/11 11:10:14 MET  make_tape_recovery completed with warnings


Unload the tape:

serv# mt offl

Check the content of the tape

# mt -f /dev/rmt/0m rew
# mt -t /dev/rmt/0mn fsf 1
# tar -tvf /dev/rmt/0m
  • rewing the tape
  • skip the firts file (boot image)
  • display the content of the tar for the second file (the tar image of vg00)

Restore a system from tape

Reboot the server

  • Login on the MP

Initiate a power cycle:

    MP MAIN MENU:

         CO: Consoles
        VFP: Virtual Front Panel
         CM: Command Menu
         CL: Console Logs
         SL: Show Event Logs
         FW: Firmware Update
         HE: Help
          X: Exit Connection

[rserv] MP> CM


                Enter HE to get a list of available commands

                      (Use ^B to return to main menu.)




[rserv] MP:CM> PE

This command controls power enable to a hardware device.

    T - Cabinet
    C - Cell
    P - IO Chassis
    R - Partition
        Select Device: T

    The power state is ON for Cabinet 0.
    In what state do you want the power? (ON/OFF) OFF

[rserv] MP:CM> PE

This command controls power enable to a hardware device.

    T - Cabinet
    C - Cell
    P - IO Chassis
    R - Partition
        Select Device: T

    The power state is OFF for Cabinet 0.
    In what state do you want the power? (ON/OFF) ON

Break the boot

Wait for "To discontinue, press any key within 10 seconds.":

[rserv] MP:CM> MA
[rserv] MP:CM>

    MP MAIN MENU:

         CO: Consoles
        VFP: Virtual Front Panel
         CM: Command Menu
         CL: Console Logs
         SL: Show Event Logs
         FW: Firmware Update
         HE: Help
          X: Exit Connection

[rserv] MP> CO

    Partitions available:

     #   Name
    ---  ----
     0)  Partition 0
     Q)  Quit

    Please select partition number: 0


         Connecting to OS Console: Partition 0

        (Use <Ctrl-b> to return to main menu.)


- - - - - - - - - - Prior Console Output - - - - - - - - - -


Closing open logical volumes...
Done

System has halted
OK to turn off power or reset system
UNLESS "WAIT for UPS to turn off power" message was printed above


- - - - - - - - - - - - Live Console - - - - - - - - - - - -
043.007.000

Duplex Console IO Dependent Code (IODC) revision 1
   --------------------------------------------------------------------------
     (c) Copyright 1995-2006, Hewlett-Packard Company, All rights reserved
   --------------------------------------------------------------------------


          Cab/      Cell      ------- Processor --------    Cache Size
    Cell  Slot      State      #    Speed       State      Inst    Data
    ----  ----  ------------  ---  --------  -----------  ------  ------
      0   0/0   Idle           0A  1068 MHz  Idle         64 MB   64 MB
                               0B  1068 MHz  Idle         64 MB   64 MB
                               1A  1068 MHz  Idle         64 MB   64 MB
                               1B  1068 MHz  Idle         64 MB   64 MB
                               2A  1068 MHz  Idle         64 MB   64 MB
                               2B  1068 MHz  Idle         64 MB   64 MB
                               3A  1068 MHz  Idle         64 MB   64 MB
                               3B  1068 MHz  Idle         64 MB   64 MB
      1   0/1   Active         0A  1068 MHz  Active       64 MB   64 MB
                               0B  1068 MHz  Idle         64 MB   64 MB
                               1A  1068 MHz  Idle         64 MB   64 MB
                               1B  1068 MHz  Idle         64 MB   64 MB
                               2A  1068 MHz  Idle         64 MB   64 MB
                               2B  1068 MHz  Idle         64 MB   64 MB
                               3A  1068 MHz  Idle         64 MB   64 MB
                               3B  1068 MHz  Idle         64 MB   64 MB


     Primary Boot Path:  1/0/0/3/0.6
          Boot Actions:  Boot from this path.
                         If unsuccessful, go to BCH.

HA Alternate Boot Path:  1/0/1/1/0/4/1.6
          Boot Actions:  Go to BCH.

   Alternate Boot Path:  1/0/1/1/0/4/1.6
          Boot Actions:  Go to BCH.

          Console Path:  1/8/1.0


Attempting to boot using the primary path.
-------------------------------------------------------------


 To discontinue, press any key within 10 seconds.


Boot terminated.


---- Main Menu ---------------------------------------------------------------

     Command                           Description
     -------                           -----------
     BOot [PRI|HAA|ALT|<path>]         Boot from specified path
     PAth [PRI|HAA|ALT] [<path>]       Display or modify a path
     SEArch [ALL|<cell>|<path>]        Search for boot devices
     ScRoll [ON|OFF]                   Display or change scrolling capability

     COnfiguration menu                Displays or sets boot values
     INformation menu                  Displays hardware information
     SERvice menu                      Displays service commands

     DIsplay                           Redisplay the current menu
     HElp [<menu>|<command>]           Display help for menu or command
     REBOOT                            Restart Partition
     RECONFIGRESET                     Reset to allow Reconfig Complex Profile
----

Scan all bootable devices with SEArch ALL:

Main Menu: Enter command or menu > SEA ALL

Searching for potential boot device(s)
This may take several minutes.

To discontinue search, press any key (termination may not be immediate).


                                                                           IODC
   Path#  Device Path (dec)                      Device Type               Rev
   -----  -----------------                      -----------               ----
          0/0/1/1/0.0                            Fibre Channel Protocol    14
          0/0/1/1/1.0                            Fibre Channel Protocol    14
   P0     1/0/0/3/0.6                            Random access media       2
   P1     1/0/0/3/1.2                            Random access media       2
   P2     1/0/1/1/0/4/0.3                        Sequential access media   2
   P3     1/0/1/1/0/4/1.6                        Random access media       2
          1/0/12/1/0.0                           Fibre Channel Protocol    14
          1/0/12/1/1.0                           Fibre Channel Protocol    14

Boot on the tape:

Main Menu: Enter command or menu > BO P2

 BCH Directed Boot Path: 1/0/1/1/0/4/0.3


 Do you wish to stop at the ISL prompt prior to booting? (y/n) >> n

Initializing boot Device.


Boot IO Dependent Code (IODC) Revision 2


Boot Path Initialized.


HARD Booted.

ISL Revision A.00.44  Mar 12, 2003

ISL booting  hpux (;0):INSTALL

Boot
: tape(1/0/1/1/0/4/0.3.0.0.0.0.0;0):WINSTALL
22933504 + 5214208 + 8112160 start 0x14e8e8
DoCalllist done
gate64: sysvec_vaddr = 0xc0002000 for 2 pages

Memory Class Setup
-------------------------------------------------------------------------
Class     Physmem              Lockmem              Swapmem
-------------------------------------------------------------------------
System :  62302 MB             62302 MB             62302 MB
Kernel :  62302 MB             62302 MB             62302 MB
User   :  60724 MB             53834 MB             54045 MB
-------------------------------------------------------------------------

ktracer is off until requested.
Installing Socket Protocol families AF_INET and AF_INET6
Kernel EVM initialized
sec_init(): kernel RPC authentication/security initialization.
secgss_init():  kernel RPCSEC_GSS security initialization.
rpc_init(): kernel RPC initialization.
rpcmod_install(): kernel RPC STREAMS module "rpcmod" installation. ...(driver_install)
NOTICE: nfs_client_pv3_install(): nfs3 File system was registered at index 10.
NOTICE: nfs_client_pv4_install(): nfs4 File system was registered at index 11.
class : tape, instance 1
The caller has passed invalid data to process an operation associated with the LUN (64000/0xfa00/0x6)            .

iether4: INITIALIZING HP AB290-60001 PCI/PCI-X 1000Base-T 2-port U320 SCSI/2-port 1000B-T Combo Adapt            er at hardware path 1/0/1/1/0/6/0
iether5: INITIALIZING HP AB290-60001 PCI/PCI-X 1000Base-T 2-port U320 SCSI/2-port 1000B-T Combo Adapt            er at hardware path 1/0/1/1/0/6/1
igelan6: INITIALIZING HP A6825-60101 PCI 1000Base-T Adapter at hardware path 1/0/8/1/0
igelan7: INITIALIZING HP A6825-60101 PCI 1000Base-T Adapter at hardware path 1/0/10/1/0
igelan8: INITIALIZING HP A6825-60101 PCI 1000Base-T Adapter at hardware path 1/0/14/1/0

    System Console is on the Built-In Serial Interface
igelan0: INITIALIZING HP A6847-60101 PCI 1000Base-SX Adapter at hardware path 0/0/6/1/0
igelan1: INITIALIZING HP A6825-60101 PCI 1000Base-T Adapter at hardware path 0/0/8/1/0
igelan2: INITIALIZING HP A6825-60101 PCI 1000Base-T Adapter at hardware path 0/0/10/1/0
igelan3: INITIALIZING HP A6825-60101 PCI 1000Base-T Adapter at hardware path 0/0/14/1/0
AF_INET socket/streams output daemon running, pid 60
afinet_prelink: module installed
Starting the STREAMS daemons-phase 1
    Swap device table:  (start & size given in 512-byte blocks)
              * Preparing to execute init...
=======  09/26/11 11:46:43 EDT  HP-UX Installation Initialization.
         @(#)Ignite-UX Revision C.7.12.519
         @(#)ignite/launch (opt) Revision:
         /branches/IUX_RA1103/ignite/src@82875 Last Modified: 2011-01-20
         21:10:40 +0530 (Thu, 20 Jan 2011)
       * Configuring RAM filesystems...
       * Scanning system for IO devices...
       * Boot device is: 1/0/1/1/0/4/0.0x3.0x0
Recovery tape created from system: serv on Mon Sep 26 14:57:54 2011


WARNING: The configuration information calls for a non-interactive
         installation.

         Press <Return/Enter> within 10 seconds to cancel batch-mode installation:
       * Using client directory: /var/opt/ignite/clients/0x00306EF565A1
       * Checking configuration for consistency...
WARNING: Dump space (8388608KB) is less than 25% of system memory (67073024KB).
         There is a high probability that the system dump will be truncated
         with a failure to capture important system information in the event of
         a system crash. You can increase the size of the dump volumes or add
         additional dump volumes on the "File System" tab when using the
         advanced user interface. See crashconf(1M) for more information.
WARNING: Free space (7359584KB) in "/var" where /var/adm/crash is located is
         less than 25% of system memory (67073024KB). This will likely result
         in an inability to capture a single selective compressed dump in the
         event of a system crash. Additional space will be required to
         uncompress the dump in order to analyze it and to save multiple dumps.
         You can increase the size of the "/var" volume on the "File System"
         tab when using the advanced user interface.
WARNING: The disk at: 1/0/0/3/0.0x6.0x0 (HP_73.4GST373455LC) appears to contain
         a file system and boot area.  Continuing the installation will destroy
         any existing data on this disk.

         Press <Return/Enter> within 10 seconds to cancel batch-mode installation:
       * Continuing despite above warnings.
       * Attempting a non-interactive installation.
       * Loading configuration utility...
       * Beginning installation from source: /dev/rmt/c8t3d0BEST
=======  09/26/11 11:50:48 EDT  Starting system configuration...
       * Configure_Disks:  Begin
       * Mapping LUN Instance Data
insf: Installing special files for sdisk instance 4 address 0/0/1/1/0.10.32.255.0.0.0
...
insf: Installing special files for pseudo driver escsi
       * Boot device is: 1/0/1/1/0/4/0.0x3.0x0
       * Will install B.11.31 onto this system.
       * Using LVM for disk 1/0/0/3/0.0x6.0x0 (disk3), group: vg00
       * Creating LVM physical volume "/dev/rdisk/disk3" (1/0/0/3/0.0x6.0x0).
       * Creating volume group "vg00".
       * Creating logical volume "vg00/lvol1" (/stand).
...
       * Extending logical volume "vg00/lvol8" (/var).
       * Making HFS filesystem for "/stand", (/dev/vg00/rlvol1).
...
       * Making VxFS filesystem for "/var", (/dev/vg00/rlvol8).
       * Setting rotational delay to 0 for "/stand".
       * Configure_Disks:  Complete
       * Download_mini-system:  Begin
x ./sbin/fs/hfs/mkfs, 356352 bytes, 696 tape blocks
...
x ./monitor_bpr, 1589248 bytes, 3104 tape blocks
       * Download_mini-system:  Complete
       * Loading_software:  Begin
       * Installing boot area on disk.
       * Enabling swap areas.
       * Number of archives to install: 1
       * Processing the archive source (Recovery Archive).
       * Mon Sep 26 11:56:33 EDT 2011: Starting archive load of the source
         (Recovery Archive).
       * Positioning the tape (/dev/rmt/c8t3d0BESTn).
       * Looking for Archive...
       * Found the Archive Position. Now load the Archive.
       * Archive extraction from tape is beginning. Please wait.
       * Mon Sep 26 12:10:23 EDT 2011: Completed archive load of the source
         (Recovery Archive).
       * Executing user specified script:
         "/opt/ignite/data/scripts/os_arch_post_l".
       * Running in recovery mode (os_arch_post_l).
rm: directory /dev/diag not removed.  Cannot remove current directory or a mount point
       * Relocating RAM filesystems.
       * Running the ioinit command ("/sbin/ioinit -c")
       * Creating device files via the insf command.
insf: Installing special files for sdisk instance 4 address 0/0/1/1/0.10.32.255.0.0.0
...
insf: Installing special files for pseudo driver sad
       * Constructing the bootconf file.
       * Setting primary boot path to "/dev/rdisk/disk3".
Primary boot path set to 1/0/0/3/0.0x6.0x0 (/dev/rdisk/disk3)
       * Executing: "/var/adm/sw/products/OS-Core/CORE2-KRN/iux_postload".
       * Executing: "/var/adm/sw/products/OS-Core/CORE-KRN/iux_postload".
       * Executing: "/var/adm/sw/products/OS-Core/CORE-SHLIBS/iux_postload".
       * No actions taken - running in recovery mode.
       * Executing: "/var/adm/sw/products/PHKL_40226/pfiles/iux_postload".
       * Executing: "/var/adm/sw/products/FC-FCD.2/FC-FCD-KRN/iux_postload".
       * Backing up LVM configuration for "vg00".
       * Loading_software:  Complete
=======  09/26/11 18:11:10 METDST  Building the new kernel.
       * Build_Kernel:  Begin
NOTE:    Since the /stand/vmunix kernel is already in place, the kernel will
         not be re-built. Note that no mod_kernel, set_kernel or rm_kernel
         directives will be processed.
       * Build_Kernel:  Complete
       * Boot_From_Client_Disk:  Begin
=======  09/26/11 18:11:36 METDST  Rebooting machine as expected.
NOTE:    Rebooting system.

sync'ing disks (0 buffers to flush):
 0 fcache pages still dirty
 0 buffers not flushed
 0 buffers still dirty
Calling function d39200 for Shutdown State 5 type 0x1
Calling function 719eb8 for Shutdown State 5 type 0x1

Closing open logical volumes...
Done


Cells have been reset (Boot Is Blocked (BIB) is not set).

043.007.000

Duplex Console IO Dependent Code (IODC) revision 1
   --------------------------------------------------------------------------
     (c) Copyright 1995-2006, Hewlett-Packard Company, All rights reserved
   --------------------------------------------------------------------------


          Cab/      Cell      ------- Processor --------    Cache Size
    Cell  Slot      State      #    Speed       State      Inst    Data
    ----  ----  ------------  ---  --------  -----------  ------  ------
      0   0/0   Idle           0A  1068 MHz  Idle         64 MB   64 MB
                               0B  1068 MHz  Idle         64 MB   64 MB
                               1A  1068 MHz  Idle         64 MB   64 MB
                               1B  1068 MHz  Idle         64 MB   64 MB
                               2A  1068 MHz  Idle         64 MB   64 MB
                               2B  1068 MHz  Idle         64 MB   64 MB
                               3A  1068 MHz  Idle         64 MB   64 MB
                               3B  1068 MHz  Idle         64 MB   64 MB
      1   0/1   Active         0A  1068 MHz  Active       64 MB   64 MB
                               0B  1068 MHz  Idle         64 MB   64 MB
                               1A  1068 MHz  Idle         64 MB   64 MB
                               1B  1068 MHz  Idle         64 MB   64 MB
                               2A  1068 MHz  Idle         64 MB   64 MB
                               2B  1068 MHz  Idle         64 MB   64 MB
                               3A  1068 MHz  Idle         64 MB   64 MB
                               3B  1068 MHz  Idle         64 MB   64 MB


     Primary Boot Path:  1/0/0/3/0.6
          Boot Actions:  Boot from this path.
                         If unsuccessful, go to BCH.

HA Alternate Boot Path:  1/0/1/1/0/4/1.6
          Boot Actions:  Go to BCH.

   Alternate Boot Path:  1/0/1/1/0/4/1.6
          Boot Actions:  Go to BCH.

          Console Path:  1/8/1.0


Attempting to boot using the primary path.
-------------------------------------------------------------


 To discontinue, press any key within 10 seconds.

 10 seconds expired.
 Proceeding...


Initializing boot Device.


Boot IO Dependent Code (IODC) Revision 2


Boot Path Initialized.


HARD Booted.

ISL Revision A.00.44  Mar 12, 2003

ISL booting  hpux

Boot
: disk(1/0/0/3/0.6.0.0.0.0.0;0)/stand/vmunix
14340096 + 3534848 + 4915080 start 0x14d7e8
DoCalllist done
Warning: The value of 124913 for tunable maxfiles is not a multiple of the file descriptor chunk size (8).  This may result in unusable memory in each process.
Warning: The value of 124913 for tunable maxfiles_lim is not a multiple of the file descriptor chunk size (8).  This may result in unusable memory in each process.
Module igelan is put into ramfs:load time: driver_install, state: loaded
...
Module mpt is put into ramfs:load time: driver_install, state: loaded
Using /stand/ext_ioconfig
gate64: sysvec_vaddr = 0xc0002000 for 2 pages

Memory Class Setup
-------------------------------------------------------------------------
Class     Physmem              Lockmem              Swapmem
-------------------------------------------------------------------------
System :  62402 MB             62402 MB             62402 MB
Kernel :  62402 MB             62402 MB             62402 MB
User   :  60753 MB             53858 MB             54070 MB
-------------------------------------------------------------------------

ktracer is off until requested.
Installing Socket Protocol families AF_INET and AF_INET6
Kernel EVM initialized
sec_init(): kernel RPC authentication/security initialization.
secgss_init():  kernel RPCSEC_GSS security initialization.
rpc_init(): kernel RPC initialization.
rpcmod_install(): kernel RPC STREAMS module "rpcmod" installation. ...(driver_install)
NOTICE: nfs_client_pv3_install(): nfs3 File system was registered at index 10.
NOTICE: nfs_client_pv4_install(): nfs4 File system was registered at index 11.
NOTICE: cachefsc_install: cachefs File system was registered at index 13.
iether0: INITIALIZING HP AB290-60001 PCI/PCI-X 1000Base-T 2-port U320 SCSI/2-port 1000B-T Combo Adapter at hardware path 1/0/1/1/0/6/0
...
igelan5: INITIALIZING HP A6825-60101 PCI 1000Base-T Adapter at hardware path 0/0/14/1/0
AF_INET socket/streams output daemon running, pid 56
afinet_prelink: module installed
Starting the STREAMS daemons-phase 1
LVM: Root VG activated
    Swap device table:  (start & size given in 512-byte blocks)
        entry 0 - major is 64, minor is 0x2; start = 0, size = 16777216
Checking root file system.
file system is clean - log replay is not required
Root check done.
NOTICE: return ramfs memory for BTL: [FREE] top 0x0000000fff000000, pages 3723

Create STCP device files
Starting the STREAMS daemons-phase 2
     $Revision: vmunix:    B.11.31_LR FLAVOR=perf
Memory Information:
    physical page size = 4096 bytes, logical page size = 4096 bytes
    Physical: 67073024 Kbytes, lockable: 51234340 Kbytes, available: 58280968 Kbytes

insf: Installing special files for sdisk instance 4 address 0/0/1/1/0.10.32.255.0.0.0
...
insf: Installing special files for pseudo driver escsi
         /sbin/init.d/hpapa started.
         Please be patient. This may take about 20 seconds.
         HP_APA_MAX_LINKAGGS = 50
         HP_APA_DEFAULT_PORT_MODE = MANUAL
         /usr/sbin/hp_apa_util -S 6 LAN_MONITOR
         /usr/sbin/lanadmin -X -g 6 5 900
         New Group Capability = 5
         /usr/sbin/lanadmin -X -t 6 5 900
...
Reading ASCII file /etc/lanmon/lanconfig.ascii
Unable to receive reply from local cmclconfd. Connection timed out
Unable to initialize HOSTNAME_ADDRESS_FAMILY.
Creating Fail-Over Group lan900
Creating Fail-Over Group lan901
Creating Fail-Over Group lan902
         /sbin/init.d/hpapa Completed successfully.
         /sbin/init.d/hplm started.
Reading Failover Group information from kernel.
WARNING: IP address is not configured on the primary port of lan902 but
         the failover-group is declared with the STATIONARY_IP field.  The
         failover-group lan902 will be created without an IP address.
         /sbin/init.d/hplm Completed successfully.
       * Boot_From_Client_Disk:  Complete
       * Run_SD_Configure_Scripts:  Begin
       * Running command ("/opt/swm.iux/bin/swm job list -a job_id
         *,save_code=JobSaveAndReboot,status=SAVED").
       * Run_SD_Configure_Scripts:  Complete
       * Run_Postconfigure_Scripts:  Begin
       * Applying the networking information.
       * Applying the timezone: MET-1METDST.
       * Run all specified post-configure scripts.
       * Executing user specified script:
         "/opt/ignite/data/scripts/os_arch_post_c".
       * Running in recovery mode (os_arch_post_c).
       * Executing user specified commands.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
       * Run_Postconfigure_Scripts:  Complete
=======  09/26/11 18:17:10 METDST  Installation complete: Successful


####### #    #
#     # #   #
#     # #  #
#     # ###
#     # #  #
#     # #   #
####### #    #



NOTE:    Rebooting system.

sync'ing disks (0 buffers to flush):
 0 fcache pages still dirty
 0 buffers not flushed
 0 buffers still dirty
Calling function 5f1fd0 for Shutdown State 5 type 0x1

Closing open logical volumes...
Done


Cells have been reset (Boot Is Blocked (BIB) is not set).

043.007.000

Duplex Console IO Dependent Code (IODC) revision 1
   --------------------------------------------------------------------------
     (c) Copyright 1995-2006, Hewlett-Packard Company, All rights reserved
   --------------------------------------------------------------------------


          Cab/      Cell      ------- Processor --------    Cache Size
    Cell  Slot      State      #    Speed       State      Inst    Data
    ----  ----  ------------  ---  --------  -----------  ------  ------
      0   0/0   Idle           0A  1068 MHz  Idle         64 MB   64 MB
                               0B  1068 MHz  Idle         64 MB   64 MB
                               1A  1068 MHz  Idle         64 MB   64 MB
                               1B  1068 MHz  Idle         64 MB   64 MB
                               2A  1068 MHz  Idle         64 MB   64 MB
                               2B  1068 MHz  Idle         64 MB   64 MB
                               3A  1068 MHz  Idle         64 MB   64 MB
                               3B  1068 MHz  Idle         64 MB   64 MB
      1   0/1   Active         0A  1068 MHz  Active       64 MB   64 MB
                               0B  1068 MHz  Idle         64 MB   64 MB
                               1A  1068 MHz  Idle         64 MB   64 MB
                               1B  1068 MHz  Idle         64 MB   64 MB
                               2A  1068 MHz  Idle         64 MB   64 MB
                               2B  1068 MHz  Idle         64 MB   64 MB
                               3A  1068 MHz  Idle         64 MB   64 MB
                               3B  1068 MHz  Idle         64 MB   64 MB


     Primary Boot Path:  1/0/0/3/0.6
          Boot Actions:  Boot from this path.
                         If unsuccessful, go to BCH.

HA Alternate Boot Path:  1/0/1/1/0/4/1.6
          Boot Actions:  Go to BCH.

   Alternate Boot Path:  1/0/1/1/0/4/1.6
          Boot Actions:  Go to BCH.

          Console Path:  1/8/1.0


Attempting to boot using the primary path.
-------------------------------------------------------------


 To discontinue, press any key within 10 seconds.

 10 seconds expired.
 Proceeding...


Initializing boot Device.


Boot IO Dependent Code (IODC) Revision 2


Boot Path Initialized.


HARD Booted.

ISL Revision A.00.44  Mar 12, 2003

ISL booting  hpux

Boot
: disk(1/0/0/3/0.6.0.0.0.0.0;0)/stand/vmunix
14340096 + 3534848 + 4915080 start 0x14d7e8
DoCalllist done
Warning: The value of 124913 for tunable maxfiles is not a multiple of the file descriptor chunk size (8).  This may result in unusable memory in each process.
Warning: The value of 124913 for tunable maxfiles_lim is not a multiple of the file descriptor chunk size (8).  This may result in unusable memory in each process.
Module mpt is put into ramfs:load time: driver_install, state: loaded
...
Module igelan is put into ramfs:load time: driver_install, state: loaded
Using /stand/ext_ioconfig
gate64: sysvec_vaddr = 0xc0002000 for 2 pages

Memory Class Setup
-------------------------------------------------------------------------
Class     Physmem              Lockmem              Swapmem
-------------------------------------------------------------------------
System :  62402 MB             62402 MB             62402 MB
Kernel :  62402 MB             62402 MB             62402 MB
User   :  60753 MB             53858 MB             54070 MB
-------------------------------------------------------------------------

ktracer is off until requested.
Installing Socket Protocol families AF_INET and AF_INET6
Kernel EVM initialized
sec_init(): kernel RPC authentication/security initialization.
secgss_init():  kernel RPCSEC_GSS security initialization.
rpc_init(): kernel RPC initialization.
rpcmod_install(): kernel RPC STREAMS module "rpcmod" installation. ...(driver_install)
NOTICE: nfs_client_pv3_install(): nfs3 File system was registered at index 10.
NOTICE: nfs_client_pv4_install(): nfs4 File system was registered at index 11.
NOTICE: cachefsc_install: cachefs File system was registered at index 13.
iether0: INITIALIZING HP AB290-60001 PCI/PCI-X 1000Base-T 2-port U320 SCSI/2-port 1000B-T Combo Adapter at hardware path 1/0/1/1/0/6/0
...
igelan5: INITIALIZING HP A6825-60101 PCI 1000Base-T Adapter at hardware path 0/0/14/1/0
AF_INET socket/streams output daemon running, pid 56
afinet_prelink: module installed
Starting the STREAMS daemons-phase 1
LVM: Root VG activated
    Swap device table:  (start & size given in 512-byte blocks)
        entry 0 - major is 64, minor is 0x2; start = 0, size = 16777216
Checking root file system.
file system is clean - log replay is not required
Root check done.
NOTICE: return ramfs memory for BTL: [FREE] top 0x0000000fff000000, pages 3723

Create STCP device files
Starting the STREAMS daemons-phase 2
     $Revision: vmunix:    B.11.31_LR FLAVOR=perf
Memory Information:
    physical page size = 4096 bytes, logical page size = 4096 bytes
    Physical: 67073024 Kbytes, lockable: 51234336 Kbytes, available: 58280968 Kbytes

/sbin/ioinitrc:
/sbin/krs_sysinit:
       * The module 'rng' has been loaded.

insf: Installing special files for sdisk instance 4 address 0/0/1/1/0.10.32.255.0.0.0
...
insf: Installing special files for esdisk instance 5 address 64000/0xfa00/0x7
insf: Installing special files for pseudo driver framebuf

/sbin/bcheckrc:
Checking for LVM volume groups and Activating (if any exist)
Checking hfs file systems
/sbin/fsclean: /dev/vg00/lvol1 (mounted) ok
HFS file systems are OK, not running fsck
Checking vxfs file systems
UX:vxfs fsck: INFO: V-3-20913: /dev/vg00/lvol3:sanity check: root file system OK (mounted read/write)
...
UX:vxfs fsck: INFO: V-3-20915: /dev/vg00/lvol8:sanity check: /dev/vg00/lvol8 OK

Cleaning /etc/ptmp...

/sbin/auto_parms: DHCP access is disabled (see /etc/auto_parms.log)

stty: : Not a typewriter
ovc instance NOT running

     HP-UX Start-up in progress
     __________________________

     Configure system crash dumps ....................................................... OK
     Removing old vxvm files ............................................................ OK
     Mount file systems ................................................................. OK
 ...
     Starting Control Daemon ............................................................ N/A

The system is ready.

GenericSysName [HP Release B.11.31] (see /etc/issue)
Console Login: root
Password:
Last successful login:       Mon Sep 26 14:43:47 METDST 2011 serv
Please wait...checking for disk quotas

Value of TERM has been set to "vt100".
WARNING:  YOU ARE SUPERUSER !!

serv# date
Mon Sep 26 18:30:59 METDST 2011

Tips

Got "Welcome to HP-UX!" on an already configured server

I got the "set_parms auto_parms_initial" on the reboot of a configured server...

Confidential computer software. Valid license from HP required for
possession, use or copying.  Consistent with FAR 12.211 and 12.212,
Commercial Computer Software, Computer Software Documentation, and
Technical Data for Commercial Items are licensed to the U.S. Government
under vendor's standard commercial license.


/sbin/auto_parms: DHCP access is disabled (see /etc/auto_parms.log)
_______________________________________________________________________________

                       Welcome to HP-UX!

Before using your system, you will need to answer a few questions.

The first question is whether you plan to use this system on a network.

Answer "yes" if you have connected the system to a network and are ready
to link with a network.

Answer "no" if you:

     * Plan to set up this system as a standalone (no networking).

     * Want to use the system now as a standalone and connect to a
       network later.
_______________________________________________________________________________

Are you ready to link this system to a network?

Press [y] for yes or [n] for no, then press [Enter]

To get rid of this problem, I rebooted in single user mode and fixed the /etc/rc.config.d/netconf file.

You can also check the /sbin/auto_parms file to understand why it's triggering this mode at the startup...

Boot in single user mode

Break the HP-UX boot and load the kernel with the option "-is":

5,0,2,0 5410020B09E10000 0000000000000006 EVN_EFI_LAUNCH_BOOT_MANAGER
(C) Copyright 1996-2012 Hewlett-Packard Development Company, L.P.

Note, menu interfaces might only display on the primary console device.
The current primary console device is:
Serial PcieRoot(0x30304352)/Pci(0x1,0x0)/Pci(0x0,0x5)
The primary console can be changed via the 'conconfig' UEFI shell command,
or the 'Console Configuration' option in the Boot Maintenance Manager menu.

Press:  ENTER  -  Start boot entry execution
        B / b  -  Launch Boot Manager (menu interface)
        D / d  -  Launch Device Manager (menu interface)
        M / m  -  Launch Boot Maintenance Manager (menu interface)
        S / s  -  Launch UEFI Shell (command line interface)
        I / i  -  Launch iLO Setup Tool (command line interface)

*** User input can now be provided ***

Automatic boot entry execution will start in 1 second(s).
HP Smart Array P410i Controller     (version 5.84)  1 Logical Drive
Currently the controller is in RAID mode
Booting HP-UX Primary Boot: 1/0/0/2/0/0/0.0x0.0x4000000000000000

(C) Copyright 1999-2012 Hewlett-Packard Development Company, L.P.
All rights reserved

HP-UX Boot Loader for IPF  --  Revision 2.047

Press Any Key to interrupt Autoboot
\EFI\HPUX\AUTO ==> boot vmunix
Seconds left till autoboot -   8
   Type 'help' for help

HPUX> boot -is vmunix
> System Memory = 163522 MB
...
INIT: Overriding default level with level 's'

Boot Authentication:

Please enter your login name: root
Password:

INIT: SINGLE USER MODE

INIT: Running /sbin/sh
#

Get from which package a file come from

swlist -l file | grep "/usr/local/lib/hpux32/libz.so"
  zlib.zlib-RUN: /usr/local/lib/hpux32/libz.so

swlist zlib
# Initializing...
# Contacting target "host"...
#
# Target:  host:/
#

# zlib                  1.2.8          zlib
  zlib.zlib-RUN

Install Ignite-UX client

Install from the cdrom only the filset Ignite-UX.RECOVERY:

root@client:/# swinstall -s /cdrom Ignite-UX.RECOVERY
...
       + IGNITE,r=C.7.11.439,a=HP-UX_B.11.31_IA/PA,v=HP
           + Ignite-UX.CD-TOOLS,r=C.7.11.439,a=HP-UX_B.11.11_32/64,v=HP,fr=C.7.11.439,fa=HP-UX_B.11.11_32/64
           + Ignite-UX.CD-TOOLS-DOC,r=C.7.11.439,a=HP-UX_B.11.11_32/64,v=HP,fr=C.7.11.439,fa=HP-UX_B.11.11_32/64
           + Ignite-UX.CD-TOOLS-SRC,r=C.7.11.439,a=HP-UX_B.11.11_32/64,v=HP,fr=C.7.11.439,fa=HP-UX_B.11.11_32/64
           + Ignite-UX.DVD-TOOLS,r=C.7.11.439,a=HP-UX_B.11.11_32/64,v=HP,fr=C.7.11.439,fa=HP-UX_B.11.11_32/64
           + Ignite-UX.DVD-TOOLS-DOC,r=C.7.11.439,a=HP-UX_B.11.11_32/64,v=HP,fr=C.7.11.439,fa=HP-UX_B.11.11_32/64
           + Ignite-UX.DVD-TOOLS-SRC,r=C.7.11.439,a=HP-UX_B.11.11_32/64,v=HP,fr=C.7.11.439,fa=HP-UX_B.11.11_32/64
           + Ignite-UX.MGMT-TOOLS,r=C.7.11.439,a=HP-UX_B.11.11_32/64,v=HP,fr=C.7.11.439,fa=HP-UX_B.11.11_32/64
             Ignite-UX.RECOVERY,r=C.7.11.439,a=HP-UX_B.11.11_32/64,v=HP,fr=C.7.11.439,fa=HP-UX_B.11.11_32/64
...

Install from the the depot file:

swinstall -s /depot/VC_FW_3.75_130219_HP-UX_11i_v3_HP-UX_11i_v3_Ignite-UX-11.31_C.7.17.391_HP-UX_B.11.00_32_64.depot Ignite-UX.RECOVERY

Chow the installed products:

root@client:/# swlist -l subproduct | grep Ignite
# Ignite-UX                             C.7.11.439     HP-UX System Installation Services
  Ignite-UX.MinimumRuntime              Minimum Runtime Configuration
  Ignite-UX.Optical                     Optical Media Creation Tools
  Ignite-UX.Runtime                     Runtime Configuration

Create folders on the ignite server:

root@backup_server:/# mkdir -p /var/opt/ignite/recovery/archives/client
root@backup_server:/# chown bin:bin /var/opt/ignite/recovery/archives/client

Try to make a backup:

root@client:/# /opt/ignite/bin/make_net_recovery -s backup_server  -x inc_entire=vg00 -x exclude=/opt -x include=/opt/omni -x exclude=/tmp -x exclude=/var/adm/crash -x exclude=/var/tmp -x exclude=/var/adm/sw -n 1 2>&1 >> /tmp/make_net_recovery.out
       * Creating NFS mount directories for configuration files.

=======  11/20/13 10:56:30 UTC  Started /opt/ignite/bin/make_net_recovery. (Wed Nov 20 10:56:30 UTC 2013)
         @(#)Ignite-UX Revision C.7.11.439
         @(#)ignite/net_recovery (opt) Revision: /branches/IUX_RA1009/ignite/src@81482 Last Modified: 2010-06-10 11:10:03 -0600 (Thu, 10 Jun 2010)

       * Checking Versions of Recovery Tools
       * Scanning system for IO devices...
       * Boot device is: 0/4/1/0.0xd46d4fd581d283d.0x0
       * Creating System Configuration.
WARNING: The volume group /dev/vg00 will be only partially included in the System Recovery Archive.  This means that not all files and directories on this
         volume group will be restored when the archive is installed.  This message can be suppressed using the "-P s" option for make_net_recovery. See
         make_net_recovery(1M) for more details.

       * /opt/ignite/bin/save_config -f /var/opt/ignite/recovery/client_mnt/0x001A4BFFFFFF/recovery/2013-11-20,10:56/system_cfg vg00
       * Backing Up Volume Group /dev/vg00
       * /usr/sbin/vgcfgbackup /dev/vg00
       * Creating Map Files for Volume Group /dev/vg00
       * /usr/sbin/vgexport -s -p -m /etc/lvmconf/vg00.mapfile /dev/vg00

       * Creating Control Configuration.
       * Creating Archive File List
       * Creating Archive Configuration

       * /opt/ignite/lbin/make_arch_config -c /var/opt/ignite/recovery/client_mnt/0x001A4BFFFFFF/recovery/2013-11-20,10:56/archive_cfg -g
         /var/opt/ignite/recovery/client_mnt/0x001A4BFFFFFF/recovery/2013-11-20,10:56/flist -n 2013-11-20,10:56 -r ipf -b 64 -d Recovery\ Archive -L
         /var/opt/ignite/recovery/arch_mnt -l backup_server:/var/opt/ignite/recovery/archives/client -i 1 -m t
       * Saving the information about archive to /var/opt/ignite/recovery/previews
       * Creating The Networking Archive

       * /opt/ignite/data/scripts/make_sys_image -d /var/opt/ignite/recovery/arch_mnt -t n -s local -n 2013-11-20,10:56 -m t -w
         /var/opt/ignite/recovery/client_mnt/0x001A4BFFFFFF/recovery/2013-11-20,10:56/recovery.log -u -R -g
         /var/opt/ignite/recovery/client_mnt/0x001A4BFFFFFF/recovery/2013-11-20,10:56/flist -a 10249370

       * Preparing to create a system archive.
       * The archive is estimated to reach 5124685 kbytes.
       * Free space on /var/opt/ignite/recovery/arch_mnt
         after archive should be about 128442145 kbytes.

       * Archiving contents of client via tar to
          /var/opt/ignite/recovery/arch_mnt/2013-11-20,10:56.
       * Creation of system archive complete.
NOTE:    The following files are in the list of files that were on the
         system, but they are no longer present.  These files are not
         included in the backup:
         /var/opt/ignite/tmp/AAA008505
         /var/opt/ignite/tmp/BAA008505

       * Creating CINDEX Configuration File

       * /opt/ignite/bin/manage_index -q -c 2013-11-20,10:56\ Recovery\ Archive -i /var/opt/ignite/recovery/client_mnt/0x001A4BFFFFFF/CINDEX -u Recovery\
         Archive


=======  11/20/13 11:10:14 UTC  make_net_recovery completed with warnings

Install the shadow file

Simply execute this command to create the initial shadow file and replace by a x the passwords from '/etc/passwd':

pwconv

Setup a NFS direct auto mount rule

This rule has been created to auto mount a NFS share done by an high availability Serviceguard package.

If the auto mount is setup on the same nodes that run the NFS share package, you need to force auto mount to use the NFS protocol rather than the loop FS (LOFS). Without this configuration, when the package will change of node, the mount point will be unavailable on the initial package node.

ch_rc -a -p AUTOMOUNTD_OPTIONS=\"-L\" /etc/rc.config.d/nfsconf
grep -e "^AUTOMOUNTD_OPTIONS" /etc/rc.config.d/nfsconf
AUTOMOUNTD_OPTIONS="-L"

Restart the autofs service to take this change by automountd daemon:

ps -ef | grep automountd | grep -v grep
    root 12461     1  0 12:49:59 ?         0:00 /usr/sbin/automountd

/sbin/init.d/autofs stop; /sbin/init.d/autofs start
killing automountd
    Starting AutoFS subsystem

    Starting up the automountd daemon
        /usr/sbin/automountd -L
    Running automount

ps -ef | grep automountd | grep -v grep
    root 12611     1  0 12:50:09 ?         0:00 /usr/sbin/automountd -L

In the auto_master file, create a redirection to auto_direct file:

cat /etc/auto_master
/net -hosts -nosuid,soft,nobrowse
/- /etc/auto_direct

In auto_direct file, just provide the mount point, NFS options and NFS share information:

cat /etc/auto_direct
/mount/dir -rw,proto=udp,soft ha-nfs-server-cluster-package:/nfs/share

The use of udp as protocol rather than tcp avoid service interruption when the NFS package fail-over from one node to another node.

Check the mount:

grep "/mount/dir" /etc/mnttab
/etc/auto_direct /opt/ftp autofs ignore,direct,rw,proto=udp,soft,dev=4000018 0 0 1382705409

This is when the nfs share is not mounted.

If the mount point directory is accessed:

/etc/auto_direct /mount/dir autofs ignore,direct,rw,proto=udp,soft,dev=4000018 0 0 1382705409
ha-nfs-server-cluster-package:/nfs/share /mount/dir nfs soft,nodevs,rsize=32768,wsize=32768,proto=udp,NFSv3,dev=4000019 0 0 1382705600

Export and mount an HP-UX NFS share for Oracle RMAN

Export:

share -o root=@10.1.1 /opt/oracle/backup

Mount on another server:

mkdir /opt/oracle/backup
mount -o hard,rw,noac,rsize=32768,wsize=32768,suid,proto=tcp,vers=3 10.1.1.1:/opt/oracle/backup /opt/oracle/backup

Check the mount:

mount | grep "oracle/backup"
/opt/oradata/VIS/backup/mig on 10.144.65.68:/opt/oradata/VIS/backup/mig noac,rsize=32768,wsize=32768,NFSv3,dev=4000008 on...

Mount a CD/DVD ROM

Scan disk devices:

ioscan -fnC disk
Class     I  H/W Path       Driver S/W State   H/W Type     Description
=======================================================================
disk     32  1/0/0/3/0.6.0  sdisk   CLAIMED     DEVICE       HP 73.4GST373307LC
                           /dev/dsk/c4t6d0   /dev/rdsk/c4t6d0
disk     33  1/0/0/3/1.2.0  sdisk   CLAIMED     DEVICE       HP      DVD-ROM 305
                           /dev/dsk/c5t2d0   /dev/rdsk/c5t2d0
disk     34  1/0/1/0/0/1/1.6.0        sdisk   CLAIMED     DEVICE       HP 73.4GST373307LC
                           /dev/dsk/c7t6d0   /dev/rdsk/c7t6d0


The device /dev/dsk/c5t2d0 is the DVD-ROM drive of this server.


Create a mount point and mount the cdrom:

mkdir /cdrom
mount -r /dev/dsk/c5t2d0 /cdrom

Check it:

vaduz# df -k /cdrom
/cdrom                 (/dev/dsk/c5t2d0       ) :  7854546 total allocated Kb
                                                         0 free allocated Kb
                                                   7854546 used allocated Kb
                                                       100 % allocation used