Operating System - HP-UX
1833883 Members
1668 Online
110063 Solutions
New Discussion

Re: root mirroring in itanium

 
aneez
Regular Advisor

root mirroring in itanium

hi all,
i am facing a problem in itanium root disk replacement.i done the mirroring as per the document.but when i am looking for the efi directoris its not showing any directories. 1. Use vi to create a partition description file by doing the following:

# vi /tmp/partitionfile
3
EFI 500MB
HPUX 100%
HPSP 400MB
2. Use idisk to setup the disk partitioning using the file created above:

# idisk -wf /tmp/partitionfile /dev/rdsk/cXtXdX



3. Use insf to create the new device dfiles (cXtXdXs1, cXtXdX2 and cXtXdXs3)

# insf -e


4. Use mkboot to format and populate the newly created EFI partition:

# mkboot -e -l /dev/dsk/cXtXdX



D) Use standard LVM commands to restore the mirror information. For root
disks, be careful to specify the s2 device file (cXtXdXs2) when
performing LVM commands.

# vgcfgrestore -n vg00 /dev/rdsk/cXtXdXs2
# vgchange -a y vg00
# vgsync vg00
# 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

# lvlnboot -v (to verify the results)
# vgdisplay -v /dev/vgxx (to verify the results)


E) Modify the contents of NVRAM using the setboot(1M) command.

If an EFI boot option entry (held in NVRAM) exists for the replaced disk,
it is still linked to the old disk GUID. Use setboot with the appropriate
option and argument to modify NVRAM and point it to the replacement disk.

For Primary boot disk:

setboot -p

and for alternate boot disk:


setboot -a


but if in this not mentioned any efi directories and files.
pls tell me the correct procedure for the efi partition when i am trying
#efi_ls -d /dev/rdsk/c2t1d0s1
its giving not found any EFI directory

i am waiting for your valuable replies
Aneez
7 REPLIES 7
Steven E. Protter
Exalted Contributor

Re: root mirroring in itanium

Shalom,

I see one problem.

insf -e -C disk

Creates disk devices

By itself insf -e does not help you.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ivan Krastev
Honored Contributor

Re: root mirroring in itanium

For full procedure see - http://www5.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000082066576

Doc ID is KBRC00014526


regards,
ivan
aneez
Regular Advisor

Re: root mirroring in itanium

hi
that was correct i missed that. but in ioscan its showing three properly.
cxtxdxs1
cxtxdxs2
cxtxdxs3
please its only because of that insf -e

thanks
Aneez


Andrew Rutter
Honored Contributor

Re: root mirroring in itanium

hi,

A couple of points

1, you havent listed pvcreate commands

2, I always prefer to initialize the efi fat partition first aswell, before mkboot

3, to set hardware boot paths on 11.23 you use setboot -h for alt mirror

check this doc i use for mirroring itaniums

Andy

paolo barila
Valued Contributor

Re: root mirroring in itanium

Hi,

imo you missed

Write content of AUTO file to EFI partition:
# mkboot -a "boot vmunix -lq" /dev/rdsk/cxtydz

# efi_cp -d /dev/rdsk/cxtydzs1 -u /EFI/HPUX/AUTO /tmp/x; cat /tmp/x
(to check it)

NOTE: Specifing -a â boot vmunix -lqâ the system boots up without interruption in case of a disk failure.

Initialize the LVM partition (s2) and add it to vg00:

# vgreduce /dev/vg00 /dev/dsk/cxtydz

# pvcreate -f -B /dev/rdsk/cxtydzs2 (take care to use s2)

# vgextend vg00 /dev/dsk/cxtydzs2

Pablo

share share share
Geoff Wild
Honored Contributor

Re: root mirroring in itanium

Here's how I do it:

The following procedure shows how to mirror the root disk. Let c1t0d0 be the existing primary disk and c2t1d0 the new mirror boot disk:

Use idisk(1M) command to partition the disk according to this file:

# idisk -wf /tmp/partitionfile /dev/rdsk/c2t1d0

idisk version: 1.2

********************** WARNING ***********************

If you continue you may destroy all data on this disk.

Do you wish to continue(yes/no)? yes

...

1) Setup the disk partitions

At a cold-installed UX 11.23 system the partition sizes are different compared to UX 11.22. Use idisk(1M) to check the partition sizes. E.g. for a UX 11.23 system you would get:

