HPUX Itanium: replace mirrored boot disk

HPUX Itanium: replace mirrored boot disk

HPUX Itanium: replace mirrored boot disk 150 150 Roderick Derks

[ELITIL] ELITIL2: / # uname -a
HP-UX ELITIL2 B.11.23 U ia64 0686319827 unlimited-user license

[ELITIL] ELITIL2: / # model
ia64 hp server rx4640

To see which hardwarepath is connected to which scsi address (and to see if Unix has CLAIMED the device, that is loaded a driver for it):
[ELITIL] ELITIL2: / # ioscan -fnC disk

 

You can dd to verify which physical disk is which,i.e.
[ELITIL] ELITIL2: / # dd if=/dev/dsk/c3t0d0 of=/dev/null bs=1024
will hit the good disk (in this case), just check the disk and see if the light is on steady.

[ELITIL] ELITIL2: / # vgdisplay -v /dev/vg00
— Volume groups —
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 9
Open LV 9
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4328
VGDA 4
PE Size (Mbytes) 16
Total PE 8636
Alloc PE 5136
Free PE 3500
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

— Logical volumes —
LV Name /dev/vg00/lvol1
LV Status available/stale
LV Size (Mbytes) 304
Current LE 19
Allocated PE 38
Used PV 2

LV Name /dev/vg00/lvol2
LV Status available/stale
LV Size (Mbytes) 4096
Current LE 256
Allocated PE 512
Used PV 2

LV Name /dev/vg00/lvol3
LV Status available/stale
LV Size (Mbytes) 560
Current LE 35
Allocated PE 70
Used PV 2

LV Name /dev/vg00/lvol4
LV Status available/stale
LV Size (Mbytes) 512
Current LE 32
Allocated PE 64
Used PV 2

LV Name /dev/vg00/lvol5
LV Status available/stale
LV Size (Mbytes) 512
Current LE 32
Allocated PE 64
Used PV 2

LV Name /dev/vg00/lvol6
LV Status available/stale
LV Size (Mbytes) 12288
Current LE 768
Allocated PE 1536
Used PV 2

LV Name /dev/vg00/lvol7
LV Status available/stale
LV Size (Mbytes) 6672
Current LE 417
Allocated PE 834
Used PV 2

LV Name /dev/vg00/lvol8
LV Status available/stale
LV Size (Mbytes) 6144
Current LE 384
Allocated PE 768
Used PV 2

LV Name /dev/vg00/lvol9
LV Status available/stale
LV Size (Mbytes) 10000
Current LE 625
Allocated PE 1250
Used PV 2

— Physical volumes —
PV Name /dev/dsk/c2t1d0s2
PV Status available
Total PE 4318
Free PE 1750
Autoswitch On
Proactive Polling On

PV Name /dev/dsk/c3t0d0s2
PV Status unavailable
Total PE 4318
Free PE 1750
Autoswitch On
Proactive Polling On

[ELITIL] ELITIL2: / # ioscan -funC disk
Class I H/W Path Driver S/W State H/W Type Description
============================================================================
disk 0 0/0/3/0.0.0.0 sdisk CLAIMED DEVICE TEAC DV-28E-N
/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0
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
disk 2 0/1/1/1.0.0 sdisk CLAIMED DEVICE HP 73.4GST373454LC
/dev/dsk/c3t0d0 /dev/dsk/c3t0d0s2 /dev/rdsk/c3t0d0 /dev/rdsk/c3t0d0s2
/dev/dsk/c3t0d0s1 /dev/dsk/c3t0d0s3 /dev/rdsk/c3t0d0s1 /dev/rdsk/c3t0d0s3
disk 5 0/2/1/0.2.0.0.0.0.0 sdisk CLAIMED DEVICE DGC CX3-40cWDR10
/dev/dsk/c6t0d0 /dev/rdsk/c6t0d0
disk 4 0/2/1/0.2.0.0.0.0.1 sdisk CLAIMED DEVICE DGC CX3-40cWDR10
/dev/dsk/c6t0d1 /dev/rdsk/c6t0d1
disk 7 0/2/1/0.2.0.0.0.0.2 sdisk CLAIMED DEVICE DGC CX3-40cWDR10
/dev/dsk/c6t0d2 /dev/rdsk/c6t0d2
et cetera..

