Operating System - HP-UX
1830366 Members
2247 Online
110001 Solutions
New Discussion

How to setup mirrordisk/ux

 
Achilles_2
Regular Advisor

How to setup mirrordisk/ux

Folks,
I have already installed MirrorDisk/UX 11.23 on my HP-UX 11.23 system and now I want to create the mirrors.
I have outlined the steps that I think I need to take below. Have I missed anything? Is there anything in the steps that are not necessary?
Thanks

# ioscan -fnC disk
Class I H/W Path Driver S/W State H/W Type Description
============================================================================
disk 0 0/0/2/0.0.0.0 sdisk CLAIMED DEVICE TEAC DV-28E-C
/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0
disk 1 0/1/1/0.0.0 sdisk CLAIMED DEVICE HP 36.4GST336753LC
/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 2 0/1/1/0.1.0 sdisk CLAIMED DEVICE HP 36.4GST336753LC
/dev/dsk/c2t1d0 /dev/rdsk/c2t1d0

Note: c2t0d0 is the boot disk and c2t1d0 is the mirrored disk.

1) Initialize the disk and make it bootable
pvcreate -B /dev/rdsk/c2t1d0
Note: the -B parameter tells pvcreate that this will be a bootable disk.

2) Add the physical volume to the volume group
vgextend /dev/vg00 /dev/dsk/c2t1d0

3) Use mkboot to place the boot utilities in the boot area and add the AUTO file.
mkboot /dev/dsk/c2t1d0
mkboot -a "hpux -lq" /dev/rdsk/c2t1d0

4) Use mkboot to update the AUTO file on the primary boot disk.
mkboot -a "hpux -lq" /dev/rdsk/c2t0d0

5) Mirror the stand, root and swap logical volumes
lvextend -m 1 /dev/vg00/lvol1
lvextend -m 1 /dev/vg00/lvol2
lvextend -m 1 /dev/vg00/lvol3

Note: LVM will resynchronize the new mirror copies.

Repeat the lvextend for all other logical volumes on the boot mirror.
lvextend -m 1 /dev/vg00/lvol4
lvextend -m 1 /dev/vg00/lvol5
lvextend -m 1 /dev/vg00/lvol6
lvextend -m 1 /dev/vg00/lvol7
lvextend -m 1 /dev/vg00/lvol8

6) Modify the alternate boot path to point to the mirror copy of the boot disk.
Note: Use the Hardware path for the new boot disk.
setboot -a 0/1/1/0.1.0
5 REPLIES 5
RAC_1
Honored Contributor

Re: How to setup mirrordisk/ux

The procedure is different from the procedure on 11i v1.

1. From HPUX, use vgdisplay to identify the disk that is in vg00. Use ioscan
to
find the spare disk.
# vgdisplay -v --> vg00 is on /dev/dsk/c2t1d0s2 in this example
# ioscan -efunC disk --> Let's assume c3t2d0 for this example

2. Create the system, OS, and service partitions.
# vi /tmp/partitionfile
3
EFI 500MB
HPUX 100%
HPSP 400MB
# idisk -wf /tmp/partitionfile /dev/rdsk/c3t2d0
idisk version: 1.31
********************** WARNING ***********************
If you continue you may destroy all data on this disk.
Do you wish to continue(yes/no)? yes <-- Answer "yes" and not "y"

3. Create device files needed for the new partitions.
# insf -eC disk

4. Verify the partition table.
# idisk /dev/rdsk/c3t2d0

5. Verify that the device files were created properly.
# ioscan -efnC disk --> c3t2d0 is 0/1/1/1.2.0

6. Populate the /efi/hpux/ directory in the new EFI system partition.
# mkboot -e -l /dev/rdsk/c3t2d0

7. 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/c3t2d0s1 /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"
# efi_cp -d /dev/rdsk/c2t1d0s1 -u /EFI/HPUX/AUTO /tmp/AUTO.pri
# efi_cp -d /dev/rdsk/c3t2d0s1 -u /EFI/HPUX/AUTO /tmp/AUTO.alt
# cat /tmp/AUTO.pri
# cat /tmp/AUTO.alt

10. Add the new partition to vg00.
NOTE: Using "s2"
# pvcreate -fB /dev/rdsk/c3t2d0s2
# vgextend vg00 /dev/dsk/c3t2d0s2

11. Mirror all logical volumes in vg00.
NOTE: Using "s2"
# lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c3t2d0s2
# lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c3t2d0s2
# lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c3t2d0s2
.
.
.
# lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c3t2d0s2

12. Add the new disk to /stand/bootconf.
NOTE: Using "s2"
# vi /stand/bootconf
l /dev/dsk/c2t1d0s2
l /dev/dsk/c3t2d0s2

13. Verify that the new disk was added to vg00, and the lv's are in sync.
# vgdisplay -v vg00

14. Verify that the BDRA was updated properly. Take note of the HW paths for
step 15.
# lvlnboot -v

15. Add EFI primary and high availability boot path menu entries.
# setboot -p 0/1/1/0.1.0 <-- Set primary disk
# setboot -h 0/1/1/1.2.0 <-- Set mirror disk
# setboot -b on <-- Set autoboot on

16. Verify that the primary and mirror boot paths are configured properly.
# setboot

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.
EFI Boot Manager ver 1.10 [14.61] Firmware ver 2.21 [4334]
Please select a boot option
HP-UX Primary Boot: 0/1/1/0.1.0
HP-UX HA Alternate Boot: 0/1/1/1.2.0
EFI Shell [Built-in]

20. Verify which disk/kernel you booted from.
# grep "Boot device" /var/adm/syslog/syslog.log
vmunix: Boot device's HP-UX HW path is: 0.1.1.1.2.0

