1. Setup the disk partitions
Create a partition description file:
# vi /tmp/partitionfile
3
EFI 100MB
HPUX 100%
HPSP 400MB
2. Use the idisk(1M) command to partition the disk according to this file:
# idisk -wf /tmp/partitionfile /dev/rdsk/c2t0d0
idisk version: 1.44
********************** WARNING ***********************
If you continue you may destroy all data on this disk.
Do you wish to continue(yes/no)? yes
EFI Primary Header:
Signature = EFI PART
Revision = 0x10000
HeaderSize = 0x5c
HeaderCRC32 = 0x4ef8e40b
MyLbaLo = 0x1
MyLbaHi = 0x0
AlternateLbaLo = 0x88bb991
AlternateLbaHi = 0x0
FirstUsableLbaLo = 0x40
FirstUsableLbaHi = 0x0
LastUsableLbaLo = 0x88bb93f
LastUsableLbaHi = 0x0
Disk GUID = 68847bb2-3c12-11e0-8000-d6217b60e588
PartitionEntryLbaLo = 0x2
PartitionEntryLbaHi = 0x0
NumberOfPartitionEntries = 0xc
SizeOfPartitionEntry = 0x80
PartitionEntryArrayCRC32 = 0x60f72440
Primary Partition Table (in 512 byte blocks):
Partition 1 (EFI):
Partition Type GUID = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
Unique Partition GUID = 68847e78-3c12-11e0-8000-d6217b60e588
Starting Lba Lo = 0x40
Starting Lba Hi = 0x0
Ending Lba Lo = 0xf9fff
Ending Lba Hi = 0x0
Partition 2 (HP-UX):
Partition Type GUID = 75894c1e-3aeb-11d3-b7c1-7b03a0000000
Unique Partition GUID = 68847e96-3c12-11e0-8000-d6217b60e588
Starting Lba Lo = 0xfa000
Starting Lba Hi = 0x0
Ending Lba Lo = 0x87f3fff
Ending Lba Hi = 0x0
Partition 3 (HPSP):
Partition Type GUID = e2a1e728-32e3-11d6-a682-7b03a0000000
Unique Partition GUID = 68847eaa-3c12-11e0-8000-d6217b60e588
Starting Lba Lo = 0x87f4000
Starting Lba Hi = 0x0
Ending Lba Lo = 0x88bb93f
Ending Lba Hi = 0x0
EFI Alternate Header:
Signature = EFI PART
Revision = 0x10000
HeaderSize = 0x5c
HeaderCRC32 = 0x1ce467d8
MyLbaLo = 0x88bb991
MyLbaHi = 0x0
AlternateLbaLo = 0x1
AlternateLbaHi = 0x0
FirstUsableLbaLo = 0x40
FirstUsableLbaHi = 0x0
LastUsableLbaLo = 0x88bb93f
LastUsableLbaHi = 0x0
Disk GUID = 68847bb2-3c12-11e0-8000-d6217b60e588
PartitionEntryLbaLo = 0x88bb971
PartitionEntryLbaHi = 0x0
NumberOfPartitionEntries = 0xc
SizeOfPartitionEntry = 0x80
PartitionEntryArrayCRC32 = 0x60f72440
Alternate Partition Table (in 512 byte blocks):
Partition 1 (EFI):
Partition Type GUID = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
Unique Partition GUID = 68847e78-3c12-11e0-8000-d6217b60e588
Starting Lba Lo = 0x40
Starting Lba Hi = 0x0
Ending Lba Lo = 0xf9fff
Ending Lba Hi = 0x0
Partition 2 (HP-UX):
Partition Type GUID = 75894c1e-3aeb-11d3-b7c1-7b03a0000000
Unique Partition GUID = 68847e96-3c12-11e0-8000-d6217b60e588
Starting Lba Lo = 0xfa000
Starting Lba Hi = 0x0
Ending Lba Lo = 0x87f3fff
Ending Lba Hi = 0x0
Partition 3 (HPSP):
Partition Type GUID = e2a1e728-32e3-11d6-a682-7b03a0000000
Unique Partition GUID = 68847eaa-3c12-11e0-8000-d6217b60e588
Starting Lba Lo = 0x87f4000
Starting Lba Hi = 0x0
Ending Lba Lo = 0x88bb93f
Ending Lba Hi = 0x0
Legacy MBR (MBR Signatures in little endian):
MBR Signature = 0x4e7b8468
Protective MBR
3. Create device files needed for the new partitions.
# insf -eC disk
##Listing the new partitions
# ioscan -funNCdisk
Class I H/W Path Driver S/W State H/W Type Description
===================================================================
disk 35 64000/0xfa00/0x0 esdisk CLAIMED DEVICE HP 73.4GMAX3073NC
/dev/disk/disk35 /dev/disk/disk35_p2 /dev/rdisk/disk35 /dev/rdisk/disk35_p2
/dev/disk/disk35_p1 /dev/disk/disk35_p3 /dev/rdisk/disk35_p1 /dev/rdisk/disk35_p3
disk 36 64000/0xfa00/0x1 esdisk CLAIMED DEVICE HP 73.4GMAX3073NC
/dev/disk/disk36 /dev/disk/disk36_p2 /dev/rdisk/disk36 /dev/rdisk/disk36_p2
/dev/disk/disk36_p1 /dev/disk/disk36_p3 /dev/rdisk/disk36_p1 /dev/rdisk/disk36_p3
4. Verify the partition table.
# idisk /dev/rdsk/c2t0d0
# idisk /dev/rdsk/c2t0d0
idisk version: 1.44
EFI Primary Header:
Signature = EFI PART
Revision = 0x10000
HeaderSize = 0x5c
HeaderCRC32 = 0x4ef8e40b
MyLbaLo = 0x1
MyLbaHi = 0x0
AlternateLbaLo = 0x88bb991
AlternateLbaHi = 0x0
FirstUsableLbaLo = 0x40
FirstUsableLbaHi = 0x0
LastUsableLbaLo = 0x88bb93f
LastUsableLbaHi = 0x0
Disk GUID = 68847bb2-3c12-11e0-8000-d6217b60e588
PartitionEntryLbaLo = 0x2
PartitionEntryLbaHi = 0x0
NumberOfPartitionEntries = 0xc
SizeOfPartitionEntry = 0x80
PartitionEntryArrayCRC32 = 0x60f72440
Primary Partition Table (in 512 byte blocks):
Partition 1 (EFI):
Partition Type GUID = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
Unique Partition GUID = 68847e78-3c12-11e0-8000-d6217b60e588
Starting Lba Lo = 0x40
Starting Lba Hi = 0x0
Ending Lba Lo = 0xf9fff
Ending Lba Hi = 0x0
Partition 2 (HP-UX):
Partition Type GUID = 75894c1e-3aeb-11d3-b7c1-7b03a0000000
Unique Partition GUID = 68847e96-3c12-11e0-8000-d6217b60e588
Starting Lba Lo = 0xfa000
Starting Lba Hi = 0x0
Ending Lba Lo = 0x87f3fff
Ending Lba Hi = 0x0
Partition 3 (HPSP):
Partition Type GUID = e2a1e728-32e3-11d6-a682-7b03a0000000
Unique Partition GUID = 68847eaa-3c12-11e0-8000-d6217b60e588
Starting Lba Lo = 0x87f4000
Starting Lba Hi = 0x0
Ending Lba Lo = 0x88bb93f
Ending Lba Hi = 0x0
EFI Alternate Header:
Signature = EFI PART
Revision = 0x10000
HeaderSize = 0x5c
HeaderCRC32 = 0x1ce467d8
MyLbaLo = 0x88bb991
MyLbaHi = 0x0
AlternateLbaLo = 0x1
AlternateLbaHi = 0x0
FirstUsableLbaLo = 0x40
FirstUsableLbaHi = 0x0
LastUsableLbaLo = 0x88bb93f
LastUsableLbaHi = 0x0
Disk GUID = 68847bb2-3c12-11e0-8000-d6217b60e588
PartitionEntryLbaLo = 0x88bb971
PartitionEntryLbaHi = 0x0
NumberOfPartitionEntries = 0xc
SizeOfPartitionEntry = 0x80
PartitionEntryArrayCRC32 = 0x60f72440
Alternate Partition Table (in 512 byte blocks):
Partition 1 (EFI):
Partition Type GUID = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
Unique Partition GUID = 68847e78-3c12-11e0-8000-d6217b60e588
Starting Lba Lo = 0x40
Starting Lba Hi = 0x0
Ending Lba Lo = 0xf9fff
Ending Lba Hi = 0x0
Partition 2 (HP-UX):
Partition Type GUID = 75894c1e-3aeb-11d3-b7c1-7b03a0000000
Unique Partition GUID = 68847e96-3c12-11e0-8000-d6217b60e588
Starting Lba Lo = 0xfa000
Starting Lba Hi = 0x0
Ending Lba Lo = 0x87f3fff
Ending Lba Hi = 0x0
Partition 3 (HPSP):
Partition Type GUID = e2a1e728-32e3-11d6-a682-7b03a0000000
Unique Partition GUID = 68847eaa-3c12-11e0-8000-d6217b60e588
Starting Lba Lo = 0x87f4000
Starting Lba Hi = 0x0
Ending Lba Lo = 0x88bb93f
Ending Lba Hi = 0x0
Legacy MBR (MBR Signatures in little endian):
MBR Signature = 0x4e7b8468
Protective MBR
5. Verify that the device files were created properly.
# ioscan -efnC disk --> c2t0d0 is 0/1/1/0.0.0
6. Initialize the efi partition for use.
# efi_fsinit -d /dev/rdsk/c2t0d0s1
7. Populate the /efi/hpux/ directory in the new EFI system partition.
# mkboot -e -l /dev/rdsk/c2t0d0
##Here we can verify the contends.
# efi_ls -d /dev/rdsk/c2t0d0s1
FileName Last Modified Size
EFI/ 2/19/2011 0
startup.nsh 2/19/2011 296
total space 523218944 bytes, free space 520163328 bytes
8. Change the auto file for the mirror to boot without quorum.
NOTE: Using "s1"
# echo "boot vmunix -lq" > /tmp/AUTO.lq
# efi_cp -d /dev/rdsk/c2t0d0s1 /tmp/AUTO.lq /EFI/HPUX/AUTO
NOTE: We assume that if we boot from the primary, the mirror is fully
functional and therefore we don't need to override quorum. Your site
might require that both disks override quorum.
9. Verify the contents of the auto file on the primary and the mirror.
NOTE: Using "s1"
root@rx16-243 [/root]
# efi_cp -d /dev/rdsk/c2t1d0s1 -u /EFI/HPUX/AUTO /tmp/AUTO.pri
root@rx16-243 [/root]
# efi_cp -d /dev/rdsk/c2t0d0s1 -u /EFI/HPUX/AUTO /tmp/AUTO.sec
root@rx16-243 [/root]
# cat /tmp/AUTO.pri
boot vmunix
root@rx16-243 [/root]
# cat /tmp/AUTO.sec
boot vmunix -lq
10. Create PV and add the new partition to vg00.
NOTE: Using "s2"
# pvcreate -fB /dev/rdsk/c2t0d0s2
Physical volume "/dev/rdsk/c2t0d0s2" has been successfully created.
# vgextend vg00 /dev/dsk/c2t0d0s2
Volume group "vg00" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
11. Mirror all logical volumes in vg00.
NOTE: Using "s2"
for i in `vgdisplay -v vg00 |grep lv|awk -F\/ {'print $4'}`
do
echo "Extending $i"
lvextend -m 1 /dev/vg00/$i /dev/dsk/c2t0d0s2
done
##this is the exptected output.
Extending lvol1
lvextend: "MirrorCopies" parameter "1" must be larger than existing number "1".
Extending lvol2
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol2" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
Extending lvol3
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol3" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
Extending lvol4
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol4" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
Extending lvol5
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol5" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
Extending lvol6
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol6" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
Extending lvol7
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol7" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
Extending lvol8
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol8" has been successfully extended.
Volue Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
For checking the status of current sysncing. (Eg. For lvol6)
# lvdisplay -v /dev/vg00/lvol6|grep stale|wc -l
26
12. Add the new disk to /stand/bootconf.
NOTE: Using "s2"
# echo "l /dev/dsk/c2t0d0s2" >> /stand/bootconf
# cat /stand/bootconf
l /dev/disk/disk36_p2
l /dev/dsk/c2t0d0s2
13. Verify that the new disk was added to vg00, and the lv's are in sync.
# vgdisplay -v vg00
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 8
Open LV 8
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4329
VGDA 4
PE Size (Mbytes) 16
Total PE 8638
Alloc PE 4324
Free PE 4314
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 1.0
VG Max Size 1108224m
VG Max Extents 69264
--- Logical volumes ---
LV Name /dev/vg00/lvol1
LV Status available/syncd
LV Size (Mbytes) 1792
Current LE 112
Allocated PE 224
Used PV 2
LV Name /dev/vg00/lvol2
LV Status available/syncd
LV Size (Mbytes) 6144
Current LE 384
Allocated PE 768
Used PV 2
LV Name /dev/vg00/lvol3
LV Status available/syncd
LV Size (Mbytes) 1024
Current LE 64
Allocated PE 128
Used PV 2
LV Name /dev/vg00/lvol4
LV Status available/syncd
LV Size (Mbytes) 512
Current LE 32
Allocated PE 64
Used PV 2
LV Name /dev/vg00/lvol5
LV Status available/syncd
LV Size (Mbytes) 112
Current LE 7
Allocated PE 14
Used PV 2
LV Name /dev/vg00/lvol6
LV Status available/syncd
LV Size (Mbytes) 12096
Current LE 756
Allocated PE 1512
Used PV 2
LV Name /dev/vg00/lvol7
LV Status available/syncd
LV Size (Mbytes) 6256
Current LE 391
Allocated PE 782
Used PV 2
LV Name /dev/vg00/lvol8
LV Status available/syncd
LV Size (Mbytes) 6656
Current LE 416
Allocated PE 832
Used PV 2
--- Physical volumes ---
PV Name /dev/disk/disk36_p2
PV Status available
Total PE 4319
Free PE 2157
Autoswitch On
Proactive Polling On
PV Name /dev/dsk/c2t0d0s2
PV Status available
Total PE 4319
Free PE 2157
Autoswitch On
Proactive Polling On
14. Verify that the BDRA was updated properly. Take note of the HW paths for
step 15.
# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/disk/disk36_p2 -- Boot Disk
/dev/dsk/c2t0d0s2 -- Boot Disk
Boot: lvol1 on: /dev/disk/disk36_p2
/dev/dsk/c2t0d0s2
Root: lvol3 on: /dev/disk/disk36_p2
/dev/dsk/c2t0d0s2
Swap: lvol2 on: /dev/disk/disk36_p2
/dev/dsk/c2t0d0s2
Dump: lvol2 on: /dev/disk/disk36_p2, 0
15. Add EFI primary and high availability boot path menu entries.
# ioscan -funCdisk|more
Class I H/W Path Driver S/W State H/W Type Description
=======================================================================
disk 2 0/0/2/0.0.0.0 sdisk CLAIMED DEVICE _NEC DVD+-RW ND-6650A
/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0
disk 0 0/1/1/0.0.0 sdisk CLAIMED DEVICE HP 73.4GMAX3073NC
/dev/dsk/c2t0d0 /dev/dsk/c2t0d0s2 /dev/rdsk/c2t0d0 /dev/rdsk/c2t0d0s2
/dev/dsk/c2t0d0s1 /dev/dsk/c2t0d0s3 /dev/rdsk/c2t0d0s1 /dev/rdsk/c2t0d0s3
disk 1 0/1/1/0.1.0 sdisk CLAIMED DEVICE HP 73.4GMAX3073NC
/dev/dsk/c2t1d0 /dev/dsk/c2t1d0s2 /dev/rdsk/c2t1d0 /dev/rdsk/c2t1d0s2
/dev/dsk/c2t1d0s1 /dev/dsk/c2t1d0s3 /dev/rdsk/c2t1d0s1 /dev/rdsk/c2t1d0s3
# setboot -p 0/1/1/0.1.0 <-- Set primary disk
# setboot -h 0/1/1/0.0.0 <-- Set mirror disk
# setboot -b on <-- Set autoboot on
16. Verify that the primary and mirror boot paths are configured properly.
# setboot
Primary bootpath : 0/1/1/0.0x1.0x0 (/dev/rdisk/disk36)
HA Alternate bootpath : 0/1/1/0.0x0.0x0 (/dev/rdisk/disk35)
Alternate bootpath : 0/1/1/0.0x0.0x0 (/dev/rdisk/disk35)
Autoboot is ON (enabled)
17. Test the new mirror by booting off of it.
# shutdown -r -y 0
18. Select "HP-UX HA Alternate Boot" to test the mirror while EFI Display below messages.
Please select a boot option
HP-UX Primary Boot: 0/1/1/0.0x1.0x0
HP-UX HA Alternate Boot: 0/1/1/0.0x0.0x0
HP-UX Alternate Boot: 0/1/1/0.0x0.0x0
EFI Shell [Built-in]
Boot Option Maintenance Menu
System Configuration
Use ^ and v to change option(s). Use Enter to select an option
Scsi(Pun0,Lun0) HP 73.4GMAX3073NC HPC1 (320 MBytes/sec)
Loading.: HP-UX HA Alternate Boot: 0/1/1/0.0x0.0x0
Starting: HP-UX HA Alternate Boot: 0/1/1/0.0x0.0x0
(C) Copyright 1999-2009 Hewlett-Packard Development Company, L.P.
All rights reserved
HP-UX Boot Loader for IPF -- Revision 2.039
Press Any Key to interrupt Autoboot
\EFI\HPUX\AUTO ==> boot vmunix -lq
Seconds left till autoboot - 8
20. Verify which disk/kernel you booted from.
# grep "Boot device" /var/adm/syslog/syslog.log
Feb 19 06:18:41 rx16-243 vmunix: Boot device's HP-UX HW path is: 0.1.1.0.0.0
21. Remove temporary files.
# rm /tmp/partitionfile /tmp/AUTO*
No comments:
Post a Comment