[ELITIL] ELITIL2: / # strings /etc/lvmtab
/dev/vg00
/dev/dsk/c2t1d0s2
/dev/dsk/c3t0d0s2
/dev/vgims4s

[ELITIL] ELITIL2: / # lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
        /dev/dsk/c2t1d0s2 (0/1/1/0.1.0) — Boot Disk
        /dev/dsk/c3t0d0s2 (0/1/1/1.0.0)
Boot: lvol1     on:     /dev/dsk/c2t1d0s2
                        /dev/dsk/c3t0d0s2
Root: lvol3     on:     /dev/dsk/c2t1d0s2
                        /dev/dsk/c3t0d0s2
Swap: lvol2     on:     /dev/dsk/c2t1d0s2
                        /dev/dsk/c3t0d0s2
Dump: lvol2     on:     /dev/dsk/c2t1d0s2, 0

[ELITIL] ELITIL2: / # lvreduce -m 0 /dev/vg00/lvol1 /dev/dsk/c3t0d0s2
Logical volume “/dev/vg00/lvol1” has been successfully reduced.
lvlnboot: Logical Volume has no extents.
lvlnboot: Logical Volume has no extents.
vgcfgbackup: Could not open Physical Volume “/dev/rdsk/c3t0d0s2”.
All PVs must be present to backup Volume Group configuration.
I/O error
[ELITIL] ELITIL2: / # lvreduce -m 0 /dev/vg00/lvol2 /dev/dsk/c3t0d0s2
Logical volume “/dev/vg00/lvol2” has been successfully reduced.
lvlnboot: Logical Volume has no extents.
vgcfgbackup: Could not open Physical Volume “/dev/rdsk/c3t0d0s2”.
All PVs must be present to backup Volume Group configuration.
I/O error
[ELITIL] ELITIL2: / # lvreduce -m 0 /dev/vg00/lvol3 /dev/dsk/c3t0d0s2
Logical volume “/dev/vg00/lvol3” has been successfully reduced.
vgcfgbackup: Could not open Physical Volume “/dev/rdsk/c3t0d0s2”.
All PVs must be present to backup Volume Group configuration.
I/O error
[ELITIL] ELITIL2: / # lvreduce -m 0 /dev/vg00/lvol4 /dev/dsk/c3t0d0s2
Logical volume “/dev/vg00/lvol4” has been successfully reduced.
vgcfgbackup: Could not open Physical Volume “/dev/rdsk/c3t0d0s2”.
All PVs must be present to backup Volume Group configuration.
I/O error
[ELITIL] ELITIL2: / # lvreduce -m 0 /dev/vg00/lvol5 /dev/dsk/c3t0d0s2
Logical volume “/dev/vg00/lvol5” has been successfully reduced.
vgcfgbackup: Could not open Physical Volume “/dev/rdsk/c3t0d0s2”.
All PVs must be present to backup Volume Group configuration.
I/O error
[ELITIL] ELITIL2: / # lvreduce -m 0 /dev/vg00/lvol6 /dev/dsk/c3t0d0s2
Logical volume “/dev/vg00/lvol6” has been successfully reduced.
vgcfgbackup: Could not open Physical Volume “/dev/rdsk/c3t0d0s2”.
All PVs must be present to backup Volume Group configuration.
I/O error
[ELITIL] ELITIL2: / # lvreduce -m 0 /dev/vg00/lvol7 /dev/dsk/c3t0d0s2
Logical volume “/dev/vg00/lvol7” has been successfully reduced.
vgcfgbackup: Could not open Physical Volume “/dev/rdsk/c3t0d0s2”.
All PVs must be present to backup Volume Group configuration.
I/O error
[ELITIL] ELITIL2: / # lvreduce -m 0 /dev/vg00/lvol8 /dev/dsk/c3t0d0s2
Logical volume “/dev/vg00/lvol8” has been successfully reduced.
vgcfgbackup: Could not open Physical Volume “/dev/rdsk/c3t0d0s2”.
All PVs must be present to backup Volume Group configuration.
I/O error
[ELITIL] ELITIL2: / # lvreduce -m 0 /dev/vg00/lvol9 /dev/dsk/c3t0d0s2
Logical volume “/dev/vg00/lvol9” has been successfully reduced.
vgcfgbackup: Could not open Physical Volume “/dev/rdsk/c3t0d0s2”.
All PVs must be present to backup Volume Group configuration.
I/O error