# diskinfo /dev/rdsk/c1t0d0s1 | grep size

size: 512000 Kbytes

# diskinfo /dev/rdsk/c1t0d0s3 | grep size

size: 409600 Kbytes

Create a partition description file:

2) Create the new device files for the new partitions (c2t1d0s1, s2, (s3))

# insf -e -Cdisk

3) Use efi_fsinit(1M) to initialize the FAT filesystem on the EFI partition:

# efi_fsinit -d /dev/rdsk/c2t1d0s1

NOTE: This step is not neccessary if it can be guaranteed that the mirror disk does not contain a valid EFI filesystem. In this case efi_fsinit(1M) will be done automatically by the subsequent mkboot(1M) command. But if you take e.g. an old UX 11.22 boot disk as mirror disk, mkboot will not automatically run efi_fsinit. As a result only 100MB of the 500MB EFI partition (s1) can be used.

4) Use mkboot(1M) to format the EFI partition (s1) and populate it with the EFI files below /usr/lib/efi/ and to format the LIF volume (part of s2) and populate it with the LIF files (ISL, AUTO, HPUX, LABEL) below /usr/lib/uxbootlf:

# mkboot -e -l /dev/rdsk/c2t1d0

# efi_ls -d /dev/rdsk/c2t1d0s1 (to check EFI)

FileName Last Modified Size

EFI/ 11/ 5/2003 0

STARTUP.NSH 11/ 5/2003 296



at UX 11.22:
at UX 11.23 (cold-installed)

# vi /tmp/partitionfile

2

EFI 100MB

HPUX 100%
# vi /tmp/partitionfile

3

EFI 500MB

HPUX 100%

HPSP 400MB











total space 523251712 bytes, free space 520073216 bytes

# lifls -l /dev/rdsk/c2t1d0s2 (to check LIF)

5) Check the content of AUTO file on EFI partition:

# efi_cp -d /dev/rdsk/c2t1d0s1 -u /EFI/HPUX/AUTO /tmp/x; cat /tmp/x

NOTE: Specify the -lq option if prefer that your system boots up without interruption in case of a disk failure:

# mkboot -a "boot vmunix -lq" /dev/rdsk/c2t1d0

# mkboot -a "boot vmunix -lq" /dev/rdsk/c1t0d0

6) Copy the HP service partition (UX 11.23 only): (skip this, if you donâ t have a service partition)

# dd if=/dev/rdsk/c1t0d0s3 of=/dev/rdsk/c2t1d0s3 bs=1024k

7a) LVM only:

â ¢ Initialize the LVM partition (s2) and add it to vg00:

# pvcreate [-f] â B /dev/rdsk/c2t1d0s2 (take care to use s2)

# vgextend vg00 /dev/dsk/c2t1d0s2

â ¢ Mirror the LVs to the s2 partition:

# for i in lvol1 lvol2 ... lvol8 (specify each LV)

> do lvextend -m 1 /dev/vg00/$i /dev/dsk/c2t1d0s2

> done

â ¢ Check if content of LABEL file (i.e. root, boot, swap and dump device definition) has been initialized (done by lvextend) on the mirror disk:

# lvlnboot -v Boot Definitions for Volume Group /dev/vg00:

Physical Volumes belonging in Root Volume Group:

/dev/dsk/c1t0d0s2 (0/1/1/1.2.0) -- Boot Disk

/dev/dsk/c2t1d0s2 (0/1/1/0.1.0) -- Boot Disk

Boot: lvol1 on: /dev/dsk/c1t0d0s2

/dev/dsk/c2t1d0s2

Root: lvol3 on: /dev/dsk/c1t0d0s2

/dev/dsk/c2t1d0s2

Swap: lvol2 on: /dev/dsk/c1t0d0s2

/dev/dsk/c2t1d0s2

Dump: lvol2 on: /dev/dsk/c1t0d0s2, 0

If not, then set it:

# lvlnboot -r /dev/vg00/lvol3

# lvlnboot -b /dev/vg00/lvol1

# lvlnboot -s /dev/vg00/lvol2

# lvlnboot -d /dev/vg00/lvol2

7b) VxVM only:

â ¢ Have VxVM see the new c2t1d0s2 disk:







# vxdctl enable

â ¢ Confirm that you can see the new disk as â online invalidâ :

# vxdisk list

â ¢ Mirror the root disk. This may take some time:

# /etc/vx/bin/vxrootmir -v c2t1d0s2

