How to mirror the root disk on a hp itanium hp-ux system?
-
Mirroring the root disk on an itanium hp systems and a pa-risc hp system differ, here only the itanium method is shown, look at the how to on pa-risc root disk mirroring for that type. Note your devices could be different, and device naming is different on HP-UX 11i v3
First determine your current root disk hardware path
# setboot Primary bootpath : 0/4/1/0.0.0.7.0 HA Alternate bootpath : 0/4/2/0 Alternate bootpath : 0/0/2/1.0.16.0.0
By running the ioscan command you'll see that the alternate boot path is currently the dvd-rom, make a note of the root disk device paths.
# ioscan -fun -C disk
To check the number of disks being used for the root volume group run vgdisplay, here you see right at the end of the output the physical volumes used. This will determine if you have mirror only one disk or more. In this example we are mirroring one disk only.
# vgdisplay -v vg00 --- Volume groups --- VG Name /dev/vg00 VG Write Access read/write VG Status available Max LV 255 Cur LV 18 Open LV 18 Max PV 8 Cur PV 1 Act PV 1 Max PE per PV 9200 VGDA 2 PE Size (Mbytes) 16 Total PE 4318 Alloc PE 3434 Free PE 884 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) 592 Current LE 37 Allocated PE 37 Used PV 1 LV Name /dev/vg00/lvol2 LV Status available/syncd LV Size (Mbytes) 16000 Current LE 1000 Allocated PE 1000 Used PV 1 LV Name /dev/vg00/lvol3 LV Status available/syncd LV Size (Mbytes) 1024 Current LE 64 Allocated PE 64 Used PV 1 LV Name /dev/vg00/lvol5 LV Status available/syncd LV Size (Mbytes) 8192 Current LE 512 Allocated PE 512 Used PV 1 LV Name /dev/vg00/lvol6 LV Status available/syncd LV Size (Mbytes) 1024 Current LE 64 Allocated PE 64 Used PV 1 LV Name /dev/vg00/lvol7 LV Status available/syncd LV Size (Mbytes) 8192 Current LE 512 Allocated PE 512 Used PV 1 LV Name /dev/vg00/lvol8 LV Status available/syncd LV Size (Mbytes) 512 Current LE 32 Allocated PE 32 Used PV 1 LV Name /dev/vg00/lvol9 LV Status available/syncd LV Size (Mbytes) 12000 Current LE 750 Allocated PE 750 Used PV 1 LV Name /dev/vg00/lvol10 LV Status available/syncd LV Size (Mbytes) 4096 Current LE 256 Allocated PE 256 Used PV 1 --- Physical volumes --- PV Name /dev/dsk/c1t7d0s2 PV Status available Total PE 4318 Free PE 884 Autoswitch On
On the current root disk determine the sizes of the EFI partition, the HP-UX partition, and the HPSP partition, another article discusses what the are, but for now we'll just say they are systems partitions.
# diskinfo -b /dev/rdsk/c1t7d0s1 | awk '{print $1 / (1024) }' 500 # diskinfo -b /dev/rdsk/c1t7d0s2 | awk '{print $1 / (1024) }' 69107 # diskinfo -b /dev/rdsk/c1t7d0s3 | awk '{print $1 / (1024) }' 400
Create file with the size information obtained from the previous step, the 100% for HP-UX partition means after assigning 500MB for EFI and 400MB for the HPSP partitions, use 100% of the rest for HP-UX. The 3 means three partitions.
vi /tmp/ipf 3 EFI 500MB HPUX 100% HPSP 400MB
Partition your mirror disk using the idisk command:
# idisk -f /tmp/idf -w /dev/rdsk/c1t0d0 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 = 0x12887a5e MyLbaLo = 0x1 AlternateLbaLo = 0x88bb991 FirstUsableLbaLo = 0x22 LastUsableLbaLo = 0x88bb96e Disk GUID = 8227cf64-8c85-11dc-8001-d6217b60e588 PartitionEntryLbaLo = 0x2 NumberOfPartitionEntries = 0xc SizeOfPartitionEntry = 0x80 PartitionEntryArrayCRC32 = 0x55e1fb33 Primary Partition Table (in 512 byte blocks): Partition 1 (EFI): Partition Type GUID = c12a7328-f81f-11d2-ba4b-00a0c93ec93b Unique Partition GUID = 8227d108-8c85-11dc-8002-d6217b60e588 Starting Lba = 0x22 Ending Lba = 0xfa021 Partition 2 (HP-UX): Partition Type GUID = 75894c1e-3aeb-11d3-b7c1-7b03a0000000 Unique Partition GUID = 8227d126-8c85-11dc-8003-d6217b60e588 Starting Lba = 0xfa022 Ending Lba = 0x87f396d Partition 3 (HPSP): Partition Type GUID = e2a1e728-32e3-11d6-a682-7b03a0000000 Unique Partition GUID = 8227d13a-8c85-11dc-8004-d6217b60e588 Starting Lba = 0x87f396e Ending Lba = 0x88bb96d EFI Alternate Header: Signature = EFI PART Revision = 0x10000 HeaderSize = 0x5c HeaderCRC32 = 0x25f3c2cb MyLbaLo = 0x88bb991 AlternateLbaLo = 0x1 FirstUsableLbaLo = 0x22 LastUsableLbaLo = 0x88bb96e Disk GUID = 8227cf64-8c85-11dc-8001-d6217b60e588 PartitionEntryLbaLo = 0x88bb970 NumberOfPartitionEntries = 0xc SizeOfPartitionEntry = 0x80 PartitionEntryArrayCRC32 = 0x55e1fb33 Alternate Partition Table (in 512 byte blocks): Partition 1 (EFI): Partition Type GUID = c12a7328-f81f-11d2-ba4b-00a0c93ec93b Unique Partition GUID = 8227d108-8c85-11dc-8002-d6217b60e588 Starting Lba = 0x22 Ending Lba = 0xfa021 Partition 2 (HP-UX): Partition Type GUID = 75894c1e-3aeb-11d3-b7c1-7b03a0000000 Unique Partition GUID = 8227d126-8c85-11dc-8003-d6217b60e588 Starting Lba = 0xfa022 Ending Lba = 0x87f396d Partition 3 (HPSP): Partition Type GUID = e2a1e728-32e3-11d6-a682-7b03a0000000 Unique Partition GUID = 8227d13a-8c85-11dc-8004-d6217b60e588 Starting Lba = 0x87f396e Ending Lba = 0x88bb96d Legacy MBR (MBR Signatures in little endian): MBR Signature = 0xecce2782 Protective MBR
Install special files for all partition on the disk.
# insf -e -H 0/4/1/0.0.0.0.0 insf: Installing special files for sdisk instance 1 address 0/4/1/0.0.0.0.0
After completing this you should have 8 special files, verify with
# ioscan -fun -C disk
Create a physical volume, so the disk can be part of Logical Volume Manager (LVM).
# /usr/sbin/pvcreate -f -B /dev/rdsk/c1t0d0s2 Physical volume "/dev/rdsk/c1t0d0" has been successfully created.
Extend the disk into the root volume group
# /usr/sbin/vgextend /dev/vg00 /dev/dsk/c1t0d0s2 Volume group "/dev/vg00" has been successfully extended. Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
Create the boot area on the disk, either character device or block device can be used. The -e is for EFI layout and the -l is for volume layout disk ie..VxVM or LVM.
# /usr/sbin/mkboot -e -l /dev/rdsk/c1t0d0
Before any other EFI commands can be run, efi_fsinit must be run to initialize the file system on a device file.
# efi_fsinit -d /dev/rdsk/c1t0d0s1
Copy the autoboot file from the root disk EFI partition to the current directory, copy it to the new disk s1
# efi_cp -d /dev/rdsk/c1t7d0s1 -u /efi/hpux/auto ./AUTO
Copy the contents of the AUTO boot file created in the previous step to the mirror disk
# efi_cp -d /dev/rdsk/c1t0d0s1 ./AUTO /efi/hpux/auto
Alternatviely, and this is recommended in most case, you can add ignore quorum so the mirror boots without interruption. The lq option ensures that the system will boot without quorum, that is without being tied to the root disk. In the event of the primary boot disk failing this will allow the mirror disk to boot.
# print 'boot vmunix -lq' > /tmp/AUTO # efi_cp -d /dev/rdsk/c1t0d0s1 /tmp/AUTO /efi/hpux/auto
Use lvextend to mirror each logical volume on the root disk in the same order as the orginal root disk.
To get the current root disk logical volume order do:# pvdisplay -v /dev/dsk/c1t7d0s2 | grep current | grep 00000
Mirror the logical volume, in the order displayed above. We are only showing the mirroring of on logical volume, perform the same for all the logical volumes or create a for loop in a script.
# lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t0d0s2 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.
Update the root volume group information, reestablish LVM knowledge of root, boot, swap and dump areas. This can be run individually or as one command:
# lvlnboot -R /dev/vg00 Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
or
# /usr/sbin/lvlnboot -b /dev/vg00/lvol1 # /usr/sbin/lvlnboot -r /dev/vg00/lvol3 # /usr/sbin/lvlnboot -s /dev/vg00/lvol2 # /usr/sbin/lvlnboot -d /dev/vg00/lvol2 # /usr/sbin/lvlnboot -R
Display the boot disk reserved area using lvlnboot.
# lvlnboot -v Boot Definitions for Volume Group /dev/vg00: Physical Volumes belonging in Root Volume Group: /dev/dsk/c1t7d0s2 (0/4/1/0.0.0.7.0) -- Boot Disk /dev/dsk/c1t0d0 (0/4/1/0.0.0.0.0) /dev/dsk/c1t0d0s2 (0/4/1/0.0.0.0.0) -- Boot Disk Boot: lvol1 on: /dev/dsk/c1t7d0s2 /dev/dsk/c1t0d0s2 Root: lvol3 on: /dev/dsk/c1t7d0s2 /dev/dsk/c1t0d0s2 Swap: lvol2 on: /dev/dsk/c1t7d0s2 /dev/dsk/c1t0d0s2 Dump: lvol2 on: /dev/dsk/c1t7d0s2
Set the alternate boot path to the newly mirrored disk
# setboot -a 0/4/1/0.0.0.0.0
Finally edit the /stand/bootconf. With a line beginning with a lowercase letter l, meaning logical, LVM or VxVM, for the newly mirrored disk.
# vi /stand/bootconf l /dev/dsk/c1t7d0s2 l /dev/dsk/c1t0d0s2
The mirror disk should be tested on reboot simply boot into the alternate path, then shutdown and reboot again, booting into primary path.
© Lightnetics 2024