[ELITIL] ELITIL2: / # vgreduce -l /dev/vg00 /dev/dsk/c3t0d0s2
Volume group “/dev/vg00” has been successfully reduced.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

[ELITIL] ELITIL2: / # strings /etc/lvmtab

/dev/vg00
/dev/dsk/c2t1d0s2
/dev/vgims4s

[ELITIL] ELITIL2: / # lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
        /dev/dsk/c2t1d0s2 (0/1/1/0.1.0) — Boot Disk
Boot: lvol1     on:     /dev/dsk/c2t1d0s2
Root: lvol3     on:     /dev/dsk/c2t1d0s2
Swap: lvol2     on:     /dev/dsk/c2t1d0s2
Dump: lvol2     on:     /dev/dsk/c2t1d0s2, 0

 

Now I made a mistake and executed these commands to soon. That made tme think the disk was a DOA (DeadOnArrival). Seemed that I used a PA-RISC procedere and this one differs from Itanium.
Create a physical volume using pvcreate with the -B option. Be sure to use the device file denoting the HP-UX partition.
[ELITIL] ELITIL2: / #   pvcreate -B -f /dev/rdsk/c3t0d0s2

pvcreate: Couldn’t open physical volume “/dev/rdsk/c3t0d0s2”:
I/O error

The next commands were executed to check if the disk was really a DOA or if it was alive. And it was alive:
[ELITIL] ELITIL2: / # dd if=/stand/vmunix of=/dev/dsk/c3t0d0 bs=1024k

62+1 records in
62+1 records out
[ELITIL] ELITIL2: / # dd if=/dev/dsk/c3t0d0 of=/dev/null bs=1024k
8096+0 records in
8096+0 records out

[ELITIL] ELITIL2: / # diskinfo -v /dev/rdsk/c3t0d0
SCSI describe of /dev/rdsk/c3t0d0:
             vendor: HP 73.4G
         product id: ST373454LC     
               type: direct access
               size: 71687369 Kbytes
   bytes per sector: 512
          rev level: HPC3
    blocks per disk: 143374738
        ISO version: 0
       ECMA version: 0
       ANSI version: 3
    removable media: no
    response format: 2
   (Additional inquiry bytes: (32)4b (33)50 (34)33 (35)58 (36)39 (37)45 (38)58 (39)20 (40)20 (41)20 (42)20 (43)20
(44)20 (45)20 (46)20 (47)20 (48)20 (49)20 (50)20 (51)f (52)0 (53)0 (54)60 (55)a (56)dc (57)b (58)59 (59)3 (60)1
(61)3 (62)22 (63)0 (64)0 (65)0 (66)0 (67)0 (68)0 (69)0 (70)0 (71)0 (72)0 (73)0 (74)0 (75)0 (76)0 (77)0 (78)0 (79)0
(80)0 (81)0 (82)0 (83)0 (84)0 (85)0 (86)0 (87)0 (88)0 (89)0 (90)0 (91)0 (92)43 (93)6f (94)70 (95)79 (96)72 (97)69
(98)67 (99)68 (100)74 (101)20 (102)28 (103)63 (104)29 (105)20 (106)32 (107)30 (108)30 (109)36 (110)20 (111)53
(112)65 (113)61 (114)67 (115)61 (116)74 (117)65 (118)20 (119)41 (120)6c (121)6c (122)20 (123)0 (124)0 (125)0 (126)0
(127)0 (128)0 (129)0 (130)0 (131)0 (132)0 (133)0 (134)0 (135)0 (136)0 (137)0 (138)0 )

Then I found a HP document and I got on the right track again:

[ELITIL] ELITIL2: / # pwd
/

[ELITIL] ELITIL2: / # cd /tmp
[ELITIL] ELITIL2: /tmp # vi bootlayout
“bootlayout” [New file]
3
EFI 500MB
HPUX 100%
HPSP 400MB
~
~
~
~
“bootlayout” [New file] 4 lines, 33 characters