â ¢ Verify that all volumes are mirrored:

# vxprint -g rootdg

8) Specify the mirrored disk as alternate bootpath

# setboot â a # setboot â h (for UX 11.23 use the HA alternate)

# setboot (to check it)

9) Create an EFI boot option (UX 11.22 only; done by setboot for UX 11.23)

Finally it is a good idea to set a EFI boot option for the mirror disk. This boot option will be stored in NVRAM: Boot to EFI and enter the Boot maintenance manager menu:

EFI Boot Maintenance Manager ver 1.10 [14.61]

Main Menu. Select an Operation

Boot from a File

Add a Boot Option _

Delete Boot Option(s)

Change Boot Order

Manage BootNext setting

Set Auto Boot TimeOut

Select Active Console Output Devices

Select Active Console Input Devices

Select Active Standard Error Devices

Cold Reset

Exit

Select the mirror disk (Pun1,Lun0) represents SCSI target 1, Lun 0 (c2t1d0) in our case. (Pun0,Lun0) is the original boot disk (c1t0d0)

EFI Boot Maintenance Manager ver 1.10 [14.61]

Add a Boot Option. Select a Volume

IA64_EFI [Acpi(HWP0002,100)/Pci(1|0)/Scsi(Pun1,Lun0)/HD (Part1,SigB45A0000)

IA64_EFI [Acpi(HWP0002,100)/Pci(1|1)/Scsi(Pun0,Lun0)/HD (Part1,Sig958B0000)

EFI DISK [Acpi(HWP0002,600)/Pci(1|0)/Pci(0|0)/Pci(0|0)/Pci(0|0)/ Scsi(Pun0,Lun0)/HD(Part1,Sig119E1A60-0B4C-01C3-507B-9E5F8078F531)

Removable Media Boot [Acpi(HWP0002,0)/Pci(2|0)/Ata(Primary,Master

Load File [EFI Shell [Built-in]]





Load File [Acpi(HWP0002,0)/Pci(3|0)/Mac(00306E3809C6)]

Load File [Acpi(HWP0002,100)/Pci(2|0)/Mac(00306E3889E3)]

Exit

Now navigate to the HP-UX bootloader HPUX.EFI on the disk:

EFI Boot Maintenance Manager ver 1.10 [14.61]

Select file or change to new directory:

05/28/03 09:38a 512 EFI _

[Treat like Removable Media Boot]

Exit

Select file or change to new directory:

05/28/03 09:38a 512 .

05/28/03 09:38a 0 ..

05/28/03 09:38a 512 HPUX _

05/28/03 09:38a 512 Intel_Firmware

05/28/03 09:38a 512 DIAG

05/28/03 09:38a 512 HP

05/28/03 09:38a 512 TOOLS

Exit

Select file or change to new directory:

05/28/03 09:38a 512 .

05/28/03 09:38a 512 ..

05/28/03 11:52a 419,545 HPUX.EFI _

05/28/03 11:52a 24,576 NBP.EFI

Exit

Filename: \EFI\HPUX\HPUX.EFI

DevicePath:[Acpi(HWP0002,100)/Pci(1|0)/Scsi(Pun1,Lun0)/HD(Part1,SigB45A0000)/\EF I\HPUX\HPUX.EFI]

IA-64 EFI Application 05/28/03 11:52a 419,545 bytes

BootFFFF: Acpi(HWP0002,100)/Pci(1|0)/Scsi(Pun1,Lun0)/HD(Part1,SigB45A0000)/\EFI\HPUX\HPUX.EFI

Now enter a description for this boot option, e.g. HP-UX mirror boot disk:

Enter Description: HP-UX mirror boot disk

Current BootOption-->Main Menu. Select an Operation

New BootOption Data. ASCII/Unicode strings only, with max of 240 characters

Enter BootOption Data Type [A-Ascii U-Unicode N-No BootOption] : N

Finally save the setting to NVRAM:

Save changes to NVRAM [Y-Yes N-No]: Y

10) Try to boot from the mirror disk by choosing the appropriate boot option.



Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Raj D.
Honored Contributor

Re: root mirroring in itanium

Aneez,
Do a pvcreate on the 2nd disk, and start from the scratch.
# efi_ls -d /dev/rdsk/c2t1d0s1
Is fine , and should work.

Good luck.
Raj.
" If u think u can , If u think u cannot , - You are always Right . "