21. Remove temporary files.
# rm /tmp/partitionfile /tmp/AUTO*
There is no substitute to HARDWORK
Hoang Chi Cong_1
Honored Contributor

Re: How to setup mirrordisk/ux

Hi

See on the attachment. The steps was logged when I setup mirror disk in my system (Itanum)

Best and regard,
Hoang Chi Cong
Looking for a special chance.......
Shameer.V.A
Respected Contributor

Re: How to setup mirrordisk/ux

Hi Achilles ,

Please follow the following precodure.. Please refer the attached document for more reference.

+++++++++++++++++++++++++++++++++++++++++++++

To mirror the root file system, add a bootable LVM disk. Create a physical volume
using pvcreate with the -B option.

In this example lets take new disk as c0t5d0( in which we want to create mirror)

# pvcreate -B /dev/rdsk/c0t5d0

Add the physical volume to the existing root volume group with vgextend:

# vgextend /dev/vg00 /dev/dsk/c0t5d0

Use mkboot to place boot utilities in the boot area:

# mkboot -l /dev/rdsk/c0t5d0

use the -lq option to allow the system to boot in the event that one of the disks is
unavailable, resulting in a loss of quorum.

# mkboot -a "hpux -lq" /dev/rdsk/c0t5d0

NOTE: Use the -lq option when the root volume group contains only 2 disks. If more than
2 disks are in the root volume group, the -lq option is not needed as quorum will be
maintained even if 1 disk fails.

Check the contents of the AUTO file with

# lifcp /dev/rdsk/c0t5d0:AUTO -

Alternatively, one could set the alternate boot path variable according to e.g.

# setboot -a 8/0/19/0.5.0

The hardware address of the disk that will become the mirror disk can be determined with
'ioscan -fnC' disk. To check use setboot without any arguments.

Use pvdisplay -v to the order of the logical volumes on the primary disk.

# pvdisplay -v /dev/dsk/c0t6d0

NOTE: In the following, the standard sequence lvol1, lvol2, lvol3, and so forth,
is assumed.

Mirror the boot logical volume, primary swap logical volume, root logical volume
and other logical volumes as needed, to the mirror disk in the correct sequence

**** do lvextend one by one for vg00 ( os disk) and maintan a sequence is must
like fist lvol1 then lvol2 then lvol3 and lvol4 upto last lvol in vg00 group)

# lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c0t5d0
# lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c0t5d0
# lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c0t5d0
# lvextend -m 1 (additional LV)

Use pvdisplay -v to the order of the logical volumes on the mirror disk to insure they are in the correct order.

# pvdisplay -v /dev/dsk/c0t5d0

Update all physical volumes in the volume group so that the logical volume become the root, boot, primary swap, or a dump volume when the system is next booted:

For HP-UX 11.X

# lvlnboot -r /dev/vg00/lvol3 /dev/vg00
# lvlnboot -b /dev/vg00/lvol1 /dev/vg00
# lvlnboot -s /dev/vg00/lvol2 /dev/vg00
# lvlnboot -d /dev/vg00/lvol2 /dev/vg00

Check with # lvlnboot -v

Installation of Offline Diagnostics (ODE) on Mirrored Boot Disks

There is an easy way to install the ODE to the mirror if you have already installed
the OnlineDiag bundle.

Check the existence of the updatediaglif file:

List the contents of the LIF directory of the mirror:

# lifls -l /dev/rdsk/c0t5d0

volume ISL10 data size 7984 directory size 8 96/05/28 04:10:13
filename type start size implement created
===============================================================
ISL -12800 584 240 0 96/05/28 04:10:13
AUTO -12289 824 1 0 96/05/28 04:10:13
HPUX -12928 832 848 0 96/05/28 04:10:13
PAD -12290 1680 1652 0 96/05/28 04:10:14
LABEL BIN 3336 8 0 99/01/25 06:00:41

Install the ODE LIF files with mkboot and protect (-p) the existing LIF files
which you detected with lifls as described above, e.g.:


For 11.11 64-bit use the updatediaglif2 file:
# mkboot -b /usr/sbin/diag/lif/updatediaglif2 \
-p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c0t5d0

Check with # lifls /dev/rdsk/c0t5d0

One will find additional LIF files, e.g.

ODE MAPFILE SYSLIB CONFIGDATA SLMOD
SLDEV SLDRIVERS SLSCSI MAPPER IOTEST
PERFVER PVCU SSINFO ISL HPUX
AUTO PAD LABEL


++++++++++++++++++++++++++++++++++++++++++

Hope this will help you..

Regards

Shameer
.... See invisible, feel intangible and achieve impossible as everything is possible ....
Adisuria Wangsadinata_1
Honored Contributor

Re: How to setup mirrordisk/ux

Hi Achilles,

Please check the url below (docID : KBRC00014526) about 'How to mirror vg00 using LVM on IA with 11.23' :

http://www1.itrc.hp.com/service/cki/search.do?docType=all&searchString=KBRC00014526&admit=-682735245+1138339700380+28353475&mode=id

The document can find also on the attach file.

Hope this information can help you.

Cheers,
AW
now working, next not working ... that's unix
Adisuria Wangsadinata_1
Honored Contributor

Re: How to setup mirrordisk/ux

Hi Achilles,

Please check the url below (docID : KBRC00014526) about 'How to mirror vg00 using LVM on IA with 11.23' :

http://www1.itrc.hp.com/service/cki/search.do?docType=all&searchString=KBRC00014526&admit=-682735245+1138339700380+28353475&mode=id

The document can find also on the attach file.

Hope this information can help you.

Cheers,
AW
now working, next not working ... that's unix