[ELITIL] ELITIL2: /tmp # idisk -f /tmp/bootlayout -w /dev/rdsk/c3t0d0
idisk version: 1.31
********************** 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               = 0x7a1367dc
        MyLbaLo                   = 0x1
        AlternateLbaLo            = 0x88bb991
        FirstUsableLbaLo          = 0x22
        LastUsableLbaLo           = 0x88bb96e
        Disk GUID                 = 98f0b358-80d2-11de-8001-d6217b60e588
        PartitionEntryLbaLo       = 0x2
        NumberOfPartitionEntries  = 0xc
        SizeOfPartitionEntry      = 0x80
        PartitionEntryArrayCRC32  = 0xe36ae17c

  Primary Partition Table (in 512 byte blocks):
    Partition 1 (EFI):
        Partition Type GUID       = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
        Unique Partition GUID     = 98f1a876-80d2-11de-8002-d6217b60e588
        Starting Lba              = 0x22
        Ending Lba                = 0xfa021
    Partition 2 (HP-UX):
        Partition Type GUID       = 75894c1e-3aeb-11d3-b7c1-7b03a0000000
        Unique Partition GUID     = 98f1a894-80d2-11de-8003-d6217b60e588
        Starting Lba              = 0xfa022
        Ending Lba                = 0x87f396d
    Partition 3 (HPSP):
        Partition Type GUID       = e2a1e728-32e3-11d6-a682-7b03a0000000
        Unique Partition GUID     = 98f1a8b2-80d2-11de-8004-d6217b60e588
        Starting Lba              = 0x87f396e
        Ending Lba                = 0x88bb96d

EFI Alternate Header:
        Signature                 = EFI PART
        Revision                  = 0x10000
        HeaderSize                = 0x5c
        HeaderCRC32               = 0x4d68df49
        MyLbaLo                   = 0x88bb991
        AlternateLbaLo            = 0x1
        FirstUsableLbaLo          = 0x22
        LastUsableLbaLo           = 0x88bb96e
        Disk GUID                 = 98f0b358-80d2-11de-8001-d6217b60e588
        PartitionEntryLbaLo       = 0x88bb970
        NumberOfPartitionEntries  = 0xc
        SizeOfPartitionEntry      = 0x80
        PartitionEntryArrayCRC32  = 0xe36ae17c

  Alternate Partition Table (in 512 byte blocks):
    Partition 1 (EFI):
        Partition Type GUID       = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
        Unique Partition GUID     = 98f1a876-80d2-11de-8002-d6217b60e588
        Starting Lba              = 0x22
        Ending Lba                = 0xfa021
    Partition 2 (HP-UX):
        Partition Type GUID       = 75894c1e-3aeb-11d3-b7c1-7b03a0000000
        Unique Partition GUID     = 98f1a894-80d2-11de-8003-d6217b60e588
        Starting Lba              = 0xfa022
        Ending Lba                = 0x87f396d
    Partition 3 (HPSP):
        Partition Type GUID       = e2a1e728-32e3-11d6-a682-7b03a0000000
        Unique Partition GUID     = 98f1a8b2-80d2-11de-8004-d6217b60e588
        Starting Lba              = 0x87f396e
        Ending Lba                = 0x88bb96d

Legacy MBR (MBR Signatures in little endian):
   MBR Signature = 0xc2b2f098

Protective MBR

[ELITIL] ELITIL2: /tmp # idisk /dev/rdsk/c3t0d0
idisk version: 1.31

