msgbartop
Tips and Tricks site for advanced HP-UX Engineers
msgbarbottom

12 Jul 11 Migrate VXVM booted system to LVM

From the HP-UX Veritas Administration guide, buried on page 106

This example shows how to create an LVM root disk on physical disk c0t1d0
after removing the existing LVM root disk configuration from that disk.

BOOTBG=$(vxdg bootdg)

vxprint -htg $BOOTDG | grep ^dm

dm rootdisk01   disk233_p2   auto     1024     142450592 –
dm rootmirr     disk234_p2   auto     1024     142450592 –

# You get the boot disk from this command. Break off the s2 if you are using legacy devices you can use them or the agile SDF devices.

# You may need to use vxbrk_mirror to break the mirror. Make sure you know which disk you are booted from. Check syslog to be sure. setboot is not a good indicator.

# Due to a wordpress error I’ve been forced to take the path etc vx bin out of the commands. I will fix this when wordpress stops blowing chunks on this data. Where there are spaces there need to be slashes.
#  etc vx bin vxdestroy_lvmroot -v c0t1d0
# etc vx bin vxres_lvmroot -v -b c0t1d0
The -b option to vxres_lvmroot sets c0t1d0 as the primary boot device.
As these operations can take some time, the verbose option, -v, is specified to
indicate how far the operation has progressed.

This command takes care of setboot and all details. Then just boot from the console.

This procedure does not remove VxVM software. The daemon still runs. But your system now boots LVM and that makes using Dynamic Root Disk (DRD) much easier.

 

Tags: , , , , , ,

05 Jul 11 VxVM replace boot disk

Create a partition description file

(Need to update the EFI and HPSP size below according to the other root disk partition’s size)
This examples is where the new disk is disk85. Applies only to HP-UX 11.31 with VxVM as boot drive manager.

# vi /tmp/efipart

3
EFI 500MB
HPUX 100%
HPSP 400MB

Use the idisk(1M) command to partition the disk according to this file
# idisk -wf /tmp/efipart /dev/rdisk/disk85

Write EFI info to the EFI partition on the disk
# mkboot -e -l /dev/rdisk/disk85

Confirm the AUTO file entry is intact It should be  “boot vmunix”
# efi_cp -d /dev/rdisk/disk85_p1 -u /EFI/HPUX/AUTO /tmp/efi; cat /tmp/efi

If found any difference, edit /tmp/efi file  as below to update the entry “boot vmunix”
#echo “boot vmunix ” > /tmp/efi

Update auto file
#efi_cp -d /dev/rdisk/disk85_p1 /tmp/efi /EFI/HPUX/AUTO

Confirm the AUTO file entry again, It should be  “boot vmunix”
# efi_cp -d /dev/rdisk/disk85_p1 -u /EFI/HPUX/AUTO /tmp/efi; cat /tmp/efi

Initialize the disk as VXVM  boot disk

#### vxdisksetup -iB disk85_p2  ((lives in etc vx bin slashes removed due to Word Press error))

Add the disk to the existing rootdg
# vxdg -g rootdg adddisk rootdisk02=disk85_p2

Write Volume Manager volume information to the LABEL file:
# /opt/VRTS/bin/vxbootsetup rootdisk02

Display the LIF and Volume Manager label information:
# vxvmboot -v /dev/rdisk/disk85

Check the Mirror status  ( Each volume should be with two plex )
$ vxprint –htg rootdg |egrep –i “^v|^pl”

 

Tags: , , , ,

15 Jun 11 Why HP-UX root shell needs to be /sbin/sh

Thanks to Jibn Antony of the Best Buy IDC team for validating.

So who cares what the root shell is? You do if you try to boot your system into single user mode with root shell changed to a shared executable shell, you will find out the hard way. The system won’t boot.

root@dxd22hxd# ls -l /bin/ksh
-r-xr-xr-x   2 bin        bin         538632 Nov 12  2007 /bin/ksh*
root@dxd22hxd# ldd /bin/ksh
        libnsl.so.1 =>  /usr/lib/hpux32/libnsl.so.1
        libxti.so.1 =>  /usr/lib/hpux32/libxti.so.1
        libc.so.1 =>    /usr/lib/hpux32/libc.so.1
        libc.so.1 =>    /usr/lib/hpux32/libc.so.1
        libxti.so.1 =>  /usr/lib/hpux32/libxti.so.1
        libdl.so.1 =>   /usr/lib/hpux32/libdl.so.1
