Operating System - HP-UX
1833777 Members
2136 Online
110063 Solutions
New Discussion

Replace Mirror Disk Boot HPUX 11.23

 
SOLVED
Go to solution
Miguel Carabano_1
Regular Advisor

Replace Mirror Disk Boot HPUX 11.23

Hi,

I need know who resync Mirror Disk Boot in hpux 11.23

Procedure step by step

Thanks

Miguel
6 REPLIES 6
James R. Ferguson
Acclaimed Contributor

Re: Replace Mirror Disk Boot HPUX 11.23

Geoff Wild
Honored Contributor
Solution

Re: Replace Mirror Disk Boot HPUX 11.23

On parisc or Itanium?

parisc:

After failed disk has been replaced by HP (assuming the disk is c1t5d0):

vgcfgrestore -n /dev/vg00 /dev/rdsk/c1t5d0

mkboot /dev/rdsk/c1t5d0

mkboot -a "hpux -lq (;0) /stand/vmunix" /dev/rdsk/c1t5d0

vgchange -a y /dev/vg00

lvlnboot -Rv /dev/vg00

vgsync /dev/vg00

Or:


Build from scratch:

Say /dev/dsk/c0t6d0 is the root disk and /dev/dsk/c3t6d0 is the disk you want to make a mirror of.

1. Create a bootable LVM disk to be used for the mirror.
pvcreate -B /dev/rdsk/c3t6d0
2. Add this disk to the current root volume group.
vgextend /dev/vg00 /dev/dsk/c3t6d0
3. Make the new disk a boot disk.
mkboot -l /dev/rdsk/c3t6d0
4. Copy the correct AUTO file into the new LIF area.
mkboot -a "hpux -lq (;0)/vmunix" /dev/rdsk/c3t6d0
5. Mirror the boot, root and primary swap logical volumes to the new
bootable disk. Ensure that all devices in vg00, such as /usr, /swap,
etc., are mirrored.
The following is an example of mirroring the boot logical volume:
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c3t6d0
The following is an example of mirroring the primary swap logical
volume:
lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c3t6d0
The following is an example of mirroring the root logical volume:
lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c3t6d0
6. Update the boot information contained in the BDRA for the mirror
copies of boot, primary swap and root.
/usr/sbin/lvlnboot -b /dev/vg00/lvol1
/usr/sbin/lvlnboot -s /dev/vg00/lvol2
/usr/sbin/lvlnboot -r /dev/vg00/lvol3
7. Check if the BDRA is correct.
/usr/sbin/lvlnboot -R /dev/vg00
8. Verify that the mirrors were properly created.
lvlnboot -v /dev/vg00
The output of this command is shown in a display like the following:
Boot Definitions for Volume Group /dev/vg00:
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c0t6d0 (1/0/0/3/0.6.0) -- Boot Disk
/dev/dsk/c3t6d0 (1/0/1/0/0/1/1.6.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c0t6d0
/dev/dsk/c3t6d0
Root: lvol3 on: /dev/dsk/c0t6d0
/dev/dsk/c3t6d0
Swap: lvol2 on: /dev/dsk/c0t6d0
/dev/dsk/c3t6d0
Dump: lvol2 on: /dev/dsk/c0t6d0, 0

vgdisplay -v vg00

Then lvextend for all other lvols:

lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol9 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol10 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol11 /dev/dsk/c3t6d0


Itanium:

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.
Steven E. Protter
Exalted Contributor

Re: Replace Mirror Disk Boot HPUX 11.23

Shalom Miguel,

lvsynch /dev/vg00/lvol3

Use a real lvol name.

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
Steven E. Protter
Exalted Contributor

Re: Replace Mirror Disk Boot HPUX 11.23

That was not the whole post.

The actual question to synch the volumes, the answer is correct.

But the question title indicates the need for the full procdure, found here.

http://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad.pdf

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
Miguel Carabano_1
Regular Advisor

Re: Replace Mirror Disk Boot HPUX 11.23

System:

HP-UX morpr104 B.11.23 U ia64 1453051071 unlimited-user license

But:
#strings /etc/lvmtab
/dev/vg00
/dev/dsk/c0t6d0s2
/dev/dsk/c2t6d0s2
#lvlnboot -v /dev/vg00
lvlnboot: Couldn't query physical volume "/dev/dsk/c0t6d0s2":
The specified path does not correspond to physical volume attached to
this volume group
#vgdisplay -v vg00
vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c0t6d0s2":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 10
Open LV 10
Max PV 16
Cur PV 2
Act PV 1
Max PE per PV 4384
VGDA 2
PE Size (Mbytes) 16
Total PE 4318
Alloc PE 2624
Free PE 1694
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c0t6d0s2":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
--- Logical volumes ---
LV Name /dev/vg00/lvol1
LV Status available/stale
LV Size (Mbytes) 1024
Current LE 64
Allocated PE 128
Used PV 1

vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c0t6d0s2":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
LV Name /dev/vg00/lvol2
LV Status available/stale
LV Size (Mbytes) 10240
Current LE 640
Allocated PE 1280
Used PV 1

vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c0t6d0s2":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
LV Name /dev/vg00/lvol9
LV Status available/stale
LV Size (Mbytes) 10240
Current LE 640
Allocated PE 1280
Used PV 1

vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c0t6d0s2":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
LV Name /dev/vg00/lvol3
LV Status available/stale
LV Size (Mbytes) 1024
Current LE 64
Allocated PE 128
Used PV 1

vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c0t6d0s2":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
LV Name /dev/vg00/lvol4
LV Status available/stale
LV Size (Mbytes) 1024
Current LE 64
Allocated PE 128
Used PV 1

vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c0t6d0s2":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
LV Name /dev/vg00/lvol5
LV Status available/stale
LV Size (Mbytes) 1024
Current LE 64
Allocated PE 128
Used PV 1

vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c0t6d0s2":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
LV Name /dev/vg00/lvol6
LV Status available/stale
LV Size (Mbytes) 4096
Current LE 256
Allocated PE 512
Used PV 1

vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c0t6d0s2":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
LV Name /dev/vg00/lvol7
LV Status available/stale
LV Size (Mbytes) 4096
Current LE 256
Allocated PE 512
Used PV 1

vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c0t6d0s2":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
LV Name /dev/vg00/lvol8
LV Status available/stale
LV Size (Mbytes) 3072
Current LE 192
Allocated PE 384
Used PV 1

vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c0t6d0s2":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
LV Name /dev/vg00/lvol10
LV Status available/stale
LV Size (Mbytes) 6144
Current LE 384
Allocated PE 768
Used PV 1


--- Physical volumes ---
PV Name /dev/dsk/c2t6d0s2
vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c0t6d0s2":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
PV Status available
Total PE 4318
Free PE 1694
Autoswitch On

The bag disk is /dev/dsk/c2t6d0
Miguel Carabano_1
Regular Advisor

Re: Replace Mirror Disk Boot HPUX 11.23

Thanks for help.

Regards,

Miguel