EFI Primary Header:
        Signature                 = EFI PART
        Revision                  = 0x10000
        HeaderSize                = 0x5c
        HeaderCRC32               = 0x7a1367dc
        MyLbaLo                   = 0x1
        AlternateLbaLo            = 0x88bb991
        FirstUsableLbaLo          = 0x22
        LastUsableLbaLo           = 0x88bb96e
        Disk GUID                 = 98f0b358-80d2-11de-8001-d6217b60e588
        PartitionEntryLbaLo       = 0x2
        NumberOfPartitionEntries  = 0xc
        SizeOfPartitionEntry      = 0x80
        PartitionEntryArrayCRC32  = 0xe36ae17c

  Primary Partition Table (in 512 byte blocks):
    Partition 1 (EFI):
        Partition Type GUID       = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
        Unique Partition GUID     = 98f1a876-80d2-11de-8002-d6217b60e588
        Starting Lba              = 0x22
        Ending Lba                = 0xfa021
    Partition 2 (HP-UX):
        Partition Type GUID       = 75894c1e-3aeb-11d3-b7c1-7b03a0000000
        Unique Partition GUID     = 98f1a894-80d2-11de-8003-d6217b60e588
        Starting Lba              = 0xfa022
        Ending Lba                = 0x87f396d
    Partition 3 (HPSP):
        Partition Type GUID       = e2a1e728-32e3-11d6-a682-7b03a0000000
        Unique Partition GUID     = 98f1a8b2-80d2-11de-8004-d6217b60e588
        Starting Lba              = 0x87f396e
        Ending Lba                = 0x88bb96d

EFI Alternate Header:
        Signature                 = EFI PART
        Revision                  = 0x10000
        HeaderSize                = 0x5c
        HeaderCRC32               = 0x4d68df49
        MyLbaLo                   = 0x88bb991
        AlternateLbaLo            = 0x1
        FirstUsableLbaLo          = 0x22
        LastUsableLbaLo           = 0x88bb96e
        Disk GUID                 = 98f0b358-80d2-11de-8001-d6217b60e588
        PartitionEntryLbaLo       = 0x88bb970
        NumberOfPartitionEntries  = 0xc
        SizeOfPartitionEntry      = 0x80
        PartitionEntryArrayCRC32  = 0xe36ae17c

  Alternate Partition Table (in 512 byte blocks):
    Partition 1 (EFI):
        Partition Type GUID       = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
        Unique Partition GUID     = 98f1a876-80d2-11de-8002-d6217b60e588
        Starting Lba              = 0x22
        Ending Lba                = 0xfa021
    Partition 2 (HP-UX):
        Partition Type GUID       = 75894c1e-3aeb-11d3-b7c1-7b03a0000000
        Unique Partition GUID     = 98f1a894-80d2-11de-8003-d6217b60e588
        Starting Lba              = 0xfa022
        Ending Lba                = 0x87f396d
    Partition 3 (HPSP):
        Partition Type GUID       = e2a1e728-32e3-11d6-a682-7b03a0000000
        Unique Partition GUID     = 98f1a8b2-80d2-11de-8004-d6217b60e588
        Starting Lba              = 0x87f396e
        Ending Lba                = 0x88bb96d

Legacy MBR (MBR Signatures in little endian):
   MBR Signature = 0xc2b2f098

Protective MBR
—-

I did not have to create the device files but here is how you can do this:

Enter the insf command with the -e option to create the legacy device files for all the partitions:
# insf -e -H 0/1/1/1.0.0
You now have the following device files for this disk:
/dev/dsk/c3t0d0
The entire disk (block access)
/dev/rdsk/c3t0d0
The entire disk (character access)
/dev/dsk/c3t0d0s1
The EFI partition (block access)
/dev/rdsk/c3t0d0s1
The EFI partition (character access)
/dev/dsk/c3t0d0s2
The HP-UX partition (block access)
/dev/rdsk/c3t0d0s2
The HP-UX partition (character access)
/dev/dsk/c3t0d0s3
The Service partition (block access)
/dev/rdsk/c3t0d0s3
The Service partition (character access)
Starting with the HP-UX 11i v3 release, you must have the persistent device special files. To achieve this, use the insf command with the –e option or -eC disk option. If you are running insf –e –H <hw_path>, you must run the insf command for both the legacy and new style lun hardware path. For example:
# insf -e -H 0/5/1/0.5.14.0.0.0.1 50
You now have the following device files for this disk:
/dev/disk/disk75
The entire disk (block access)
/dev/rdisk/disk75
The entire disk (character access)
/dev/disk/disk75_p1
The EFI partition (block access)
/dev/rdisk/disk75_p1
The EFI partition (character access)
/dev/disk/disk75_p2
The HP-UX partition (block access)
/dev/rdisk/disk75_p2
The HP-UX partition (character access)
/dev/disk/disk75_p3
The Service partition (block access)
/dev/rdisk/disk75_p3
The Service partition (character access)