root@dxd22hxd# ldd /sbin/sh
ldd: “/sbin/sh” is not a shared executable.
root@dxd22hxd# ls -l /sbin/sh
-r-xr-xr-x   1 bin        bin        1402600 Oct 23  2007 /sbin/sh*
Note that /bin/ksh requires /usr to be mounted which is not the case with single user or lv maintenance mode.

Tags: ,

06 Apr 11 setboot hardware path to legacy hardware path. A converter.

HP-UX 11.23

setboot provides output only including the hardware path (ioscan -H).

When calculating DRD clone targets and such you need the regular legacy device path.

Here is a converter, built with a little help from JRF on the ITRC forums.

First get the setboot path. Might want to use the full path of the setboot command in practice.

pboot=$(setboot | grep ^Primary | awk ‘{ print $NF }’);
aboot=$(setboot | grep ^Alternate |awk ‘{ print $NF}’);

abootdisk=$(ioscan -kfnCdisk | awk -v aboot=${aboot} ‘/aboot/ $0~aboot {getline;print aboot,$2}’ | awk ‘{ print $2 }’);

pbootdisk=$(ioscan -kfnCdisk | awk -v aboot=${pboot} ‘/pboot/ $0~pboot {getline;print pboot,$2}’ | awk ‘{ print $2 }’);

The slick part is getting the variable in and out of awk.

Uses ioscan.

Tags: , , ,

16 Mar 11 Preparation procedure for hpux boot disk (11.31)

# vi /tmp/idf
3
EFI 500MB
HPUX 100%
HPSP 400MB

Use the idisk command to initialize:

 

idisk -wf /tmp/idf /dev/rdsk/disk8

 

Replace disk with the disk you intend to use.

 

insf -e -C disk

# May need to be used in advance to insure the device is recognized.

Tags: , , , , , ,

01 Jul 10 Quick and dirty awk trick to see all Fiber Channel status

I needed to update documentation and I needed more information that my prior syslayout.sh script provided on fiber.

# Improvement by JRF on the ITRC forums.

ioscan -kfnC fc | awk ‘/fcd/ {getline;fcd=$NF;print fcd,$2}’ | while read -r fdev
do

fcmsutil ${fdev} | awk ‘/Hardware / {print $5};/World / { print $7}’

done

Ouput looks like this:

0/0/12/1/0/4/0
0x5001438002a24979
0x5001438002a24978
0x204f000dec81b540
0x200f000dec81b541

0/0/12/1/0/4/1
0x5001438002a2497b
0x5001438002a2497a
0x2093000dec81b480
0x2010000dec81b481

2/0/12/1/0/4/0
0x5001438002a24d35
0x5001438002a24d34
0x2050000dec81b480
0x2010000dec81b481

2/0/12/1/0/4/1
0x5001438002a24d37
0x5001438002a24d36
0x2093000dec81b540
0x200f000dec81b541

Second, new improved version (Girsah Chadash)
ioscan -kfnC fc | awk ‘/fcd/ {getline;fcd=$NF;print fcd,$2}’ | while read -r fde
v
do

fcmsutil ${fdev} | awk ‘/Hardware / {print $5};/World / { print $7}’ | awk’ {printf “%s %s %s %s %s”,$1, $2, $3, $4, $5;}’
fcmsutil ${fdev} | awk ‘/Hardware Path/ {PATH=$5};
/N_Port Node/ {NNODE=$7};
/N_Port Port/ {NPORT=$7};
/Switch Port/ {SPORT=$7};
/Switch Node/ {SNODE=$7};
END{print PATH, NNODE, NPORT, SPORT, SNODE}’

done

Next innovation would be to combine the awk statements in the while loop and pull off the output with a single awk command. I may do this, but I might need help from an awk guru.

The ioscan output is multi line, so the real innovation is using the getline function of awk to get the second line of data and ignore the first. The filter /fcd gets rid of the column format information.

Yes it could be done with grep, but it is more AWKFUL this way.