[ELITIL] ELITIL2: /tmp # ioscan -nfCdisk |more
Class     I  H/W Path       Driver     S/W State   H/W Type     Description
============================================================================
disk      0  0/0/3/0.0.0.0  sdisk      CLAIMED     DEVICE       TEAC    DV-28E-N
                           /dev/dsk/c0t0d0   /dev/rdsk/c0t0d0
disk      1  0/1/1/0.1.0    sdisk      CLAIMED     DEVICE       HP 73.4GMAX3073N
C
                           /dev/dsk/c2t1d0     /dev/rdsk/c2t1d0 
                           /dev/dsk/c2t1d0s1   /dev/rdsk/c2t1d0s1
                           /dev/dsk/c2t1d0s2   /dev/rdsk/c2t1d0s2
                           /dev/dsk/c2t1d0s3   /dev/rdsk/c2t1d0s3
disk      2  0/1/1/1.0.0    sdisk      CLAIMED     DEVICE       HP 73.4GST373454
LC
                           /dev/dsk/c3t0d0     /dev/rdsk/c3t0d0 
                           /dev/dsk/c3t0d0s1   /dev/rdsk/c3t0d0s1
                           /dev/dsk/c3t0d0s2   /dev/rdsk/c3t0d0s2
                           /dev/dsk/c3t0d0s3   /dev/rdsk/c3t0d0s3
disk      5  0/2/1/0.2.0.0.0.0.0  sdisk      CLAIMED     DEVICE       DGC     CX
3-40cWDR10
                           /dev/dsk/c6t0d0   /dev/rdsk/c6t0d0
disk      4  0/2/1/0.2.0.0.0.0.1  sdisk      CLAIMED     DEVICE       DGC     CX
3-40cWDR10
                           /dev/dsk/c6t0d1   /dev/rdsk/c6t0d1
disk      7  0/2/1/0.2.0.0.0.0.2  sdisk      CLAIMED     DEVICE       DGC     CX
3-40cWDR10

 

Now you got the device files we continue.. 

Use efi_fsinit to initialize the FAT filesystem on the EFI partition:
# efi_fsinit -d /dev/rdsk/c2t1d0s1 

[ELITIL] ELITIL2: /tmp # pvcreate -B /dev/rdsk/c3t0d0s2
Physical volume “/dev/rdsk/c3t0d0s2” has been successfully created.

[ELITIL] ELITIL2: /tmp # vgextend /dev/vg00 /dev/dsk/c3t0d0s2
Volume group “/dev/vg00” has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

[ELITIL] ELITIL2: /tmp # mkboot -e -l /dev/rdsk/c3t0d0

[ELITIL] ELITIL2: / # efi_ls -d /dev/rdsk/c3t0d0s1
FileName                             Last Modified             Size
EFI/                                   8/ 4/2009                  0
STARTUP.NSH                            8/ 4/2009                296
total space 523251712 bytes, free space 519856128 bytes

To list the contents of the EFI directory, enter the efi_ls command:
[ELITIL] ELITIL2: / # lifls -l /dev/rdsk/c3t0d0s1

lifls: Can’t list /dev/rdsk/c3t0d0s1; not a LIF volume

To list the contents of the LIF directory, enter the lifls command:
[ELITIL] ELITIL2: / # lifls -l /dev/rdsk/c3t0d0s2
volume ISL10 data size 7984 directory size 8 06/04/19 14:02:34
filename   type   start   size     implement  created
===============================================================
ISL        -12800 584     242      0          06/04/19 14:02:34
AUTO       -12289 832     1        0          06/04/19 14:02:34
HPUX       -12928 840     1024     0          06/04/19 14:02:34
PAD        -12290 1864    1468     0          06/04/19 14:02:34
LABEL      BIN    3336    8        0          09/08/04 10:48:15

If needed update the autoboot file on the EFI partition:
[ELITIL] ELITIL2: /tmp #  efi_cp -d /dev/rdsk/c3t0d0s1 -u /EFI/HPUX/AUTO /tmp/auto-alt

If you expect to boot from this disk only when you have lost quorum, you can use the string “boot vmunix –lq” to disable quorum checking (This not recommended; use this with caution to prevent data loss). Otherwise use just the default “boot vmunix” option. I use the -lq parameters so I don’t have to manualy select the boot drive after a rebbot when the master-boot-disk has failed.

[ELITIL] ELITIL2: /tmp # cat auto-alt
boot vmunix -lq
~
~
“auto-alt” 1 line, 16 characters

Check the config of the other disk:
[ELITIL] ELITIL2: /tmp #  efi_cp -d /dev/rdsk/c2t1d0s1 -u /EFI/HPUX/AUTO /tmp/auto-alt_2

[ELITIL] ELITIL2: /tmp # cat auto-alt
boot vmunix -lq
~
~
“auto-alt” 1 line, 16 characters

All files are what I want them to be so I don’t have to change them. If NOT OK then adjust the files and copy them back with the following commands:[ELITIL] ELITIL2: /tmp #  efi_cp -d /dev/rdsk/c3t0d0s1 /tmp/auto-alt /EFI/HPUX/AUTO
[ELITIL] ELITIL2: /tmp #  efi_cp -d /dev/rdsk/c2t1d0s1
/tmp/auto-alt_2 /EFI/HPUX/AUTO

 

Use the lvextend command to mirror each logical volume in vg00 (the root volume group) onto the specified physical  volume. You must extend the logical volumes in the same order that they are configured on the original boot disk. Use the pvdisplay command with the -v option to determine the list of logical volumes and their order.

[ELITIL] ELITIL2: /tmp # pvdisplay -v /dev/dsk/c2t1d0s2|grep ‘current.*0000 $’
   00000 current  /dev/vg00/lvol1         00000
   00019 current  /dev/vg00/lvol2         00000
   00275 current  /dev/vg00/lvol3         00000
   00310 current  /dev/vg00/lvol4         00000
   00323 current  /dev/vg00/lvol5         00000
   00325 current  /dev/vg00/lvol6         00000
   00736 current  /dev/vg00/lvol7         00000
   01153 current  /dev/vg00/lvol8         00000
   01943 current  /dev/vg00/lvol9         00000 

[ELITIL] ELITIL2: /tmp # lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c3t0d0s2
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ….
Logical volume “/dev/vg00/lvol1” has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

[ELITIL] ELITIL2: /tmp # lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c3t0d0s2
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

[ELITIL] ELITIL2: /tmp # lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c3t0d0s2
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

[ELITIL] ELITIL2: /tmp # lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c3t0d0s2
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

[ELITIL] ELITIL2: /tmp # lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c3t0d0s2
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

[ELITIL] ELITIL2: /tmp # lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c3t0d0s2
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

[ELITIL] ELITIL2: /tmp # lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c3t0d0s2
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

[ELITIL] ELITIL2: /tmp # lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c3t0d0s2
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.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

[ELITIL] ELITIL2: /tmp # lvextend -m 1 /dev/vg00/lvol9 /dev/dsk/c3t0d0s2
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ….
Logical volume “/dev/vg00/lvol9” has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

[ELITIL] ELITIL2: / # lvdisplay -v $(find /dev/vg00 -type b) | grep stale | wc -l
290
[ELITIL] ELITIL2: / # lvdisplay -v $(find /dev/vg00 -type b) | grep stale | wc -l
285
[ELITIL] ELITIL2: / # lvdisplay -v $(find /dev/vg00 -type b) | grep stale | wc -l
265

This was also a good idea to automate the list of commands from above:

# for lvol in lvol1 lvol2 lvol3 … (specify any LV you need to mirror)
> do
> lvextend –m 1 /dev/vgXX/$lvol /dev/dsk/cXtXdX
> done

 

Update the root volume group information:
[ELITIL] ELITIL2: /tmp # lvlnboot -R /dev/vg00
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

Verify that the mirrored disk is displayed as a boot disk and that the boot, root, and swap logical volumes appear on both disks:
[ELITIL] ELITIL2: /tmp # lvlnboot -v

Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
        /dev/dsk/c2t1d0s2 (0/1/1/0.1.0) — Boot Disk
        /dev/dsk/c3t0d0s2 (0/1/1/1.0.0) — Boot Disk