Updated document to provide some indentation. Trying to make the code easier to read. That may force me to add formatted scripts to download, which I will get to as time permits.

SEP

Tags: , ,

09 Jun 10 System I/O layout (EMC specific)

This is a script designed to document the layout of a system. It is EMC specific and requires the output of the inq command, which I store in /tmp/inq.txt

It can however be adapted to non EMC disk systems. It correctly shows the port/lba layout and status of network and fiber I/O the way it appears on the outside of the system. Two tables are included to permit lookups of the port/lba information. It has worked on blades, and is certified for rp8420 and superdome systems.

It has only been tested on HP-UX 11.31.

… please stand by….update in progress…

DF=”super.translate.dat”
MA=”router.macadd.dat”

typeset MYDIR=/var/tmp/syslayout
typeset MYPAGE=mypage
typeset MYDATA=mydata
typeset IDX_HTML=syslayout.html

writehtml (){
while [ $# -gt 0 ]
do
echo “<td>${1}</td>” >> ${IDX_HTML}

shift
done
echo “<tr>” >> ${IDX_HTML}
}

cat -<<!EOF > ${IDX_HTML}
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”>
<title>Dana IT Unix System documentation</title>
<BODY>
<TABLE style=”WIDTH: 100%; COLOR: rgb(0,0,0); TEXT-ALIGN: left” cellSpacing=2
cellPadding=2 border=0>
<TBODY>
<TR>
<td width=”200″><img
style=”border-width: 0px; margin: 0px; padding: 0px;” alt=”Dana”
src=”dana_logo.jpg”> </td>
<td style=”font-weight: bold;”><big><big>Dana
IT
Unix:
Documentation</big></big></td>

<TD style=”VERTICAL-ALIGN: top; TEXT-ALIGN: center” colSpan=7><BIG
style=”FONT-FAMILY: helvetica,arial,sans-serif”><BIG>Dana IT system I/O Layout.</BIG></BIG><BR></TD></TR>
!EOF

# colum layout # Path       slot MAC Address    lan  ipaddress      vlan   linkstatus

sysname=$(uname -n)
this_cell=$(vparstatus -p $sysname -v |awk ‘/Boot processor/ {print $4}’ |awk -F’\.’ ‘{print $1}’)

# echo $this_cell

this_par=$(parstatus -c 0 |awk ‘/cell’$this_cell’/ {print $9}’)

nparname=$(/usr/sbin/parstatus -P |awk “/^$this_par/ {if(pname == 1) {print}};/Partition Name/ {pname=1}”|awk ‘/’$this_par’ / {print $6}’)

#echo “Diag nparname: ${nparname}”

complexname=$(/usr/sbin/parstatus -X |awk “/Complex Name/”)
cellind=”cell${this_par}”

nparinfo=$(/usr/sbin/parstatus -P |awk “/^$this_par/ {if(pname == 1) {print}};/Partition Name/ {pname=1}”)
# model needs to be determineed
OS=$(uname -r)
if [ “$OS” = “B.11.31” ]
then
mod=$(model | awk ‘{ print $5 }’)
else
mod=$(model | awk -F/ ‘{ print $3}’)
fi

hn=$(hostname)

this_cell=$(vparstatus -p ${hn} -v |awk ‘/Boot processor/ {print $4}’ |awk -F’\.’ ‘{print $1}’)

echo $this_cell

this_par=$(parstatus -c 0 |awk ‘/cell’$this_cell’/ {print $9}’)

/usr/sbin/parstatus -P |awk “/cell/ {if(pname == 1) {print}};/Partition Name/ {pname=1}”|awk ‘/’$this_par’ / {print $6}’

hn=$(hostname)
lhn=”${hn}.dana.com”
echo “Host name: ${lhn}”
writehtml “Host name:” ${lhn}
echo “Model number is: $mod”
writehtml “Model number:” ${mod}
#echo “<td>$complexname</td><td>$nparname</td><tr>” >>  ${IDX_HTML}
writehtml “${complexname}” ${nparname}
echo “Model number is: $mod”
pbootpath=$(parstatus -p 0 -V |awk -F: ‘/Primary Boot Path/ {print $2}’)

echo “Primary boot path: ${pbootpath}”
writehtml “Primary boot path:” ${pbootpath}
#echo “<td>$complexname</td><td>$nparnam</td><tr>” >>  ${IDX_HTML}
# echo “<td>Path</td><td>slot</td><td>MAC Address</td><td>lan</td><td>IP Address</td><td>vlan</td><td>Link Status</td><tr>” >>  ${IDX_HTML}
writehtml Path slot MAC_Address lan IP_Address vlan Link_Status

#echo “$nparinfo”
# echo “Path        slot MAC         lan     check    ip”
# 2/0/5/1/0/6/1 4 0x002264E4948B lan1 10.8.128.162
echo  “Path       slot MAC Address    lan  ipaddress      vlan   linkstatus”

/usr/sbin/ioscan -fnk | awk ‘/^lan/ {print $3}’ |while read -r path
do
ip=””;
echo $path  | sed ‘s/\// /g’ | read p1 p2 p3 p4 p5 p6 p7
macaddy=$(lanscan | awk ‘{if($1 == “‘${path}'”) print $2}’)
lanid=$(lanscan | awk ‘{if($1 == “‘${path}'”) print $5}’)
plan=$(lanscan | awk ‘{if($1 == “‘${path}'”) print $3}’)
lchk=$(/usr/sbin/linkloop -i $plan $macaddy 2>/dev/null | grep “OK”)
# If linkloop produces postive results then see if there is an ip address
ip=”IP not set”
if [ -n “$lchk” ]
then
# echo “lchk not null. running ifconfig command”
ip=$(/usr/sbin/ifconfig $lanid | grep netmask | awk ‘{print $2}’)
fi
# roll through the router table and see if you can establish
# linkloop with the gateway
DRMAC=”No link..”
DVLAN=”Not found”
#while [[ “$value” != “val1” || “$value” != “val2” || “$value” != “val3” ]]
while read -r DL
do
rmacaddy=$(echo $DL | awk -F: ‘{print $2}’)
rvlan=$(echo $DL | awk -F: ‘{print $3}’)
rlchk=$(/usr/sbin/linkloop -i $plan $rmacaddy 2>/dev/null | grep “OK”)
if [ -n “$rlchk” ]
then
# echo “rlchk not null. setting vlan information.”
DRMAC=${rmacaddy}
DVLAN=${rvlan}
break;
fi
done < $MA

#  echo “${path} ${p7} ${macaddy} ${lanid} ${lchk} ${ip} ”
#p1=$(echo $path | awk -F/ ‘{print $1}’);
#p2=$(echo $path | awk -F/ ‘{print $2}’);
#p3=$(echo $path | awk -F/ ‘{print $3}’);
#p4=$(echo $path | awk -F/ ‘{print $4}’);
#p5=$(echo $path | awk -F/ ‘{print $5}’);
#p6=$(echo $path | awk -F/ ‘{print $6}’);
#p7=$(echo $path | awk -F/ ‘{print $7}’);

portpath=$(echo $path | awk -F/ ‘{print $3}’)
actualport=$(awk -F: ‘{if($2 == “‘${portpath}'” && $3 == “‘$mod'”) print $1}’ ${DF})

# echo “Actual path: ${p1} ${p2} ${p3} ${p4} ${p5} ${p6} ${p7}  ${actualport} ${ip} ${macaddy} ${lanid} ${ip}”
echo “${path} ${actualport} ${macaddy} ${lanid} ${ip}   ${DVLAN}   ${DRMAC}”
# echo “<td>${path}</td><td>${actualport}</td><td>${macaddy}</td><td>${lanid}</td><td>${ip}</td><td>${DVLAN}</td><td>${DRMAC}</td><tr>” >> ${IDX_HTML}
writehtml ${path} ${actualport} ${macaddy} ${lanid} ${ip} ${DVLAN} ${DRMAC}
done

echo “Fiber Channel….”
# echo “<td>Fiber Channel….</td><tr>” >> ${IDX_HTML}
writehtml  “Fiber Channel”
echo “PATH       slot Device… Status spd Hardware address”
# echo “<td>PATH</td><td>slot</td><td>Device</td><td>Status</td><td>speed</td><td>Hardware address</td><tr>” >>  ${IDX_HTML}
writehtml PATH slot Device Status speed Hardware address
#/usr/sbin/ioscan -fnCfc | grep fcd | awk ‘{print $3}’ |while read -r path
/usr/sbin/ioscan -fnk | awk ‘/^fc / {hw=$3;getline;print hw,$1}’ |while read -r hw devfile
do
#   echo “diag ${hw} dev file … ${devfile}”
port=$(echo $hw | awk -F/ ‘{print $3}’)
OSTAT=$(fcmsutil $devfile | awk ‘/ONLINE/  {print $4}’)
LSPD=$(fcmsutil $devfile | awk ‘/Link Speed/  {print $4}’)
WWN=$(fcmsutil $devfile | awk ‘/N_Port Port World Wide Name/  {print $7}’)
#  OSTAT=$(fcmsutil /dev/fcd1 | awk ‘/ONLINE/  {print $4}’)
#  LSPD=$(fcmsutil /dev/fcd1 | awk ‘/Link Speed/  {print $4}’)
#  WWN=$(fcmsutil /dev/fcd1 | awk ‘/N_Port Port World Wide Name/  {print $7}’)
actualport=$(awk -F: ‘{if($2 == “‘${port}'” && $3 == “‘$mod'”) print $1}’ ${DF})
echo “$hw ${actualport} $devfile ${OSTAT} ${LSPD} ${WWN}”
#echo “<td>$hw</td><td>${actualport}</td> <td>$devfile</td><td>${OSTAT}</td><td>${LSPD}</td> <td>${WWN}</td><tr>” >>  ${IDX_HTML}
writehtml ${hw} ${actualport} ${devfile} ${OSTAT} ${LSPD} ${WWN}
done

#awk -F: ‘{printf(“%8s %5s %4s\n”,$1,$3,$4)}’ steve
#2/0/5/1/0/6/0
#2/0/5/1/0/6/1

cat -<< !EOF >> ${IDX_HTML}
<TR></TR></TBODY></TABLE></BODY></HTML>
!EOF

chmod a+r ${IDX_HTML}
# Added to copy the data file to my home directory for diagnosis.
cp syslayout.html /home/sprotte
chmod a+r /home/sprotte/syslayout.html

super.translate.dat
—–
root@gitop2:/root # more /usr/global/etc/super.translate.dat
11:8:SD64B
10:9:SD64B
9:10:SD64B
8:12:SD64B
7:13:SD64B
6:14:SD64B
5:6:SD64B
4:5:SD64B
3:4:SD64B
2:2:SD64B
1:1:SD64B
0:0:SD64B
1:8:rp8420
2:10:rp8420
3:12:rp8420
4:14:rp8420
5:6:rp8420
6:4:rp8420
7:2:rp8420
8:1:rp8420

more /usr/global/etc/router.macadd.dat
Format:

IP Address : MAC Address : vlan# : Description
:0x00000c07ac0a:vlan9:HP-UX Production

Obviously this data varies from place the place. The Mac address of the router is used to check network connectivity with the linkloop command

Tags: , , , , ,

20 May 10 clean up procedure after ignite replication of hpvm host

This errror is created by Ignite replication of an hpvm system. The following checks device integrity and cleans up errors created by Ignite replication.

hpvmcreate: ERROR (jdeautp1): Incorrect backing device type.

First check for errors with this script (I may check this in at some point)

#!/usr/bin/sh
#
# Unofficial quick and dirty passthru DSF check script
#
# It walks all /dev/pt/* files and tries to find corresponding /dev/rdisk
# or /dev/rtape files. If they are foudn their minor numbers are compared.
#
# @(#) pt_check.sh v1.1 – stanm@wtec
#

for i in $(ls /dev/pt/*)
do
# ll $i
shortname=${i##*_}
printf “checking $shortname”
minor1=$(ll $i|awk ‘{print $6}’)
# echo minor1=$minor ($i)
if [ -c /dev/rdisk/$shortname ]; then
minor2=$(ll /dev/rdisk/$shortname|awk ‘{print $6}’)
# echo minor2=$minor2 ($/dev/rdisk/$shortname)
if [[ “x$minor1” = “x$minor2″ ]]; then
printf ” – OK\n”
else
printf ” – Minor numbers are probably incorrect\n”
printf “minor1=$minor1 ($i) vs ”
printf “minor2=$minor2 (/dev/rdisk/$shortname)\n”
fi
else
# could be tape
if [ -c /dev/rtape/${shortname}_BEST ]; then
minor2=$(ll /dev/rtape/${shortname}_BEST|awk ‘{print $6}’)
if [[ “x$minor1” = “x$minor2″ ]]; then
printf ” – OK\n”
else
printf ” – Minor numbers are probably incorrect\n”
printf “minor1=$minor1 ($i) vs ”
printf “minor2=$minor2 (/dev/rtape/${shortname}_BEST)\n”
fi
else
printf ” – /dev/rdisk/$shortname or /dev/rtape/${shortname}_BEST not found – check skipped\n”
fi
fi
done

Output indicating problems:

checking disk11 – Minor numbers are probably incorrect
minor1=0x000005 (/dev/pt/pt_disk11) vs minor2=0x000008 (/dev/rdisk/disk11)
checking disk12 – Minor numbers are probably incorrect
minor1=0x000006 (/dev/pt/pt_disk12) vs minor2=0x000009 (/dev/rdisk/disk12)
checking disk13 – Minor numbers are probably incorrect
minor1=0x000007 (/dev/pt/pt_disk13) vs minor2=0x00000a (/dev/rdisk/disk13)
checking disk14 – Minor numbers are probably incorrect
minor1=0x000008 (/dev/pt/pt_disk14) vs minor2=0x00000b (/dev/rdisk/disk14)
checking disk15 – Minor numbers are probably incorrect
minor1=0x000009 (/dev/pt/pt_disk15) vs minor2=0x00000c (/dev/rdisk/disk15)
checking disk17 – OK
checking disk18 – /dev/rdisk/disk18 or /dev/rtape/disk18_BEST not found – check skipped
checking disk19 – Minor numbers are probably incorrect
minor1=0x000017 (/dev/pt/pt_disk19) vs minor2=0x000013 (/dev/rdisk/disk19)
checking disk2 – OK
checking disk22 – Minor numbers are probably incorrect
minor1=0x000018 (/dev/pt/pt_disk22) vs minor2=0x000014 (/dev/rdisk/disk22)
checking disk23 – Minor numbers are probably incorrect
minor1=0x000019 (/dev/pt/pt_disk23) vs minor2=0x000015 (/dev/rdisk/disk23)
checking disk3 – OK
checking disk5 – OK
checking disk8 – /dev/rdisk/disk8 or /dev/rtape/disk8_BEST not found – check skipped
checking disk9 – /dev/rdisk/disk9 or /dev/rtape/disk9_BEST not found – check skipped

Correction procedure:

cd /var/opt/hpvm/common/

rm -f hpvm_devinit
cd /dev/pt
ls
rm -f *
hpvmdevmgmt -I

Consider this a necessary procedure to clean up after ignite replication

Tags: , , , , , , ,

18 May 10 swlist command to provide install date

New trick learned from HP support backline engineer.

swlist -l fileset -a revision -a title -a state -a install_date

———Sample output ——
# vmGuestLib B.04.00 Integrity VM vmGuestLib 200903081306.51
vmGuestLib.GUEST-LIB B.04.00 Integrity VM GUEST-LIB fileset 200903081306.51 configured
# vmProvider B.04.00 WBEM Provider for Integrity VM vmProvider 200903081306.59
vmProvider.VM-PROV-CORE B.04.00 WBEM Provider for Integrity VM VM-PROV-CORE 200903081306.59 configured

Tags: , , , , , , , ,

20 Oct 09 HP-UX Integrity Software mirror procedure

This was written by a former colleague. It is better than anything else I have seen. SEP

Mirroring a Boot Disk with LVM on HP-UX 11i for HP Integrity

Servers

The following diagram shows the disk layout of a boot disk. The disk

contains a Master Boot Record (MBR) and Extensible Firmware

Interface (EFI) partition tables that point to each of the partitions. The

idisk

command is used to create the partitions (see idisk (1M)).

Figure 6-5 Example LVM Disk Layout on HP Integrity Server

Before starting the procedure, make sure that add-on product HP

MirrorDisk/UX (B5403BA) is installed. This product is an extra-cost

product available on the HP-UX 11i application release media. For

example:

swlist -l fileset | grep -i mirror

LVM.LVM-MIRROR-RUN B.11.22 LVM Mirror

Step 1.

file.

Partition the disk using the idisk command and a partition description

a.

Create a partition description file. For example:

vi /tmp/idf

In this example the partition description file contains:

3

EFI 500MB

HPUX 100%

HPSP 400MB

NOTE

an EFI partition, an HP-UX partition, and an HP Service partition.

Boot disks of earlier HP Integrity Servers may have an EFI partition

of only 100MB and may not contain the HPSP partition.

The values in the example represent a boot disk with three partitions:

b.

Partition the disk using idisk and your partition description file:

idisk -f /tmp/idf -w /dev/rdsk/c3t1d0

c.

To verify you can run:

idisk /dev/rdsk/c3t1d0

Step 2.

the partitions. For example:

Use the insf command with the -e option to create the device files for all

insf -e -H 0/18/1/2/0.0.1.0

You should now have eight device files for this disk:

/dev/[r]dsk/c?t?d?

(This refers to the entire disk)

/dev/[r]dsk/c?t?d?s1

(This refers to the EFI partition)

/dev/[r]dsk/c?t?d?s2

(This will be the HP-UX partition)

/dev/[r]dsk/c?t?d?s3

(This refers to the Service partition)

Step 3.

disk:

Use pvcreate to make the HP-UX partition of the disk an LVMmanaged

pvcreate -B /dev/rdsk/c3t1d0s2

Step 4.

Add the disk to vg00:

vgextend vg00 /dev/dsk/c3t1d0s2

Step 5.

Place the boot files on the disk using mkboot:

mkboot -e -l /dev/rdsk/c3t1d0

Step 6.

Copy any autoboot file from the original boot disk to this one.

a.

partition to the current directory. Make sure to use the device file

with the

Use efi_cp to copy the AUTO file from the original boot disk’s EFIs1 suffix, as it refers to the EFI partition:

efi_cp -d /dev/rdsk/cntndns1 -u /efi/hpux/auto ./AUTO

b.

partition:

Copy the file from the current directory into the new disk’s EFI

efi_cp -d /dev/rdsk/c3t1d0s1 ./AUTO /efi/hpux/auto

Step 7.

volume group onto the desired physical volume. The logical volumes

must be extended in the same order that they are configured on the

original boot disk. Use the

determine the list of logical volumes and their order. For example:

Use the lvextend command to mirror each logical volume in the rootpvdisplay command with the -v option to

pvdisplay -v /dev/dsk/c0t0d0s2 | grep ’current.*0000$’

00000 current /dev/vg00/lvol1 00000

00038 current /dev/vg00/lvol2 00000

00550 current /dev/vg00/lvol3 00000

00583 current /dev/vg00/lvol4 00000

00608 current /dev/vg00/lvol5 00000

00611 current /dev/vg00/lvol6 00000

00923 current /dev/vg00/lvol7 00000

01252 current /dev/vg00/lvol8 00000

In this example, mirror the logical volumes as follows:

lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c3t1d0s2

lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c3t1d0s2

lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c3t1d0s2

lvextend -m 1 /dev/vg00/lv0l4 /dev/dsk/c3t1d0s2

lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c3t1d0s2

lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c3t1d0s2

lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c3t1d0s2

lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c3t1d0s2

If

lvextend fails with following message:

“m”: Illegal option

then HP MirrorDisk/UX is not installed.

Step 8.

Update the root volume group information:

lvlnboot -R /dev/vg00

Step 9.

disk and that the boot, root, and swap logical volumes appear to be on

both disks:

Display the BDRA. Verify that the mirrored disk is displayed as a boot

lvlnboot –v

Step 10.

Specify the mirror disk as the alternate boot path in nonvolatile memory:

setboot -a path_to_disk

Step 11.

text editor:

Add a line to /stand/bootconf for the new boot disk using vi or another

vi /stand/bootconf

l /dev/dsk/c3t1d0s2

where

l denotes LVM.

Tags: , , , , , , , ,

WhatsApp chat