Boot: lvol1     on:     /dev/dsk/c2t1d0s2
                        /dev/dsk/c3t0d0s2
Root: lvol3     on:     /dev/dsk/c2t1d0s2
                        /dev/dsk/c3t0d0s2
Swap: lvol2     on:     /dev/dsk/c2t1d0s2
                        /dev/dsk/c3t0d0s2
Dump: lvol2     on:     /dev/dsk/c2t1d0s2, 0

Specify the mirror disk as the alternate boot path in nonvolatile memory:
[ELITIL] ELITIL2: /tmp # setboot -a 0/1/1/1.0.0

To add a line to /stand/bootconf for the new boot disk, use vi or another text editor as follows:
[ELITIL] ELITIL2: /tmp # vi /stand/bootconf

“/stand/bootconf” 2 lines, 42 characters
l  /dev/dsk/c2t1d0s2
l  /dev/dsk/c3t0d0s2
~
~

Check if everything is OK. Per logical volume you must see “LV Status available/synced” and “Used PV 2”.
[ELITIL] ELITIL2: /tmp # vgdisplay -v /dev/vg00
— Volume groups —
VG Name                     /dev/vg00
VG Write Access             read/write     
VG Status                   available                 
Max LV                      255    
Cur LV                      9      
Open LV                     9      
Max PV                      16     
Cur PV                      2      
Act PV                      2      
Max PE per PV               4328         
VGDA                        4   
PE Size (Mbytes)            16              
Total PE                    8636    
Alloc PE                    5136    
Free PE                     3500    
Total PVG                   0        
Total Spare PVs             0              
Total Spare PVs in use      0                     

   — Logical volumes —
   LV Name                     /dev/vg00/lvol1
   LV Status                   available/syncd           
   LV Size (Mbytes)            304             
   Current LE                  19        
   Allocated PE                38          
   Used PV                     2       

   LV Name                     /dev/vg00/lvol2
   LV Status                   available/syncd           
   LV Size (Mbytes)            4096            
   Current LE                  256       
   Allocated PE                512         
   Used PV                     2       

   LV Name                     /dev/vg00/lvol3
   LV Status                   available/syncd           
   LV Size (Mbytes)            560             
   Current LE                  35        
   Allocated PE                70          
   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)            512             
   Current LE                  32        
   Allocated PE                64          
   Used PV                     2       

   LV Name                     /dev/vg00/lvol6
   LV Status                   available/syncd           
   LV Size (Mbytes)            12288           
   Current LE                  768       
   Allocated PE                1536        
   Used PV                     2       

   LV Name                     /dev/vg00/lvol7
   LV Status                   available/syncd           
   LV Size (Mbytes)            6672            
   Current LE                  417       
   Allocated PE                834         
   Used PV                     2       

   LV Name                     /dev/vg00/lvol8
   LV Status                   available/syncd           
   LV Size (Mbytes)            6144            
   Current LE                  384       
   Allocated PE                768         
   Used PV                     2       

   LV Name                     /dev/vg00/lvol9
   LV Status                   available/syncd           
   LV Size (Mbytes)            10000           
   Current LE                  625       
   Allocated PE                1250        
   Used PV                     2       

   — Physical volumes —
   PV Name                     /dev/dsk/c2t1d0s2
   PV Status                   available                
   Total PE                    4318    
   Free PE                     1750    
   Autoswitch                  On        
   Proactive Polling           On               

   PV Name                     /dev/dsk/c3t0d0s2
   PV Status                   available                
   Total PE                    4318    
   Free PE                     1750    
   Autoswitch                  On        
   Proactive Polling           On

 

Best test is to reboot hte system from the alternate boot disk. Make an Ignite backup before you do dthis.

Roderick Derks

Liefhebber van fietsen, van het oplossen van IT puzzels, en van het delen van informatie om anderen te helpen.

All stories by:Roderick Derks

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Your Name (required)

    Your Email (required)

    Subject

    Your Message

      Your Name (required)

      Your Email (required)

      Subject

      Your Message